summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authornobody <>2003-04-03 16:34:49 +0000
committernobody <>2003-04-03 16:34:49 +0000
commit56119ffba54ea99aed55aed353725346558b2696 (patch)
tree495e36fff104a35666f05eee0b17d6ef091abbe7 /gdb
parentd355127720dea14eef250e2e2c3db273d97f0c0c (diff)
downloadbinutils-gdb-56119ffba54ea99aed55aed353725346558b2696.tar.gz
This commit was manufactured by cvs2svn to create branchcagney_frameaddr-20030403-branchpoint
'cagney_frameaddr-20030403-branch'. Sprout from cagney_framebase-20030326-branch 2003-03-29 23:29:48 UTC nobody 'This commit was manufactured by cvs2svn to create branch' Cherrypick from cagney_framebase-20030326-branch 2003-03-26 20:19:13 UTC nobody 'This commit was manufactured by cvs2svn to create branch': gdb/symtab.h Cherrypick from master 2003-04-03 16:34:48 UTC Andrew Cagney <cagney@redhat.com> '2003-04-02 Andrew Cagney <cagney@redhat.com>': bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/aoutx.h bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/coff-arm.c bfd/coffcode.h bfd/coffgen.c bfd/config.bfd bfd/configure bfd/configure.in bfd/cpu-arm.c bfd/cpu-xtensa.c bfd/dwarf2.c bfd/elf-eh-frame.c bfd/elf.c bfd/elf32-arm.h bfd/elf32-ppc.c bfd/elf32-xtensa.c bfd/elflink.h bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/format.c bfd/libbfd.h bfd/libpei.h bfd/linker.c bfd/opncls.c bfd/peXXigen.c bfd/peicode.h bfd/reloc.c bfd/simple.c bfd/targets.c bfd/version.h bfd/xtensa-isa.c bfd/xtensa-modules.c gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/NEWS gdb/ada-lang.c gdb/alpha-tdep.c gdb/arm-linux-tdep.c gdb/arm-tdep.c gdb/avr-tdep.c gdb/breakpoint.c gdb/c-lang.c gdb/config/i386/tm-symmetry.h gdb/config/pa/hppabsd.mh gdb/config/pa/hppabsd.mt gdb/config/pa/hppaosf.mh gdb/config/pa/hppaosf.mt gdb/config/pa/hppapro.mt gdb/config/pa/nm-hppab.h gdb/config/pa/nm-hppah.h gdb/config/pa/nm-hppao.h gdb/config/pa/tm-hppa.h gdb/config/pa/tm-hppa64.h gdb/config/pa/tm-hppab.h gdb/config/pa/tm-hppao.h gdb/config/pa/tm-pro.h gdb/config/pa/xm-hppab.h gdb/config/pa/xm-hppah.h gdb/config/pa/xm-pa.h gdb/config/sparc/tm-sp64.h gdb/config/sparc/tm-sparc.h gdb/configure.host gdb/configure.tgt gdb/cris-tdep.c gdb/d10v-tdep.c gdb/doc/ChangeLog gdb/doc/Makefile.in gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/doc/observer.texi gdb/dummy-frame.c gdb/dummy-frame.h gdb/dwarf2expr.c gdb/dwarf2loc.c gdb/f-lang.c gdb/findvar.c gdb/frame-base.c gdb/frame-base.h gdb/frame.c gdb/frame.h gdb/frv-tdep.c gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/h8300-tdep.c gdb/hppa-hpux-tdep.c gdb/hppa-tdep.c gdb/hppah-nat.c gdb/hpread.c gdb/i386-tdep.c gdb/ia64-tdep.c gdb/infcmd.c gdb/inferior.h gdb/infrun.c gdb/infttrace.c gdb/jv-lang.c gdb/language.c gdb/language.h gdb/lin-lwp.c gdb/linux-proc.c gdb/m2-lang.c gdb/m68hc11-tdep.c gdb/m68k-tdep.c gdb/maint.c gdb/mcore-tdep.c gdb/mi/ChangeLog gdb/mi/mi-cmd-file.c gdb/mi/mi-cmds.c gdb/mi/mi-cmds.h gdb/mi/mi-getopt.c gdb/mi/mi-getopt.h gdb/mips-tdep.c gdb/mn10300-tdep.c gdb/ns32k-tdep.c gdb/objc-exp.y gdb/objc-lang.c gdb/objc-lang.h gdb/p-lang.c gdb/printcmd.c gdb/regcache.c gdb/remote.h gdb/rs6000-tdep.c gdb/s390-tdep.c gdb/scm-lang.c gdb/sh-tdep.c gdb/signals/signals.c gdb/somread.c gdb/somsolib.h gdb/sparc-tdep.c gdb/stack.c gdb/symfile.c gdb/testsuite/ChangeLog gdb/testsuite/gdb.base/call-rt-st.exp gdb/testsuite/gdb.base/callfuncs.exp gdb/testsuite/gdb.base/ending-run.exp gdb/testsuite/gdb.base/list.exp gdb/testsuite/gdb.base/pointers.exp gdb/testsuite/gdb.base/ptype.c gdb/testsuite/gdb.base/ptype.exp gdb/testsuite/gdb.base/sizeof.c gdb/testsuite/gdb.base/sizeof.exp gdb/testsuite/gdb.c++/casts.exp gdb/testsuite/gdb.mi/mi-file.exp gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/mi-support.exp gdb/thread.c gdb/utils.c gdb/v850-tdep.c gdb/valops.c gdb/value.h gdb/vax-tdep.c gdb/version.in gdb/x86-64-tdep.c gdb/xstormy16-tdep.c include/ChangeLog include/dis-asm.h include/elf/ChangeLog include/elf/arm.h include/elf/common.h include/elf/xtensa.h include/gdb/ChangeLog include/gdb/sim-arm.h include/xtensa-config.h include/xtensa-isa-internal.h include/xtensa-isa.h opcodes/ChangeLog opcodes/Makefile.am opcodes/Makefile.in opcodes/arm-dis.c opcodes/arm-opc.h opcodes/configure opcodes/configure.in opcodes/disassemble.c opcodes/xtensa-dis.c sim/arm/ChangeLog sim/arm/Makefile.in sim/arm/armcopro.c sim/arm/armdefs.h sim/arm/armemu.c sim/arm/arminit.c sim/arm/armos.c sim/arm/configure sim/arm/configure.in sim/arm/wrapper.c sim/testsuite/ChangeLog sim/testsuite/sim/arm/adc.cgs sim/testsuite/sim/arm/add.cgs sim/testsuite/sim/arm/allinsn.exp sim/testsuite/sim/arm/and.cgs sim/testsuite/sim/arm/b.cgs sim/testsuite/sim/arm/bic.cgs sim/testsuite/sim/arm/bl.cgs sim/testsuite/sim/arm/bx.cgs sim/testsuite/sim/arm/cmn.cgs sim/testsuite/sim/arm/cmp.cgs sim/testsuite/sim/arm/eor.cgs sim/testsuite/sim/arm/hello.ms sim/testsuite/sim/arm/iwmmxt/iwmmxt.exp sim/testsuite/sim/arm/iwmmxt/tbcst.cgs sim/testsuite/sim/arm/iwmmxt/testutils.inc sim/testsuite/sim/arm/iwmmxt/textrm.cgs sim/testsuite/sim/arm/iwmmxt/tinsr.cgs sim/testsuite/sim/arm/iwmmxt/tmia.cgs sim/testsuite/sim/arm/iwmmxt/tmiaph.cgs sim/testsuite/sim/arm/iwmmxt/tmiaxy.cgs sim/testsuite/sim/arm/iwmmxt/tmovmsk.cgs sim/testsuite/sim/arm/iwmmxt/wacc.cgs sim/testsuite/sim/arm/iwmmxt/wadd.cgs sim/testsuite/sim/arm/iwmmxt/waligni.cgs sim/testsuite/sim/arm/iwmmxt/walignr.cgs sim/testsuite/sim/arm/iwmmxt/wand.cgs sim/testsuite/sim/arm/iwmmxt/wandn.cgs sim/testsuite/sim/arm/iwmmxt/wavg2.cgs sim/testsuite/sim/arm/iwmmxt/wcmpeq.cgs sim/testsuite/sim/arm/iwmmxt/wcmpgt.cgs sim/testsuite/sim/arm/iwmmxt/wmac.cgs sim/testsuite/sim/arm/iwmmxt/wmadd.cgs sim/testsuite/sim/arm/iwmmxt/wmax.cgs sim/testsuite/sim/arm/iwmmxt/wmin.cgs sim/testsuite/sim/arm/iwmmxt/wmov.cgs sim/testsuite/sim/arm/iwmmxt/wmul.cgs sim/testsuite/sim/arm/iwmmxt/wor.cgs sim/testsuite/sim/arm/iwmmxt/wpack.cgs sim/testsuite/sim/arm/iwmmxt/wror.cgs sim/testsuite/sim/arm/iwmmxt/wsad.cgs sim/testsuite/sim/arm/iwmmxt/wshufh.cgs sim/testsuite/sim/arm/iwmmxt/wsll.cgs sim/testsuite/sim/arm/iwmmxt/wsra.cgs sim/testsuite/sim/arm/iwmmxt/wsrl.cgs sim/testsuite/sim/arm/iwmmxt/wsub.cgs sim/testsuite/sim/arm/iwmmxt/wunpckeh.cgs sim/testsuite/sim/arm/iwmmxt/wunpckel.cgs sim/testsuite/sim/arm/iwmmxt/wunpckih.cgs sim/testsuite/sim/arm/iwmmxt/wunpckil.cgs sim/testsuite/sim/arm/iwmmxt/wxor.cgs sim/testsuite/sim/arm/iwmmxt/wzero.cgs sim/testsuite/sim/arm/ldm.cgs sim/testsuite/sim/arm/ldr.cgs sim/testsuite/sim/arm/ldrb.cgs sim/testsuite/sim/arm/ldrh.cgs sim/testsuite/sim/arm/ldrsb.cgs sim/testsuite/sim/arm/ldrsh.cgs sim/testsuite/sim/arm/misaligned1.ms sim/testsuite/sim/arm/misaligned2.ms sim/testsuite/sim/arm/misaligned3.ms sim/testsuite/sim/arm/misc.exp sim/testsuite/sim/arm/mla.cgs sim/testsuite/sim/arm/mov.cgs sim/testsuite/sim/arm/mrs.cgs sim/testsuite/sim/arm/msr.cgs sim/testsuite/sim/arm/mul.cgs sim/testsuite/sim/arm/mvn.cgs sim/testsuite/sim/arm/orr.cgs sim/testsuite/sim/arm/rsb.cgs sim/testsuite/sim/arm/rsc.cgs sim/testsuite/sim/arm/sbc.cgs sim/testsuite/sim/arm/smlal.cgs sim/testsuite/sim/arm/smull.cgs sim/testsuite/sim/arm/stm.cgs sim/testsuite/sim/arm/str.cgs sim/testsuite/sim/arm/strb.cgs sim/testsuite/sim/arm/strh.cgs sim/testsuite/sim/arm/sub.cgs sim/testsuite/sim/arm/swi.cgs sim/testsuite/sim/arm/swp.cgs sim/testsuite/sim/arm/swpb.cgs sim/testsuite/sim/arm/teq.cgs sim/testsuite/sim/arm/testutils.inc sim/testsuite/sim/arm/thumb/adc.cgs sim/testsuite/sim/arm/thumb/add-hd-hs.cgs sim/testsuite/sim/arm/thumb/add-hd-rs.cgs sim/testsuite/sim/arm/thumb/add-rd-hs.cgs sim/testsuite/sim/arm/thumb/add-sp.cgs sim/testsuite/sim/arm/thumb/add.cgs sim/testsuite/sim/arm/thumb/addi.cgs sim/testsuite/sim/arm/thumb/addi8.cgs sim/testsuite/sim/arm/thumb/allthumb.exp sim/testsuite/sim/arm/thumb/and.cgs sim/testsuite/sim/arm/thumb/asr.cgs sim/testsuite/sim/arm/thumb/b.cgs sim/testsuite/sim/arm/thumb/bcc.cgs sim/testsuite/sim/arm/thumb/bcs.cgs sim/testsuite/sim/arm/thumb/beq.cgs sim/testsuite/sim/arm/thumb/bge.cgs sim/testsuite/sim/arm/thumb/bgt.cgs sim/testsuite/sim/arm/thumb/bhi.cgs sim/testsuite/sim/arm/thumb/bic.cgs sim/testsuite/sim/arm/thumb/bl-hi.cgs sim/testsuite/sim/arm/thumb/bl-lo.cgs sim/testsuite/sim/arm/thumb/ble.cgs sim/testsuite/sim/arm/thumb/bls.cgs sim/testsuite/sim/arm/thumb/blt.cgs sim/testsuite/sim/arm/thumb/bmi.cgs sim/testsuite/sim/arm/thumb/bne.cgs sim/testsuite/sim/arm/thumb/bpl.cgs sim/testsuite/sim/arm/thumb/bvc.cgs sim/testsuite/sim/arm/thumb/bvs.cgs sim/testsuite/sim/arm/thumb/bx-hs.cgs sim/testsuite/sim/arm/thumb/bx-rs.cgs sim/testsuite/sim/arm/thumb/cmn.cgs sim/testsuite/sim/arm/thumb/cmp-hd-hs.cgs sim/testsuite/sim/arm/thumb/cmp-hd-rs.cgs sim/testsuite/sim/arm/thumb/cmp-rd-hs.cgs sim/testsuite/sim/arm/thumb/cmp.cgs sim/testsuite/sim/arm/thumb/eor.cgs sim/testsuite/sim/arm/thumb/lda-pc.cgs sim/testsuite/sim/arm/thumb/lda-sp.cgs sim/testsuite/sim/arm/thumb/ldmia.cgs sim/testsuite/sim/arm/thumb/ldr-imm.cgs sim/testsuite/sim/arm/thumb/ldr-pc.cgs sim/testsuite/sim/arm/thumb/ldr-sprel.cgs sim/testsuite/sim/arm/thumb/ldr.cgs sim/testsuite/sim/arm/thumb/ldrb-imm.cgs sim/testsuite/sim/arm/thumb/ldrb.cgs sim/testsuite/sim/arm/thumb/ldrh-imm.cgs sim/testsuite/sim/arm/thumb/ldrh.cgs sim/testsuite/sim/arm/thumb/ldsb.cgs sim/testsuite/sim/arm/thumb/ldsh.cgs sim/testsuite/sim/arm/thumb/lsl.cgs sim/testsuite/sim/arm/thumb/lsr.cgs sim/testsuite/sim/arm/thumb/mov-hd-hs.cgs sim/testsuite/sim/arm/thumb/mov-hd-rs.cgs sim/testsuite/sim/arm/thumb/mov-rd-hs.cgs sim/testsuite/sim/arm/thumb/mov.cgs sim/testsuite/sim/arm/thumb/mul.cgs sim/testsuite/sim/arm/thumb/mvn.cgs sim/testsuite/sim/arm/thumb/neg.cgs sim/testsuite/sim/arm/thumb/orr.cgs sim/testsuite/sim/arm/thumb/pop-pc.cgs sim/testsuite/sim/arm/thumb/pop.cgs sim/testsuite/sim/arm/thumb/push-lr.cgs sim/testsuite/sim/arm/thumb/push.cgs sim/testsuite/sim/arm/thumb/ror.cgs sim/testsuite/sim/arm/thumb/sbc.cgs sim/testsuite/sim/arm/thumb/stmia.cgs sim/testsuite/sim/arm/thumb/str-imm.cgs sim/testsuite/sim/arm/thumb/str-sprel.cgs sim/testsuite/sim/arm/thumb/str.cgs sim/testsuite/sim/arm/thumb/strb-imm.cgs sim/testsuite/sim/arm/thumb/strb.cgs sim/testsuite/sim/arm/thumb/strh-imm.cgs sim/testsuite/sim/arm/thumb/strh.cgs sim/testsuite/sim/arm/thumb/sub-sp.cgs sim/testsuite/sim/arm/thumb/sub.cgs sim/testsuite/sim/arm/thumb/subi.cgs sim/testsuite/sim/arm/thumb/subi8.cgs sim/testsuite/sim/arm/thumb/swi.cgs sim/testsuite/sim/arm/thumb/testutils.inc sim/testsuite/sim/arm/thumb/tst.cgs sim/testsuite/sim/arm/tst.cgs sim/testsuite/sim/arm/umlal.cgs sim/testsuite/sim/arm/umull.cgs sim/testsuite/sim/arm/xscale/blx.cgs sim/testsuite/sim/arm/xscale/mia.cgs sim/testsuite/sim/arm/xscale/miaph.cgs sim/testsuite/sim/arm/xscale/miaxy.cgs sim/testsuite/sim/arm/xscale/mra.cgs sim/testsuite/sim/arm/xscale/testutils.inc sim/testsuite/sim/arm/xscale/xscale.exp Delete: gdb/mi/gdbmi.texinfo
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog499
-rw-r--r--gdb/MAINTAINERS1
-rw-r--r--gdb/Makefile.in34
-rw-r--r--gdb/NEWS3
-rw-r--r--gdb/ada-lang.c1
-rw-r--r--gdb/alpha-tdep.c10
-rw-r--r--gdb/arm-linux-tdep.c2
-rw-r--r--gdb/arm-tdep.c310
-rw-r--r--gdb/avr-tdep.c12
-rw-r--r--gdb/breakpoint.c3
-rw-r--r--gdb/c-lang.c4
-rw-r--r--gdb/config/i386/tm-symmetry.h2
-rw-r--r--gdb/config/pa/hppabsd.mh8
-rw-r--r--gdb/config/pa/hppabsd.mt6
-rw-r--r--gdb/config/pa/hppaosf.mh10
-rw-r--r--gdb/config/pa/hppaosf.mt6
-rw-r--r--gdb/config/pa/hppapro.mt6
-rw-r--r--gdb/config/pa/nm-hppab.h246
-rw-r--r--gdb/config/pa/nm-hppah.h7
-rw-r--r--gdb/config/pa/nm-hppao.h86
-rw-r--r--gdb/config/pa/tm-hppa.h5
-rw-r--r--gdb/config/pa/tm-hppa64.h9
-rw-r--r--gdb/config/pa/tm-hppab.h94
-rw-r--r--gdb/config/pa/tm-hppao.h196
-rw-r--r--gdb/config/pa/tm-pro.h28
-rw-r--r--gdb/config/pa/xm-hppab.h48
-rw-r--r--gdb/config/pa/xm-hppah.h2
-rw-r--r--gdb/config/pa/xm-pa.h10
-rw-r--r--gdb/config/sparc/tm-sp64.h18
-rw-r--r--gdb/config/sparc/tm-sparc.h2
-rw-r--r--gdb/configure.host4
-rw-r--r--gdb/configure.tgt6
-rw-r--r--gdb/cris-tdep.c24
-rw-r--r--gdb/d10v-tdep.c135
-rw-r--r--gdb/doc/ChangeLog40
-rw-r--r--gdb/doc/Makefile.in2
-rw-r--r--gdb/doc/gdb.texinfo4566
-rw-r--r--gdb/doc/gdbint.texinfo47
-rw-r--r--gdb/doc/observer.texi18
-rw-r--r--gdb/dummy-frame.c13
-rw-r--r--gdb/dummy-frame.h4
-rw-r--r--gdb/f-lang.c1
-rw-r--r--gdb/findvar.c4
-rw-r--r--gdb/frame-base.c154
-rw-r--r--gdb/frame-base.h94
-rw-r--r--gdb/frame.c63
-rw-r--r--gdb/frame.h17
-rw-r--r--gdb/frv-tdep.c14
-rw-r--r--gdb/gdbarch.c346
-rw-r--r--gdb/gdbarch.h201
-rwxr-xr-xgdb/gdbarch.sh28
-rw-r--r--gdb/h8300-tdep.c14
-rw-r--r--gdb/hppa-hpux-tdep.c1
-rw-r--r--gdb/hppa-tdep.c7
-rw-r--r--gdb/hppah-nat.c8
-rw-r--r--gdb/hpread.c19
-rw-r--r--gdb/i386-tdep.c23
-rw-r--r--gdb/ia64-tdep.c16
-rw-r--r--gdb/infcmd.c72
-rw-r--r--gdb/inferior.h31
-rw-r--r--gdb/infrun.c74
-rw-r--r--gdb/infttrace.c10
-rw-r--r--gdb/jv-lang.c8
-rw-r--r--gdb/language.c26
-rw-r--r--gdb/language.h7
-rw-r--r--gdb/lin-lwp.c231
-rw-r--r--gdb/linux-proc.c205
-rw-r--r--gdb/m2-lang.c1
-rw-r--r--gdb/m68hc11-tdep.c12
-rw-r--r--gdb/m68k-tdep.c5
-rw-r--r--gdb/maint.c13
-rw-r--r--gdb/mcore-tdep.c14
-rw-r--r--gdb/mi/ChangeLog14
-rw-r--r--gdb/mi/gdbmi.texinfo3902
-rw-r--r--gdb/mi/mi-cmd-file.c67
-rw-r--r--gdb/mi/mi-cmds.c1
-rw-r--r--gdb/mi/mi-cmds.h1
-rw-r--r--gdb/mi/mi-getopt.c16
-rw-r--r--gdb/mi/mi-getopt.h20
-rw-r--r--gdb/mips-tdep.c31
-rw-r--r--gdb/mn10300-tdep.c14
-rw-r--r--gdb/ns32k-tdep.c6
-rw-r--r--gdb/objc-exp.y3
-rw-r--r--gdb/objc-lang.c3
-rw-r--r--gdb/objc-lang.h2
-rw-r--r--gdb/p-lang.c1
-rw-r--r--gdb/printcmd.c15
-rw-r--r--gdb/regcache.c18
-rw-r--r--gdb/remote.h3
-rw-r--r--gdb/rs6000-tdep.c22
-rw-r--r--gdb/s390-tdep.c13
-rw-r--r--gdb/scm-lang.c1
-rw-r--r--gdb/sh-tdep.c15
-rw-r--r--gdb/signals/signals.c21
-rw-r--r--gdb/somread.c4
-rw-r--r--gdb/somsolib.h12
-rw-r--r--gdb/sparc-tdep.c24
-rw-r--r--gdb/symfile.c2
-rw-r--r--gdb/symtab.h10
-rw-r--r--gdb/testsuite/ChangeLog44
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp18
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp6
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp4
-rw-r--r--gdb/testsuite/gdb.base/list.exp5
-rw-r--r--gdb/testsuite/gdb.base/pointers.exp39
-rw-r--r--gdb/testsuite/gdb.base/ptype.c3
-rw-r--r--gdb/testsuite/gdb.base/ptype.exp4
-rw-r--r--gdb/testsuite/gdb.base/sizeof.c1
-rw-r--r--gdb/testsuite/gdb.base/sizeof.exp2
-rw-r--r--gdb/testsuite/gdb.c++/casts.exp7
-rw-r--r--gdb/testsuite/gdb.mi/mi-file.exp65
-rw-r--r--gdb/testsuite/lib/gdb.exp12
-rw-r--r--gdb/testsuite/lib/mi-support.exp8
-rw-r--r--gdb/thread.c64
-rw-r--r--gdb/utils.c17
-rw-r--r--gdb/v850-tdep.c13
-rw-r--r--gdb/valops.c89
-rw-r--r--gdb/value.h10
-rw-r--r--gdb/vax-tdep.c6
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/x86-64-tdep.c4
-rw-r--r--gdb/xstormy16-tdep.c14
122 files changed, 7241 insertions, 5683 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a0f277072b1..e5d2ce6ac28 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,65 @@
-2003-03-26 Andrew Cagney <cagney@redhat.com>
+2003-04-02 Bob Rossi <bob_rossi@cox.net>
+
+ * Makefile.in (SUBDIR_MI_OBS): Add "mi-cmd-file.o".
+ (SUBDIR_MI_SRCS): Add "mi-cmd-file.c".
+ (mi-cmd-file.o): Update dependencies.
+
+2003-04-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_dwarf_dwarf2_ecoff_reg_to_regnum)
+ (mips_stab_reg_to_regnum): Add mappings for HI_REGNUM and LO_REGNUM.
+
+2003-04-01 Adam Fedor <fedor@gnu.org>
+
+ * Makefile.in (c_lang.o, jv_lang.o, language.o): Add $(demangle_h).
+ * language.h (struct language_defn): Add la_demangle.
+ (language_demangle): Declare.
+ * language.c (language_demangle): New function.
+ (unk_lang_demangle): Likewise.
+ (unknown_language_defn, auto_language_defn, local_language_defn):
+ Add ukn_lang_demangle.
+ * ada-lang.c (ada_language_defn): Add NULL for la_demangle element.
+ * f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
+ * c-lang.c (c_language_defn, asm_language_defn): Likewise.
+ (cplus_language_defn): Add cplus_demangle for la_demangle element.
+ * jv-lang.c (java_demangle): New function
+ (java_language_defn): Use it for la_demangle element.
+ * objc-lang.c (objc_demangle): Add options argument
+ (objc_language_defn): Use objc_demangle for la_demangle element.
+ * maint.c (maintenance_demangle): Replace switch with
+ call to language_demangle.
+ * utils.c (fprintf_symbol_filtered): Likewise.
+
+2003-04-01 Andrew Cagney <cagney@redhat.com>
+
+ * printcmd.c (print_frame_nameless_args): Delete #ifdef
+ NAMELESS_ARG_VALUE, PRINT_NAMELESS_INTEGER and
+ PRINT_TYPELESS_INTEGER.
+ * config/sparc/tm-sp64.h (DEPRECATED_PUSH_RETURN_ADDRESS): Rename
+ PUSH_RETURN_ADDRESS.
+
+2003-04-01 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (d10v-tdep.o): Update dependencies.
+ * d10v-tdep.c: Include "frame-base.h".
+ (d10v_frame_unwind): Make constant.
+ (d10v_frame_base_address): New function.
+ (d10v_frame_base): New variable.
+ (d10v_gdbarch_init): Set frame_base default.
+ (struct d10v_unwind_cache): Add the field "prev_sp". Update
+ comment for base.
+ (d10v_frame_unwind_cache): Set and use "prev_sp".
+ (d10v_frame_this_id): Use the previous frame's inner most stack
+ address and this frame's func address for the frame ID. Use
+ frame_id_build. Don't analyze beyond the current instruction.
+
+2003-04-01 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (get_frame_locals_address, get_frame_args_address):
+ Refer to the base address, instead of the address of the first
+ local or parameter.
+
+2003-04-01 Andrew Cagney <cagney@redhat.com>
Add frame debug info addresses:
* frame-base.c: New file.
@@ -14,27 +75,437 @@
(get_frame_locals_address): New function.
(get_frame_base_address): New function.
(get_frame_args_address): New function.
- * findvar.c (read_var_value): Use get_frame_locals_address.
+ * findvar.c (read_var_value): Use get_frame_locals_address and
+ get_frame_args_address.
* stack.c (frame_info): Use get_frame_locals_address and
get_frame_args_address.
(FRAME_ARGS_ADDRESS_CORRECT): Delete conditionally defined macro,
moved to "frame-base.c".
- * Makefile.in (frame_base_h): Define.
- (frame.o): Update dependencies.
- (d10v-tdep.o): Update dependencies.
- (frame-base.o): Add dependencies.
- (SFILES): Add frame-base.c.
- (COMMON_OBS): Add frame-base.o.
* printcmd.c (print_frame_nameless_args): Ditto.
* symtab.h (address_class): Update comments.
* dwarf2loc.c (dwarf_expr_frame_base): Add note about
get_frame_base_address.
* dwarf2expr.c (execute_stack_op): Ditto.
- * d10v-tdep.c: Include "frame-base.h".
- (d10v_frame_unwind): Make constant.
- (d10v_frame_base_address): New function.
- (d10v_frame_base): New variable.
- (d10v_gdbarch_init): Set frame_base default.
+ * Makefile.in (frame_base_h): Define.
+ (frame.o): Update dependencies.
+ (frame-base.o): Add dependencies.
+ (SFILES): Add frame-base.c.
+ (COMMON_OBS): Add frame-base.o.
+
+2003-04-01 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (CALL_DUMMY_START_OFFSET): Default to zero.
+ CALL_DUMMY_LENGTH): Ditto.
+ * gdbarch.c: Re-generate.
+ * inferior.h (CALL_DUMMY_START_OFFSET): Delete macro.
+ (CALL_DUMMY_LENGTH): Delete macro.
+ * alpha-tdep.c (alpha_gdbarch_init): Do not set above when zero.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * hppa-tdep.c (hppa_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * vax-tdep.c (vax_gdbarch_init): Ditto.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+
+2003-04-01 Corinna Vinschen <vinschen@redhat.com>
+
+ * frame.c (get_prev_frame): Disable call to inside_entry_file().
+
+2003-04-01 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (CALL_DUMMY_BREAKPOINT_OFFSET): Default to zero.
+ (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * config/sparc/tm-sp64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete.
+ (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete.
+ * config/pa/tm-hppa64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete.
+ * inferior.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete.
+ (CALL_DUMMY_BREAKPOINT_OFFSET): Delete.
+ * infcmd.c (run_stack_dummy): Simplify assuming
+ CALL_DUMMY_BREAKPOINT_OFFSET_P.
+ * infrun.c (handle_inferior_event): Ditto.
+ * alpha-tdep.c (alpha_gdbarch_init): Do not set
+ call_dummy_breakpoint_offset or call_dummy_breakpoint_offset_p.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * m68k-tdep.c (m68k_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * vax-tdep.c (vax_gdbarch_init): Ditto.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+
+2003-04-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * symfile.c (symfile_relocate_debug_section): Update call to
+ bfd_simple_get_relocated_section_contents.
+
+2003-03-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (FIX_CALL_DUMMY): Change to function with predicate.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * inferior.h (FIX_CALL_DUMMY): Delete macro.
+ * valops.c (hand_function_call): Only call FIX_CALL_DUMMY when
+ available.
+ * frame.h (generic_fix_call_dummy): Delete declaration.
+ * dummy-frame.h: Update comment.
+ * dummy-frame.c (generic_fix_call_dummy): Delete function.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ fix_call_dummy.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+
+2003-03-31 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/tm-hppa64.h (FRAME_ARGS_ADDRESS): Delete macro, not useful.
+ (INIT_FRAME_AP): Likewise.
+ (EXTRA_FRAME_INFO): Likewise.
+
+2003-03-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Include "symfile.h".
+ (CALL_DUMMY_ADDRESS): Default to entry_point_address.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * inferior.h (CALL_DUMMY_ADDRESS): Delete macro.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ call_dummy_address, the default is at entry_point_address.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+
+2003-03-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (CALL_DUMMY_P): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * inferior.h (CALL_DUMMY_P): Delete macro.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * breakpoint.c (deprecated_frame_in_dummy): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * dummy-frame.c (dummy_frame_this_id): Update comments.
+ * rs6000-tdep.c (rs6000_extract_struct_value_address): Ditto.
+ * frame.c (legacy_get_prev_frame): Ditto.
+ * valops.c (call_function_by_hand): Delete function.
+ (hand_function_call): Rename to call_function_by_hand
+
+2003-03-30 Andrew Cagney <cagney@redhat.com>
+
+ 2002-11-10 Klee Dienes <kdienes@apple.com>
+ * value.h (struct value): Update comment.
+
+2003-03-30 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c: Replace _FP_REGNUM and FP_REGNUM with
+ D10V_FP_REGNUM.
+ (d10v_gdbarch_init): Do not set fp_regnum.
+
+ * frame.c (get_frame_base): Force ID initialization.
+ (get_prev_frame): Move computation of the frame ID from here ...
+ (get_frame_id): ... to here.
+ (legacy_get_prev_frame): Mark the frame ID as valid.
+ * frame.h (struct frame_info): Add field "id_p".
+
+2003-03-30 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_store_struct_return): Removed.
+ (i386_gdbarch_init): Don't set deprecated_store_struct_return.
+
+2003-03-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_DUMMY_WRITE_SP): Replace TARGET_WRITE_SP.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * v850-tdep.c (v850_gdbarch_init): Set deprecated_dummy_write_sp.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68k-tdep.c (m68k_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * vax-tdep.c (vax_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * alpha-tdep.c (alpha_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_push_dummy_frame, sparc_pop_frame): Update.
+ * config/sparc/tm-sp64.h (DEPRECATED_DUMMY_WRITE_SP): Update.
+ * config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Define.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * valops.c (hand_function_call): Replace TARGET_WRITE_SP with
+ DEPRECATED_DUMMY_WRITE_SP. Call when the method is available,
+ instead of when push_dummy_call is not available.
+
+2003-03-30 Andrew Cagney <cagney@redhat.com>
+
+ * infttrace.c: Include "gdbthread.h".
+ (parent_attach_all): Fix function signature.
+ (call_ptrace): Update call.
+ * Makefile.in (infttrace.o): Update dependencies.
+
+2003-03-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_PUSH_RETURN_ADDRESS): Replace
+ PUSH_RETURN_ADDRESS.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_init_abi): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * valops.c (hand_function_call): Update.
+
+2003-03-29 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (d10v_gdbarch_init): Do not set call_dummy_words or
+ sizeof_call_dummy_words.
+ * gdbarch.sh (CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS): Always
+ define.
+ * gdbarch.h: Regenerate.
+
+2003-03-29 Andrew Cagney <cagney@redhat.com>
+
+ * infttrace.h: New file.
+ * hpread.c: Include "gdb_assert.h" and "somsolib.h".
+ (hpread_get_textlow): Detect an uninitialized dn_bufp.
+ (hpread_read_doc_function_type): Detect an initialized type1.
+ (hpread_quick_traverse): Initialize mod_name_string.
+ * somsolib.h: Add #ifdef SOMSOLIB_H wrapper.
+ (som_solib_get_solib_by_pc): Declare.
+ (so_lib_thread_start_addr): Declare.
+ (no_shared_libraries): Declare.
+ * somread.c (init_import_symbols): Make static. Add forward
+ declaration.
+ * config/pa/nm-hppah.h: Include "infttrace.h" for
+ parent_attach_all.
+ (hppa_insert_hw_watchpoint): Declare.
+ (hppa_can_use_hw_watchpoint, hppa_remove_hw_watchpoint): Declare.
+ * hppah-nat.c: Include "gdb_string.h".
+ (parent_attach_all): Delete extern declaration, moved to
+ "infttrace.h".
+ (hppa_can_use_hw_watchpoint): Change type of "type" parameter to
+ int.
+ (hppa_remove_hw_watchpoint, hppa_insert_hw_watchpoint): Ditto.
+ * Makefile.in (infttrace_h): Define.
+ (hpread.o): Update dependencies.
+ (hppah-nat.o, hppa-hpux-tdep.o, hppa-tdep.o): Ditto.
+ * hppa-hpux-tdep.c: Include "gdb_string.h".
+ * hppa-tdep.c (hppa_frame_saved_pc): Initialize "old_pc".
+ * infrun.c (handle_inferior_event): Always initialize
+ stepped_after_stopped_by_watchpoint. Add default and remove
+ fallthrough in switch statement.
+ * infttrace.c (hppa_can_use_hw_watchpoint): Change type of "type"
+ parameter to int.
+ (hppa_remove_hw_watchpoint): Ditto.
+
+2003-03-29 Andrew Cagney <cagney@redhat.com>
+
+ * ns32k-tdep.c (ns32k_gdbarch_init): Set the call dummy breakpoint
+ offset.
+
+2003-03-29 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_push_arguments): Delete.
+ (struct stack_item): New type.
+ (push_stack_item, pop_stack_item, arm_push_dummy_call): New functions.
+ (arm_store_struct_return): Delte.
+ (arm_gdbarch_init): Register arm_push_dummy_call. Don't register
+ arm_push_arguments or arm_store_struct_return.
+
+2003-03-28 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (d10v-tdep.o): Update dependencies.
+ * remote.h (target_resume_hook, target_wait_loop_hook): Declare.
+ * d10v-tdep.c: Include "remote.h".
+ (target_resume_hook): Delete extern declaration.
+ (target_wait_loop_hook): Ditto.
+ (tdisassemble_command): Eliminate assignment in "if" conditional.
+ (d10v_ts2_register_sim_regno): Eliminate call to
+ legacy_register_sim_regno.
+ (d10v_ts3_register_sim_regno): Ditto.
+
+2003-03-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread.c: Reindented.
+ * lin-lwp.c: Ditto.
+ * linux-proc.c: Ditto.
+
+2003-03-28 Bob Rossi <bob_rossi@cox.net>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2003-03-27 Theodore A. Roth <troth@openavr.org>
+
+ * objc-exp.y: Add missing semi-colons.
+
+2003-03-27 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (write_sp): Delete function and references.
+ * inferior.h (write_sp): Delete declaration.
+ * valops.c (hand_function_call): Replace write_sp with
+ TARGET_WRITE_SP.
+ * sparc-tdep.c (sparc_push_dummy_frame): Ditto.
+ (sparc_pop_frame): Ditto.
+
+2003-03-27 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention removal of support for hppa*-*-bsd* and
+ hppa*-*-osf* natives, and hppa*-*-pro* target.
+ * config/pa/xm-hppah.h: Do not include "pa/xm-pa.h".
+ * config/pa/xm-pa.h: Obsolete file.
+ * config/pa/xm-hppab.h: Obsolete file.
+ * config/pa/nm-hppab.h: Obsolete file.
+ * config/pa/tm-hppab.h: Obsolete file.
+ * config/pa/tm-hppao.h: Obsolete file.
+ * config/pa/nm-hppao.h: Obsolete file.
+ * config/pa/tm-pro.h: Obsolete file.
+ * config/pa/hppaosf.mt: Obsolete file.
+ * config/pa/hppaosf.mh: Obsolete file.
+ * config/pa/hppapro.mt: Obsolete file.
+ * config/pa/hppabsd.mt: Obsolete file.
+ * config/pa/hppabsd.mh: Obsolete file.
+ * configure.host: Disable hppa*-*-bsd* and hppa*-*-osf*.
+ * configure.tgt: Disable hppa*-*-bsd*, hppa*-*-pro* and
+ hppa*-*-osf*.
+
+2003-03-27 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (d10v_gdbarch_init): Set push_dummy_call instead of
+ push_arguments. Don't set push_return_address or write_sp.
+ (d10v_push_dummy_call): Replace d10v_push_arguments.
+ (d10v_push_return_address, d10v_write_sp): Delete function,
+ handled by push_dummy_call.
+
+2003-03-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_PUSH_ARGUMENTS): Rename PUSH_ARGUMENTS.
+ (push_dummy_call): New pure multi-arch replacement with gdbarch,
+ regcache and dummy_addr parameters.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * valops.c (hand_function_call): Use gdbarch_push_dummy_call when
+ available; assume it will handle stack alignment and return
+ address issues. Fall back to DEPRECATED_PUSH_ARGUMENTS and
+ legacy_push_arguments.
+ (legacy_push_arguments): Rename default_push_arguments.
+ * value.h (legacy_push_arguments): Rename default_push_arguments.
+ * i386-tdep.c (i386_push_arguments): Call legacy_push_arguments.
+ * config/sparc/tm-sparc.h (DEPRECATED_PUSH_ARGUMENTS): Update.
+ * config/sparc/tm-sp64.h (DEPRECATED_PUSH_ARGUMENTS): Update.
+ * config/pa/tm-hppa.h (DEPRECATED_PUSH_ARGUMENTS): Update.
+ * config/i386/tm-symmetry.h: Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_init_abi): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * hppa-tdep.c (hppa_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * arm-linux-tdep.c (arm_linux_init_abi): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+
+2003-03-26 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals/signals.c (do_target_signal_to_host): Correct realtime
+ signal range test.
2003-03-26 Daniel Jacobowitz <drow@mvista.com>
@@ -78,7 +549,7 @@
* objc-lang.c (objc_skip_trampoline): New function.
(objc_language_defn): Add objc_skip_trampoline.
-I2003-03-25 Andrew Cagney <cagney@redhat.com>
+2003-03-25 Andrew Cagney <cagney@redhat.com>
* frame.c (get_prev_frame): Delay validating a frame's ID -
non-NULL, didn't go backwards - until an attempt to unwind it to
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 0adfcb6ea28..15a0ea826c1 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -367,6 +367,7 @@ Hans-Peter Nilsson hp@bitrange.com
David O'Brien obrien@freebsd.org
Alexandre Oliva aoliva@redhat.com
Tom Rix trix@redhat.com
+Bob Rossi bob_rossi@cox.net
Theodore A. Roth troth@verinet.com
Ian Roxborough irox@redhat.com
Grace Sainsbury graces@redhat.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 5449392c4d9..c5ba5d84218 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -168,14 +168,14 @@ SUBDIR_CLI_UNINSTALL=
SUBDIR_MI_OBS = \
mi-out.o mi-console.o \
mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
- mi-cmd-disas.o \
+ mi-cmd-file.o mi-cmd-disas.o \
mi-interp.o \
mi-main.o mi-parse.o mi-getopt.o
SUBDIR_MI_SRCS = \
mi/mi-out.c mi/mi-console.c \
mi/mi-cmds.c mi/mi-cmd-env.c \
mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
- mi/mi-cmd-disas.c \
+ mi/mi-cmd-file.c mi/mi-cmd-disas.c \
mi/mi-interp.c \
mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
SUBDIR_MI_DEPS =
@@ -724,6 +724,7 @@ symtab_h = symtab.h
target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
terminal_h = terminal.h
top_h = top.h
+infttrace_h = infttrace.h
tracepoint_h = tracepoint.h
typeprint_h = typeprint.h
ui_file_h = ui-file.h
@@ -1570,7 +1571,8 @@ builtin-regs.o: builtin-regs.c $(defs_h) $(builtin_regs_h) $(gdbtypes_h) \
$(gdb_string_h) $(gdb_assert_h)
c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \
- $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h)
+ $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \
+ $(demangle_h)
c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
$(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
@@ -1625,7 +1627,8 @@ d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
$(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \
$(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \
- $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) $(gdb_assert_h)
+ $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \
+ $(gdb_assert_h)
dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
@@ -1708,7 +1711,7 @@ frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
$(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \
$(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \
$(command_h) $(gdbcmd_h)
-frame-base.o: frame-base.c $(defs_h) $(frame_base_h)
+frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h)
frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(gdb_assert_h) $(dummy_frame_h) $(legacy_frame_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
@@ -1748,11 +1751,12 @@ h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
- $(value_h) $(regcache_h) $(completer_h) $(symtab_h) $(a_out_encap_h) \
+ $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \
+ $(gdb_assert_h) $(infttrace_h) $(symtab_h) $(a_out_encap_h) \
$(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \
- $(symfile_h) $(objfiles_h) $(language_h) $(osabi_h) $(gdb_assert_h)
+ $(symfile_h) $(objfiles_h)
hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(osabi_h)
+ $(osabi_h) $(gdb_string_h)
hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(gdb_wait_h) $(regcache_h)
@@ -1761,7 +1765,7 @@ hppam3-nat.o: hppam3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
$(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
$(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
- $(gdb_string_h)
+ $(somsolib_h) $(gdb_assert_h) $(gdb_string_h)
hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
$(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h)
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
@@ -1839,7 +1843,7 @@ infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h)
infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbcore_h)
+ $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) $(gdbcore_h)
interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
$(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \
$(gdb_events_h) $(gdb_assert_h) $(top_h)
@@ -1850,7 +1854,7 @@ irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \
- $(jv_lang_h) $(gdbcore_h) $(block_h)
+ $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h)
jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \
$(c_lang_h) $(cp_abi_h)
@@ -1862,7 +1866,7 @@ kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \
$(kod_h)
language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \
- $(parser_defs_h) $(jv_lang_h)
+ $(parser_defs_h) $(jv_lang_h) $(demangle_h)
lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
$(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
@@ -2117,7 +2121,7 @@ remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
$(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \
$(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
$(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
- $(gdbcore_h)
+ $(gdbcore_h) $(solib_h)
rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h)
rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
@@ -2542,6 +2546,10 @@ mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
$(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
$(mi_getopt_h) $(gdb_events_h) $(gdb_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
+mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \
+ $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
+ $(mi_getopt_h) $(gdb_events_h) $(gdb_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c
mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
$(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h) $(disasm_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
diff --git a/gdb/NEWS b/gdb/NEWS
index eaefeff70e7..0e381d9cef7 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -41,6 +41,9 @@ Mitsubishi M32R/D w/simulator m32r-*-elf*
Z8000 simulator z8k-zilog-none or z8ksim
Matsushita MN10200 w/simulator mn10200-*-*
H8/500 simulator h8500-hitachi-hms or h8500hms
+HP/PA running BSD hppa*-*-bsd*
+HP/PA running OSF/1 hppa*-*-osf*
+HP/PA Pro target hppa*-*-pro*
* REMOVED configurations and files
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index bcb280582de..bc0809d3e2a 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -8081,6 +8081,7 @@ const struct language_defn ada_language_defn = {
ada_val_print, /* Print a value using appropriate syntax */
ada_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
#if 0
{"8#%lo#", "8#", "o", "#"}, /* Octal format info */
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index a6449e1e834..d3b58656e6c 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -67,7 +67,6 @@ static gdbarch_frame_locals_address_ftype alpha_frame_locals_address;
static gdbarch_skip_prologue_ftype alpha_skip_prologue;
static gdbarch_saved_pc_after_call_ftype alpha_saved_pc_after_call;
-static gdbarch_push_arguments_ftype alpha_push_arguments;
static gdbarch_fix_call_dummy_ftype alpha_fix_call_dummy;
static gdbarch_get_longjmp_target_ftype alpha_get_longjmp_target;
@@ -1852,15 +1851,13 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Settings for calling functions in the inferior. */
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_push_arguments (gdbarch, alpha_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, alpha_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, alpha_pop_frame);
/* On the Alpha, the call dummy code is never copied to user space,
stopping the user call is achieved via a bp_call_dummy breakpoint.
But we need a fake CALL_DUMMY definition to enable the proper
call_function_by_hand and to avoid zero length array warnings. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, alpha_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_frame_args_address (gdbarch, alpha_frame_args_address);
@@ -1871,11 +1868,10 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
no need for a dummy on the Alpha. PUSH_ARGUMENTS takes care of all
argument handling and bp_call_dummy takes care of stopping the dummy. */
set_gdbarch_call_dummy_address (gdbarch, alpha_call_dummy_address);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
set_gdbarch_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
set_gdbarch_deprecated_init_frame_pc_first (gdbarch, alpha_init_frame_pc_first);
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 01b45f13f89..fa4d8fa00ca 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -536,7 +536,7 @@ arm_linux_init_abi (struct gdbarch_info info,
/* The following two overrides shouldn't be needed. */
set_gdbarch_deprecated_extract_return_value (gdbarch, arm_linux_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, arm_linux_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, arm_linux_push_arguments);
/* Shared library handling. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index dbe14836d96..21d84887d7a 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1334,137 +1334,6 @@ arm_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
write_register (4, fun);
}
-/* Note: ScottB
-
- This function does not support passing parameters using the FPA
- variant of the APCS. It passes any floating point arguments in the
- general registers and/or on the stack. */
-
-static CORE_ADDR
-arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
-{
- CORE_ADDR fp;
- int argnum;
- int argreg;
- int nstack;
- int simd_argreg;
- int second_pass;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- /* Walk through the list of args and determine how large a temporary
- stack is required. Need to take care here as structs may be
- passed on the stack, and we have to to push them. On the second
- pass, do the store. */
- nstack = 0;
- fp = sp;
- for (second_pass = 0; second_pass < 2; second_pass++)
- {
- /* Compute the FP using the information computed during the
- first pass. */
- if (second_pass)
- fp = sp - nstack;
-
- simd_argreg = 0;
- argreg = ARM_A1_REGNUM;
- nstack = 0;
-
- /* The struct_return pointer occupies the first parameter
- passing register. */
- if (struct_return)
- {
- if (second_pass)
- {
- if (arm_debug)
- fprintf_unfiltered (gdb_stdlog,
- "struct return in %s = 0x%s\n",
- REGISTER_NAME (argreg),
- paddr (struct_addr));
- write_register (argreg, struct_addr);
- }
- argreg++;
- }
-
- for (argnum = 0; argnum < nargs; argnum++)
- {
- int len;
- struct type *arg_type;
- struct type *target_type;
- enum type_code typecode;
- char *val;
-
- arg_type = check_typedef (VALUE_TYPE (args[argnum]));
- len = TYPE_LENGTH (arg_type);
- target_type = TYPE_TARGET_TYPE (arg_type);
- typecode = TYPE_CODE (arg_type);
- val = VALUE_CONTENTS (args[argnum]);
-
- /* If the argument is a pointer to a function, and it is a
- Thumb function, create a LOCAL copy of the value and set
- the THUMB bit in it. */
- if (second_pass
- && TYPE_CODE_PTR == typecode
- && target_type != NULL
- && TYPE_CODE_FUNC == TYPE_CODE (target_type))
- {
- CORE_ADDR regval = extract_address (val, len);
- if (arm_pc_is_thumb (regval))
- {
- val = alloca (len);
- store_address (val, len, MAKE_THUMB_ADDR (regval));
- }
- }
-
- /* Copy the argument to general registers or the stack in
- register-sized pieces. Large arguments are split between
- registers and stack. */
- while (len > 0)
- {
- int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
-
- if (argreg <= ARM_LAST_ARG_REGNUM)
- {
- /* The argument is being passed in a general purpose
- register. */
- if (second_pass)
- {
- CORE_ADDR regval = extract_address (val,
- partial_len);
- if (arm_debug)
- fprintf_unfiltered (gdb_stdlog,
- "arg %d in %s = 0x%s\n",
- argnum,
- REGISTER_NAME (argreg),
- phex (regval, REGISTER_SIZE));
- write_register (argreg, regval);
- }
- argreg++;
- }
- else
- {
- if (second_pass)
- {
- /* Push the arguments onto the stack. */
- if (arm_debug)
- fprintf_unfiltered (gdb_stdlog,
- "arg %d @ 0x%s + %d\n",
- argnum, paddr (fp), nstack);
- write_memory (fp + nstack, val, REGISTER_SIZE);
- }
- nstack += REGISTER_SIZE;
- }
-
- len -= partial_len;
- val += partial_len;
- }
-
- }
- }
-
- /* Return the bottom of the argument list (pointed to by fp). */
- return fp;
-}
-
/* Pop the current frame. So long as the frame info has been
initialized properly (see arm_init_extra_frame_info), this code
works for dummy frames as well as regular frames. I.e, there's no
@@ -1499,6 +1368,161 @@ arm_pop_frame (void)
flush_cached_frames ();
}
+/* When arguments must be pushed onto the stack, they go on in reverse
+ order. The code below implements a FILO (stack) to do this. */
+
+struct stack_item
+{
+ int len;
+ struct stack_item *prev;
+ void *data;
+};
+
+static struct stack_item *
+push_stack_item (struct stack_item *prev, void *contents, int len)
+{
+ struct stack_item *si;
+ si = xmalloc (sizeof (struct stack_item));
+ si->data = malloc (len);
+ si->len = len;
+ si->prev = prev;
+ memcpy (si->data, contents, len);
+ return si;
+}
+
+static struct stack_item *
+pop_stack_item (struct stack_item *si)
+{
+ struct stack_item *dead = si;
+ si = si->prev;
+ xfree (dead->data);
+ xfree (dead);
+ return si;
+}
+
+/* We currently only support passing parameters in integer registers. This
+ conforms with GCC's default model. Several other variants exist and
+ we should probably support some of them based on the selected ABI. */
+
+static CORE_ADDR
+arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
+ CORE_ADDR dummy_addr, int nargs, struct value **args,
+ CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+{
+ int argnum;
+ int argreg;
+ int nstack;
+ struct stack_item *si = NULL;
+
+ /* Set the return address. For the ARM, the return breakpoint is always
+ at DUMMY_ADDR. */
+ /* XXX Fix for Thumb. */
+ regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, dummy_addr);
+
+ /* Walk through the list of args and determine how large a temporary
+ stack is required. Need to take care here as structs may be
+ passed on the stack, and we have to to push them. */
+ nstack = 0;
+
+ argreg = ARM_A1_REGNUM;
+ nstack = 0;
+
+ /* Some platforms require a double-word aligned stack. Make sure sp
+ is correctly aligned before we start. We always do this even if
+ it isn't really needed -- it can never hurt things. */
+ sp &= ~(CORE_ADDR)(2 * REGISTER_SIZE - 1);
+
+ /* The struct_return pointer occupies the first parameter
+ passing register. */
+ if (struct_return)
+ {
+ if (arm_debug)
+ fprintf_unfiltered (gdb_stdlog, "struct return in %s = 0x%s\n",
+ REGISTER_NAME (argreg), paddr (struct_addr));
+ regcache_cooked_write_unsigned (regcache, argreg, struct_addr);
+ argreg++;
+ }
+
+ for (argnum = 0; argnum < nargs; argnum++)
+ {
+ int len;
+ struct type *arg_type;
+ struct type *target_type;
+ enum type_code typecode;
+ char *val;
+
+ arg_type = check_typedef (VALUE_TYPE (args[argnum]));
+ len = TYPE_LENGTH (arg_type);
+ target_type = TYPE_TARGET_TYPE (arg_type);
+ typecode = TYPE_CODE (arg_type);
+ val = VALUE_CONTENTS (args[argnum]);
+
+ /* If the argument is a pointer to a function, and it is a
+ Thumb function, create a LOCAL copy of the value and set
+ the THUMB bit in it. */
+ if (TYPE_CODE_PTR == typecode
+ && target_type != NULL
+ && TYPE_CODE_FUNC == TYPE_CODE (target_type))
+ {
+ CORE_ADDR regval = extract_address (val, len);
+ if (arm_pc_is_thumb (regval))
+ {
+ val = alloca (len);
+ store_address (val, len, MAKE_THUMB_ADDR (regval));
+ }
+ }
+
+ /* Copy the argument to general registers or the stack in
+ register-sized pieces. Large arguments are split between
+ registers and stack. */
+ while (len > 0)
+ {
+ int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
+
+ if (argreg <= ARM_LAST_ARG_REGNUM)
+ {
+ /* The argument is being passed in a general purpose
+ register. */
+ CORE_ADDR regval = extract_address (val, partial_len);
+ if (arm_debug)
+ fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
+ argnum, REGISTER_NAME (argreg),
+ phex (regval, REGISTER_SIZE));
+ regcache_cooked_write_unsigned (regcache, argreg, regval);
+ argreg++;
+ }
+ else
+ {
+ /* Push the arguments onto the stack. */
+ if (arm_debug)
+ fprintf_unfiltered (gdb_stdlog, "arg %d @ sp + %d\n",
+ argnum, nstack);
+ si = push_stack_item (si, val, REGISTER_SIZE);
+ nstack += REGISTER_SIZE;
+ }
+
+ len -= partial_len;
+ val += partial_len;
+ }
+ }
+ /* If we have an odd number of words to push, then decrement the stack
+ by one word now, so first stack argument will be dword aligned. */
+ if (nstack & 4)
+ sp -= 4;
+
+ while (si)
+ {
+ sp -= si->len;
+ write_memory (sp, si->data, si->len);
+ si = pop_stack_item (si);
+ }
+
+ /* Finally, update teh SP register. */
+ regcache_cooked_write_unsigned (regcache, ARM_SP_REGNUM, sp);
+
+ return sp;
+}
+
static void
print_fpu_flags (int flags)
{
@@ -2456,15 +2480,6 @@ arm_store_return_value (struct type *type, struct regcache *regs,
}
}
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-static void
-arm_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (ARM_A1_REGNUM, addr);
-}
-
static int
arm_get_longjmp_target (CORE_ADDR *pc)
{
@@ -2915,22 +2930,10 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->lowest_pc = 0x20;
tdep->jb_pc = -1; /* Longjump support not enabled by default. */
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
-
- set_gdbarch_call_dummy_p (gdbarch, 1);
-
set_gdbarch_call_dummy_words (gdbarch, arm_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
-
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
-
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
- set_gdbarch_push_arguments (gdbarch, arm_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
/* Frame handling. */
set_gdbarch_deprecated_frame_chain_valid (gdbarch, arm_frame_chain_valid);
@@ -2994,7 +2997,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Returning results. */
set_gdbarch_extract_return_value (gdbarch, arm_extract_return_value);
set_gdbarch_store_return_value (gdbarch, arm_store_return_value);
- set_gdbarch_deprecated_store_struct_return (gdbarch, arm_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
set_gdbarch_extract_struct_value_address (gdbarch,
arm_extract_struct_value_address);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 73588375883..9ebc0ce5e22 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1147,7 +1147,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, avr_write_pc);
set_gdbarch_read_fp (gdbarch, avr_read_fp);
set_gdbarch_read_sp (gdbarch, avr_read_sp);
- set_gdbarch_write_sp (gdbarch, avr_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, avr_write_sp);
set_gdbarch_num_regs (gdbarch, AVR_NUM_REGS);
@@ -1168,20 +1168,14 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_print_insn (gdbarch, print_insn_avr);
set_gdbarch_call_dummy_address (gdbarch, avr_call_dummy_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, avr_call_dummy_words);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
/* set_gdbarch_believe_pcc_promotion (gdbarch, 1); // TRoth: should this be set? */
set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
- set_gdbarch_push_arguments (gdbarch, avr_push_arguments);
- set_gdbarch_push_return_address (gdbarch, avr_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, avr_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, avr_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, avr_pop_frame);
set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 443175d6f15..b3494576618 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1684,9 +1684,6 @@ deprecated_frame_in_dummy (struct frame_info *frame)
{
struct breakpoint *b;
- if (!CALL_DUMMY_P)
- return 0;
-
/* This function is used by two files: get_frame_type(), after first
checking that !DEPRECATED_USE_GENERIC_DUMMY_FRAMES; and
sparc-tdep.c, which doesn't yet use generic dummy frames anyway. */
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 4890a2b933e..e492b9a205e 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -31,6 +31,7 @@
#include "gdb_assert.h"
#include "charset.h"
#include "gdb_string.h"
+#include "demangle.h"
extern void _initialize_c_language (void);
static void c_emit_char (int c, struct ui_file * stream, int quoter);
@@ -553,6 +554,7 @@ const struct language_defn c_language_defn =
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
@@ -606,6 +608,7 @@ const struct language_defn cplus_language_defn =
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ cplus_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
@@ -636,6 +639,7 @@ const struct language_defn asm_language_defn =
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h
index a15f45f1c95..ea2229090e7 100644
--- a/gdb/config/i386/tm-symmetry.h
+++ b/gdb/config/i386/tm-symmetry.h
@@ -266,7 +266,7 @@ switch (regno) { \
passes it on the stack. gcc should be fixed in future versions to
adopt native cc conventions. */
-#undef PUSH_ARGUMENTS
+#undef DEPRECATED_PUSH_ARGUMENTS
#undef STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR))
diff --git a/gdb/config/pa/hppabsd.mh b/gdb/config/pa/hppabsd.mh
index d4a152d03e5..e4d0215cdc3 100644
--- a/gdb/config/pa/hppabsd.mh
+++ b/gdb/config/pa/hppabsd.mh
@@ -1,4 +1,4 @@
-# Host: Hewlett-Packard PA-RISC machine, running BSD
-XM_FILE= xm-hppab.h
-NAT_FILE= nm-hppab.h
-NATDEPFILES= hppab-nat.o corelow.o core-aout.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
+# 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
index 0fc0380c26a..e63f9b8074b 100644
--- a/gdb/config/pa/hppabsd.mt
+++ b/gdb/config/pa/hppabsd.mt
@@ -1,3 +1,3 @@
-# Target: HP PA-RISC running bsd
-TDEPFILES= hppa-tdep.o
-TM_FILE= tm-hppab.h
+# 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
index d6dd2822d35..0e82dc10d7c 100644
--- a/gdb/config/pa/hppaosf.mh
+++ b/gdb/config/pa/hppaosf.mh
@@ -1,5 +1,5 @@
-# Host: Hewlett-Packard PA-RISC machine, running BSD
-XM_FILE= xm-hppab.h
-NAT_FILE= nm-hppao.h
-NATDEPFILES= fork-child.o m3-nat.o hppam3-nat.o somread.o hpread.o somsolib.o
-NAT_CLIBS= -lmachid -lnetname -lmach
+# 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
index 675402387b6..4a54c79cfa2 100644
--- a/gdb/config/pa/hppaosf.mt
+++ b/gdb/config/pa/hppaosf.mt
@@ -1,3 +1,3 @@
-# Target: HP PA-RISC running OSF1
-TDEPFILES= hppa-tdep.o
-TM_FILE= tm-hppao.h
+# 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
index 4851b1896e7..cfd99699528 100644
--- a/gdb/config/pa/hppapro.mt
+++ b/gdb/config/pa/hppapro.mt
@@ -1,3 +1,3 @@
-# Target: PA based debug monitor
-TDEPFILES= hppa-tdep.o op50-rom.o w89k-rom.o monitor.o xmodem.o dsrec.o
-TM_FILE= tm-pro.h
+# 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
index d9827dcf790..96dea6e68dd 100644
--- a/gdb/config/pa/nm-hppab.h
+++ b/gdb/config/pa/nm-hppab.h
@@ -1,123 +1,123 @@
-/* HPPA PA-RISC machine native support for BSD, for GDB.
- Copyright 1991, 1992, 1993, 1994, 1995, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "somsolib.h"
-#include "regcache.h"
-
-#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);}
-
-/* 3rd argument to ptrace is supposed to be a caddr_t. */
-
-#define PTRACE_ARG3_TYPE caddr_t
-
-/* HPUX 8.0, in its infinite wisdom, has chosen to prototype ptrace
- with five arguments, so programs written for normal ptrace lose. */
-#define FIVE_ARG_PTRACE
-
-
-/* fetch_inferior_registers is in hppab-nat.c. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* attach/detach works to some extent under BSD and HPUX. So long
- as the process you're attaching to isn't blocked waiting on io,
- blocked waiting on a signal, or in a system call things work
- fine. (The problems in those cases are related to the fact that
- the kernel can't provide complete register information for the
- target process... Which really pisses off GDB.) */
-
-#define ATTACH_DETACH
-
-/* The PA-BSD kernel has support for using the data memory break bit
- to implement fast watchpoints.
-
- Watchpoints on the PA act much like traditional page protection
- schemes, but with some notable differences.
-
- First, a special bit in the page table entry is used to cause
- a trap when a specific page is written to. This avoids having
- to overload watchpoints on the page protection bits. This makes
- it possible for the kernel to easily decide if a trap was caused
- by a watchpoint or by the user writing to protected memory and can
- signal the user program differently in each case.
-
- Second, the PA has a bit in the processor status word which causes
- data memory breakpoints (aka watchpoints) to be disabled for a single
- instruction. This bit can be used to avoid the overhead of unprotecting
- and reprotecting pages when it becomes necessary to step over a watchpoint.
-
-
- When the kernel receives a trap indicating a write to a page which
- is being watched, the kernel performs a couple of simple actions. First
- is sets the magic "disable memory breakpoint" bit in the processor
- status word, it then sends a SIGTRAP to the process which caused the
- trap.
-
- GDB will take control and catch the signal for the inferior. GDB then
- examines the PSW-X bit to determine if the SIGTRAP was caused by a
- watchpoint firing. If so GDB single steps the inferior over the
- instruction which caused the watchpoint to trigger (note because the
- kernel disabled the data memory break bit for one instruction no trap
- will be taken!). GDB will then determines the appropriate action to
- take. (this may include restarting the inferior if the watchpoint
- fired because of a write to an address on the same page as a watchpoint,
- but no write to the watched address occured). */
-
-#define TARGET_HAS_HARDWARE_WATCHPOINTS /* Enable the code in procfs.c */
-
-/* The PA can watch any number of locations, there's no need for it to reject
- anything (generic routines already check that all intermediates are
- in memory). */
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
- ((type) == bp_hardware_watchpoint)
-
-/* When a hardware watchpoint fires off the PC will be left at the
- instruction which caused the watchpoint. It will be necessary for
- GDB to step over the watchpoint.
-
- On a PA running BSD, it is trivial to identify when it will be
- necessary to step over a hardware watchpoint as we can examine
- the PSW-X bit. If the bit is on, then we trapped because of a
- watchpoint, else we trapped for some other reason. */
-#define STOPPED_BY_WATCHPOINT(W) \
- ((W).kind == TARGET_WAITKIND_STOPPED \
- && (W).value.sig == TARGET_SIGNAL_TRAP \
- && ((int) read_register (IPSW_REGNUM) & 0x00100000))
-
-/* The PA can single step over a watchpoint if the kernel has set the
- "X" bit in the processor status word (disable data memory breakpoint
- for one instruction).
-
- The kernel will always set this bit before notifying the inferior
- that it hit a watchpoint. Thus, the inferior can single step over
- the instruction which caused the watchpoint to fire. This avoids
- the traditional need to disable the watchpoint, step the inferior,
- then enable the watchpoint again. */
-#define HAVE_STEPPABLE_WATCHPOINT
-
-/* Use these macros for watchpoint insertion/deletion. */
-/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
-#define target_insert_watchpoint(addr, len, type) hppa_set_watchpoint (addr, len, 1)
-#define target_remove_watchpoint(addr, len, type) hppa_set_watchpoint (addr, len, 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 83871158d35..2cc1e300365 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -117,6 +117,7 @@ extern int hppa_require_detach (int, int);
/* The PA can watch any number of locations (generic routines already check
that all intermediates are in watchable memory locations). */
+extern int hppa_can_use_hw_watchpoint (int type, int cnt, int ot);
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
hppa_can_use_hw_watchpoint(type, cnt, ot)
@@ -198,9 +199,13 @@ extern void hppa_enable_page_protection_events (int);
extern void hppa_disable_page_protection_events (int);
/* Use these macros for watchpoint insertion/deletion. */
+extern int hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
+ int type);
#define target_insert_watchpoint(addr, len, type) \
hppa_insert_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
+extern int hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
+ int type);
#define target_remove_watchpoint(addr, len, type) \
hppa_remove_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
@@ -265,3 +270,5 @@ extern int hppa_resume_execd_vforking_child_to_get_parent_vfork (void);
#define MAY_FOLLOW_EXEC (1)
#define USE_THREAD_STEP_NEEDED (1)
+
+#include "infttrace.h" /* For parent_attach_all. */
diff --git a/gdb/config/pa/nm-hppao.h b/gdb/config/pa/nm-hppao.h
index 6389b2c1868..0a6b810a16e 100644
--- a/gdb/config/pa/nm-hppao.h
+++ b/gdb/config/pa/nm-hppao.h
@@ -1,43 +1,43 @@
-/* HPPA PA-RISC machine native support for Lites, for GDB.
- Copyright 1995, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "config/nm-m3.h"
-#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);}
-
-/* fetch_inferior_registers is in hppab-nat.c. */
-#define FETCH_INFERIOR_REGISTERS
-
-/* attach/detach works to some extent under BSD and HPUX. So long
- as the process you're attaching to isn't blocked waiting on io,
- blocked waiting on a signal, or in a system call things work
- fine. (The problems in those cases are related to the fact that
- the kernel can't provide complete register information for the
- target process... Which really pisses off GDB.) */
-
-#define ATTACH_DETACH
-
-#define EMULATOR_BASE 0x90100000
-#define EMULATOR_END 0x90200000
+// 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 64a4fe1362f..9c26c798258 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -24,6 +24,9 @@
#include "regcache.h"
+/* Wonder if this is correct? Should be using push_dummy_call(). */
+#define DEPRECATED_DUMMY_WRITE_SP(SP) generic_target_write_sp (SP)
+
#define GDB_MULTI_ARCH 0
/* NOTE: cagney/2002-11-24: This is a guess. */
@@ -614,7 +617,7 @@ extern CORE_ADDR hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
struct value **, struct type *, int);
#if !GDB_MULTI_ARCH
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
+#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
(hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
extern CORE_ADDR hppa_push_arguments (int, struct value **, CORE_ADDR, int,
CORE_ADDR);
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index e6177b05943..b2b98e40895 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -122,20 +122,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SR5_REGNUM 48
-#undef FRAME_ARGS_ADDRESS
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->ap)
-
/* We access locals from SP. This may not work for frames which call
alloca; for those, we may need to consult unwind tables.
jimb: FIXME. */
#undef FRAME_LOCALS_ADDRESS
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-#define INIT_FRAME_AP init_frame_ap
-
-#define EXTRA_FRAME_INFO \
- CORE_ADDR ap;
-
/* For a number of horrible reasons we may have to adjust the location
of variables on the stack. Ugh. jimb: why? */
#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
@@ -191,7 +183,6 @@ call_dummy
0xe820f0000fb110d3LL, 0x0001000400151820LL,\
0xe6c0000008000240LL}
-#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1
#define CALL_DUMMY_BREAKPOINT_OFFSET 22 * 4
/* CALL_DUMMY_LENGTH is computed based on the size of a word on the target
diff --git a/gdb/config/pa/tm-hppab.h b/gdb/config/pa/tm-hppab.h
index 1cd438df75e..edacdbfe9b6 100644
--- a/gdb/config/pa/tm-hppab.h
+++ b/gdb/config/pa/tm-hppab.h
@@ -1,47 +1,47 @@
-/* Parameters for execution on an HP PA-RISC machine running BSD, for GDB.
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu). */
-
-/* For BSD:
-
- The signal context structure pointer is always saved at the base
- of the frame + 0x4.
-
- We get the PC & SP directly from the sigcontext structure itself.
- For other registers we have to dive in a little deeper:
-
- The hardware save state pointer is at offset 0x10 within the
- signal context structure.
-
- Within the hardware save state, registers are found in the same order
- as the register numbers in GDB. */
-
-#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-{ \
- *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
- *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
-}
-
-#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-{ \
- *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
- *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
-}
-
-#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-{ \
- int i; \
- CORE_ADDR TMP; \
- TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
- TMP = read_memory_integer (TMP + 0x10, 4); \
- for (i = 0; i < NUM_REGS; i++) \
- { \
- if (i == SP_REGNUM) \
- (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
- else \
- (FSR)->regs[i] = TMP + i * 4; \
- } \
-}
-
-/* It's mostly just the common stuff. */
-#include "pa/tm-hppa.h"
+// OBSOLETE /* Parameters for execution on an HP PA-RISC machine running BSD, for GDB.
+// OBSOLETE Contributed by the Center for Software Science at the
+// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
+// OBSOLETE
+// OBSOLETE /* For BSD:
+// OBSOLETE
+// OBSOLETE The signal context structure pointer is always saved at the base
+// OBSOLETE of the frame + 0x4.
+// OBSOLETE
+// OBSOLETE We get the PC & SP directly from the sigcontext structure itself.
+// OBSOLETE For other registers we have to dive in a little deeper:
+// OBSOLETE
+// OBSOLETE The hardware save state pointer is at offset 0x10 within the
+// OBSOLETE signal context structure.
+// OBSOLETE
+// OBSOLETE Within the hardware save state, registers are found in the same order
+// OBSOLETE as the register numbers in GDB. */
+// OBSOLETE
+// OBSOLETE #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
+// OBSOLETE { \
+// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
+// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
+// OBSOLETE { \
+// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
+// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
+// OBSOLETE { \
+// OBSOLETE int i; \
+// OBSOLETE CORE_ADDR TMP; \
+// OBSOLETE TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
+// OBSOLETE TMP = read_memory_integer (TMP + 0x10, 4); \
+// OBSOLETE for (i = 0; i < NUM_REGS; i++) \
+// OBSOLETE { \
+// OBSOLETE if (i == SP_REGNUM) \
+// OBSOLETE (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
+// OBSOLETE else \
+// OBSOLETE (FSR)->regs[i] = TMP + i * 4; \
+// OBSOLETE } \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* It's mostly just the common stuff. */
+// OBSOLETE #include "pa/tm-hppa.h"
diff --git a/gdb/config/pa/tm-hppao.h b/gdb/config/pa/tm-hppao.h
index e6fae89b85b..a466287ede5 100644
--- a/gdb/config/pa/tm-hppao.h
+++ b/gdb/config/pa/tm-hppao.h
@@ -1,98 +1,98 @@
-/* Parameters for execution on an HP PA-RISC machine running OSF1, for GDB.
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu). */
-
-#include "regcache.h"
-
-/* Define offsets to access CPROC stack when it does not have
- * a kernel thread.
- */
-#define MACHINE_CPROC_SP_OFFSET 20
-#define MACHINE_CPROC_PC_OFFSET 16
-#define MACHINE_CPROC_FP_OFFSET 12
-
-/*
- * Software defined PSW masks.
- */
-#define PSW_SS 0x10000000 /* Kernel managed single step */
-
-/* Thread flavors used in re-setting the T bit.
- * @@ this is also bad for cross debugging.
- */
-#define TRACE_FLAVOR HP800_THREAD_STATE
-#define TRACE_FLAVOR_SIZE HP800_THREAD_STATE_COUNT
-#define TRACE_SET(x,state) \
- ((struct hp800_thread_state *)state)->cr22 |= PSW_SS
-#define TRACE_CLEAR(x,state) \
- ((((struct hp800_thread_state *)state)->cr22 &= ~PSW_SS), 1)
-
-/* For OSF1 (Should be close if not identical to BSD, but I haven't
- tested it yet):
-
- The signal context structure pointer is always saved at the base
- of the frame + 0x4.
-
- We get the PC & SP directly from the sigcontext structure itself.
- For other registers we have to dive in a little deeper:
-
- The hardware save state pointer is at offset 0x10 within the
- signal context structure.
-
- Within the hardware save state, registers are found in the same order
- as the register numbers in GDB. */
-
-#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-{ \
- *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
- *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
-}
-
-#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-{ \
- *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
- *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
-}
-
-#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-{ \
- int i; \
- CORE_ADDR TMP; \
- TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
- TMP = read_memory_integer (TMP + 0x10, 4); \
- for (i = 0; i < NUM_REGS; i++) \
- { \
- if (i == SP_REGNUM) \
- (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
- else \
- (FSR)->regs[i] = TMP + i * 4; \
- } \
-}
-
-/* OSF1 does not need the pc space queue restored. */
-#define NO_PC_SPACE_QUEUE_RESTORE
-
-/* The mach kernel uses the recovery counter to implement single
- stepping. While this greatly simplifies the kernel support
- necessary for single stepping, it unfortunately does the wrong
- thing in the presense of a nullified instruction (gives control
- back two insns after the nullifed insn). This is an artifact
- of the HP architecture (recovery counter doesn't tick for
- nullified insns).
-
- Do our best to avoid losing in such situations. */
-#define INSTRUCTION_NULLIFIED \
-(({ \
- int ipsw = (int)read_register(IPSW_REGNUM); \
- if (ipsw & PSW_N) \
- { \
- int pcoqt = (int)read_register(PCOQ_TAIL_REGNUM); \
- write_register(PCOQ_HEAD_REGNUM, pcoqt); \
- write_register(PCOQ_TAIL_REGNUM, pcoqt + 0x4); \
- write_register(IPSW_REGNUM, ipsw & ~(PSW_N | PSW_B | PSW_X)); \
- stop_pc = pcoqt; \
- } \
- }), 0)
-
-/* It's mostly just the common stuff. */
-
-#include "pa/tm-hppa.h"
+// 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
index 05ecb62f7dc..c4f2b775329 100644
--- a/gdb/config/pa/tm-pro.h
+++ b/gdb/config/pa/tm-pro.h
@@ -1,14 +1,14 @@
-/* Parameters for execution on an HP PA-RISC level 0 embedded system.
- This is based on tm-hppab.h.
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu). */
-
-#define PA_LEVEL_0 /* Disables touching space regs and fp */
-
-/* All the PRO targets use software floating point at the moment. */
-#define SOFT_FLOAT 1
-
-/* It's mostly just the common stuff. */
-#include "pa/tm-hppa.h"
-
-#define GDB_TARGET_IS_PA_ELF
+// 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
index d2561dfcf69..d46e5adc868 100644
--- a/gdb/config/pa/xm-hppab.h
+++ b/gdb/config/pa/xm-hppab.h
@@ -1,24 +1,24 @@
-/* Parameters for hosting on an HPPA PA-RISC machine, running BSD, for GDB.
- Copyright 1991, 1992, 1993, 1996, 1998 Free Software Foundation, Inc.
-
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu).
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "pa/xm-pa.h"
+// 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-hppah.h b/gdb/config/pa/xm-hppah.h
index b1c26dd4de8..a2ed9ba407f 100644
--- a/gdb/config/pa/xm-hppah.h
+++ b/gdb/config/pa/xm-hppah.h
@@ -22,8 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "pa/xm-pa.h"
-
#define USG
#define HAVE_TERMIOS
diff --git a/gdb/config/pa/xm-pa.h b/gdb/config/pa/xm-pa.h
index 979609d4776..0095003da1e 100644
--- a/gdb/config/pa/xm-pa.h
+++ b/gdb/config/pa/xm-pa.h
@@ -1,5 +1,5 @@
-/* Definitions for all PA machines. */
-
-/* This was created for "makeva", which is obsolete. This file can
- probably go away (unless someone can think of some other host thing
- which is common to various pa machines). */
+// 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/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h
index 8abec1c709c..a415b8324e4 100644
--- a/gdb/config/sparc/tm-sp64.h
+++ b/gdb/config/sparc/tm-sp64.h
@@ -96,8 +96,6 @@
#define CALL_DUMMY_START_OFFSET 0
#undef CALL_DUMMY_BREAKPOINT_OFFSET
#define CALL_DUMMY_BREAKPOINT_OFFSET 0
-#undef CALL_DUMMY_BREAKPOINT_OFFSET_P
-#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1
#undef CALL_DUMMY_LOCATION
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
#undef DEPRECATED_PC_IN_CALL_DUMMY
@@ -110,8 +108,8 @@
#define CALL_DUMMY_ADDRESS() entry_point_address()
#undef FIX_CALL_DUMMY
#define FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P)
-#undef PUSH_RETURN_ADDRESS
-#define PUSH_RETURN_ADDRESS(PC, SP) sparc_at_entry_push_return_address (PC, SP)
+#undef DEPRECATED_PUSH_RETURN_ADDRESS
+#define DEPRECATED_PUSH_RETURN_ADDRESS(PC, SP) sparc_at_entry_push_return_address (PC, SP)
extern CORE_ADDR sparc_at_entry_push_return_address (CORE_ADDR pc,
CORE_ADDR sp);
@@ -162,10 +160,6 @@ extern void sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
#undef CALL_DUMMY_BREAKPOINT_OFFSET
#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + (8 * 4))
-/* Let's GDB know that it can make a call_dummy breakpoint. */
-#undef CALL_DUMMY_BREAKPOINT_OFFSET_P
-#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1
-
/* Call dummy will be located on the stack. */
#undef CALL_DUMMY_LOCATION
#define CALL_DUMMY_LOCATION ON_STACK
@@ -182,7 +176,7 @@ void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
/* The remainder of these will accept the default definition. */
#undef SIZEOF_CALL_DUMMY_WORDS
-#undef PUSH_RETURN_ADDRESS
+#undef DEPRECATED_PUSH_RETURN_ADDRESS
#undef CALL_DUMMY_ADDRESS
#undef STORE_STRUCT_RETURN
@@ -208,8 +202,8 @@ void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
CORE_ADDR sparc64_push_arguments (int,
struct value **, CORE_ADDR, int, CORE_ADDR);
-#undef PUSH_ARGUMENTS
-#define PUSH_ARGUMENTS(A,B,C,D,E) \
+#undef DEPRECATED_PUSH_ARGUMENTS
+#define DEPRECATED_PUSH_ARGUMENTS(A,B,C,D,E) \
(sparc64_push_arguments ((A), (B), (C), (D), (E)))
/* Store the address of the place in which to copy the structure the
@@ -274,7 +268,7 @@ extern void sparc64_write_sp (CORE_ADDR);
#define TARGET_READ_SP() (sparc64_read_sp ())
#define TARGET_READ_FP() (sparc64_read_fp ())
-#define TARGET_WRITE_SP(X) (sparc64_write_sp (X))
+#define DEPRECATED_DUMMY_WRITE_SP(X) (sparc64_write_sp (X))
#undef DEPRECATED_EXTRACT_RETURN_VALUE
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 7b11c4fbd58..ef3996232cc 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -688,7 +688,7 @@ void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
void sparc_push_dummy_frame (void);
void sparc_pop_frame (void);
-#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
+#define DEPRECATED_PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
sparc32_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
extern CORE_ADDR sparc32_push_arguments (int, struct value **, CORE_ADDR, int,
diff --git a/gdb/configure.host b/gdb/configure.host
index b309a332a19..98acc7e02af 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -40,13 +40,13 @@ arm*-*-linux*) gdb_host=linux ;;
arm*-*-netbsdelf*) gdb_host=nbsdelf ;;
arm*-*-netbsd*) gdb_host=nbsdaout ;;
-hppa*-*-bsd*) gdb_host=hppabsd ;;
+# OBSOLETE hppa*-*-bsd*) gdb_host=hppabsd ;;
hppa*-*-hiux*) gdb_host=hppahpux ;;
hppa*-*-hpux10.20) gdb_host=hpux1020 ;;
hppa*64*-*-hpux11*) gdb_host=hpux11w ;;
hppa*-*-hpux11*) gdb_host=hpux11 ;;
hppa*-*-hpux*) gdb_host=hppahpux ;;
-hppa*-*-osf*) gdb_host=hppaosf ;;
+# OBSOLETE hppa*-*-osf*) gdb_host=hppaosf ;;
i[3456]86-ncr-*) gdb_host=ncr3000 ;;
i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 17ac70fa170..9a4dba3bf0b 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -73,12 +73,12 @@ h8300-*-*) gdb_target=h8300 ;;
frv-*-*) gdb_target=frv ;;
-hppa*-*-bsd*) gdb_target=hppabsd ;;
-hppa*-*-pro*) gdb_target=hppapro ;;
+# OBSOLETE hppa*-*-bsd*) gdb_target=hppabsd ;;
+# OBSOLETE hppa*-*-pro*) gdb_target=hppapro ;;
hppa*64*-*-hpux11*) gdb_target=hppa64 ;;
hppa*-*-hpux*) gdb_target=hppahpux ;;
hppa*-*-hiux*) gdb_target=hppahpux ;;
-hppa*-*-osf*) gdb_target=hppaosf ;;
+# OBSOLETE hppa*-*-osf*) gdb_target=hppaosf ;;
hppa*-*-*) gdb_target=hppa ;;
i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 8bf06466b7e..4f9ee9b84eb 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4154,7 +4154,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (tdep->cris_abi == CRIS_ABI_ORIGINAL)
{
set_gdbarch_double_bit (gdbarch, 32);
- set_gdbarch_push_arguments (gdbarch, cris_abi_original_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, cris_abi_original_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch,
cris_abi_original_store_return_value);
set_gdbarch_deprecated_extract_return_value
@@ -4165,7 +4165,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else if (tdep->cris_abi == CRIS_ABI_V2)
{
set_gdbarch_double_bit (gdbarch, 64);
- set_gdbarch_push_arguments (gdbarch, cris_abi_v2_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, cris_abi_v2_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, cris_abi_v2_store_return_value);
set_gdbarch_deprecated_extract_return_value
(gdbarch, cris_abi_v2_extract_return_value);
@@ -4255,35 +4255,20 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Use generic dummy frames. */
- /* Where to execute the call in the memory segments. */
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
-
- /* Start execution at the beginning of dummy. */
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
-
- /* Set to 1 since call_dummy_breakpoint_offset was defined. */
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
-
/* Read all about dummy frames in blockframe.c. */
- set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
/* Defined to 1 to indicate that the target supports inferior function
calls. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, 0);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- /* No stack adjustment needed when peforming an inferior function call. */
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
-
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
/* No register requires conversion from raw format to virtual format. */
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
- set_gdbarch_push_return_address (gdbarch, cris_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, cris_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, cris_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, cris_store_struct_return);
@@ -4323,6 +4308,9 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Helpful for backtracing and returning in a call dummy. */
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
/* Use target_specific function to define link map offsets. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, cris_linux_svr4_fetch_link_map_offsets);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 31b49899e96..9d56169d7df 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -39,7 +39,7 @@
#include "language.h"
#include "arch-utils.h"
#include "regcache.h"
-
+#include "remote.h"
#include "floatformat.h"
#include "gdb/sim-d10v.h"
#include "sim-regno.h"
@@ -69,7 +69,7 @@ enum
{
R0_REGNUM = 0,
R3_REGNUM = 3,
- _FP_REGNUM = 11,
+ D10V_FP_REGNUM = 11,
LR_REGNUM = 13,
_SP_REGNUM = 15,
PSW_REGNUM = 16,
@@ -277,8 +277,8 @@ d10v_imap_register (int reg_nr)
static int
d10v_ts2_register_sim_regno (int nr)
{
- if (legacy_register_sim_regno (nr) < 0)
- return legacy_register_sim_regno (nr);
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (nr >= 0 && nr < NUM_REGS);
if (nr >= TS2_IMAP0_REGNUM
&& nr < TS2_IMAP0_REGNUM + NR_IMAP_REGS)
return nr - TS2_IMAP0_REGNUM + SIM_D10V_IMAP0_REGNUM;
@@ -293,8 +293,8 @@ d10v_ts2_register_sim_regno (int nr)
static int
d10v_ts3_register_sim_regno (int nr)
{
- if (legacy_register_sim_regno (nr) < 0)
- return legacy_register_sim_regno (nr);
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (nr >= 0 && nr < NUM_REGS);
if (nr >= TS3_IMAP0_REGNUM
&& nr < TS3_IMAP0_REGNUM + NR_IMAP_REGS)
return nr - TS3_IMAP0_REGNUM + SIM_D10V_IMAP0_REGNUM;
@@ -346,7 +346,7 @@ d10v_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if (reg_nr == PC_REGNUM)
return builtin_type_void_func_ptr;
- if (reg_nr == _SP_REGNUM || reg_nr == _FP_REGNUM)
+ if (reg_nr == _SP_REGNUM || reg_nr == D10V_FP_REGNUM)
return builtin_type_void_data_ptr;
else if (reg_nr >= A0_REGNUM
&& reg_nr < (A0_REGNUM + NR_A_REGS))
@@ -599,7 +599,10 @@ d10v_skip_prologue (CORE_ADDR pc)
struct d10v_unwind_cache
{
CORE_ADDR return_pc;
- /* The frame's base. Used when constructing a frame ID. */
+ /* The previous frame's inner most stack address. Used as this
+ frame ID's stack_addr. */
+ CORE_ADDR prev_sp;
+ /* The frame's base, optionally used by the high-level debug info. */
CORE_ADDR base;
int size;
CORE_ADDR *saved_regs;
@@ -716,10 +719,10 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
info->return_pc = 0;
info->sp_offset = 0;
- pc = get_pc_function_start (frame_pc_unwind (next_frame));
-
info->uses_frame = 0;
- while (1)
+ for (pc = get_pc_function_start (frame_pc_unwind (next_frame));
+ pc < frame_pc_unwind (next_frame);
+ pc += 4)
{
op = (unsigned long) read_memory_integer (pc, 4);
if ((op & 0xC0000000) == 0xC0000000)
@@ -766,7 +769,6 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
|| !prologue_find_regs (info, op2, pc))
break;
}
- pc += 4;
}
info->size = -info->sp_offset;
@@ -777,7 +779,7 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, FP_REGNUM, &this_base);
+ frame_unwind_unsigned_register (next_frame, D10V_FP_REGNUM, &this_base);
/* The FP points at the last saved register. Adjust the FP back
to before the first saved register giving the SP. */
prev_sp = this_base + info->size;
@@ -800,14 +802,14 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
}
info->base = d10v_make_daddr (this_base);
- prev_sp = d10v_make_daddr (prev_sp);
+ info->prev_sp = d10v_make_daddr (prev_sp);
/* Adjust all the saved registers so that they contain addresses and
not offsets. */
for (i = 0; i < NUM_REGS - 1; i++)
if (info->saved_regs[i])
{
- info->saved_regs[i] = (prev_sp + info->saved_regs[i]);
+ info->saved_regs[i] = (info->prev_sp + info->saved_regs[i]);
}
if (info->saved_regs[LR_REGNUM])
@@ -826,7 +828,7 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
/* The SP_REGNUM is special. Instead of the address of the SP, the
previous frame's SP value is saved. */
- info->saved_regs[SP_REGNUM] = prev_sp;
+ info->saved_regs[SP_REGNUM] = info->prev_sp;
return info;
}
@@ -950,30 +952,12 @@ d10v_read_sp (void)
return (d10v_make_daddr (read_register (SP_REGNUM)));
}
-static void
-d10v_write_sp (CORE_ADDR val)
-{
- write_register (SP_REGNUM, d10v_convert_daddr_to_raw (val));
-}
-
static CORE_ADDR
d10v_read_fp (void)
{
- return (d10v_make_daddr (read_register (FP_REGNUM)));
+ return (d10v_make_daddr (read_register (D10V_FP_REGNUM)));
}
-/* Function: push_return_address (pc)
- Set up the return address for the inferior function call.
- Needed for targets where we don't actually execute a JSR/BSR instruction */
-
-static CORE_ADDR
-d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- write_register (LR_REGNUM, d10v_convert_iaddr_to_raw (CALL_DUMMY_ADDRESS ()));
- return sp;
-}
-
-
/* When arguments must be pushed onto the stack, they go on in reverse
order. The below implements a FILO (stack) to do this. */
@@ -1011,20 +995,26 @@ pop_stack_item (struct stack_item *si)
static CORE_ADDR
-d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
+ CORE_ADDR dummy_addr, int nargs, struct value **args,
+ CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
int i;
int regnum = ARG1_REGNUM;
struct stack_item *si = NULL;
long val;
+ /* Set the return address. For the d10v, the return breakpoint is
+ always at DUMMY_ADDR. */
+ regcache_cooked_write_unsigned (regcache, LR_REGNUM,
+ d10v_convert_iaddr_to_raw (dummy_addr));
+
/* If STRUCT_RETURN is true, then the struct return address (in
STRUCT_ADDR) will consume the first argument-passing register.
Both adjust the register count and store that value. */
if (struct_return)
{
- write_register (regnum, struct_addr);
+ regcache_cooked_write_unsigned (regcache, regnum, struct_addr);
regnum++;
}
@@ -1042,7 +1032,7 @@ d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* fits in a single register, do not align */
{
val = extract_unsigned_integer (contents, len);
- write_register (regnum++, val);
+ regcache_cooked_write_unsigned (regcache, regnum++, val);
}
else if (len <= (ARGN_REGNUM - aligned_regnum + 1) * 2)
/* value fits in remaining registers, store keeping left
@@ -1053,12 +1043,12 @@ d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
for (b = 0; b < (len & ~1); b += 2)
{
val = extract_unsigned_integer (&contents[b], 2);
- write_register (regnum++, val);
+ regcache_cooked_write_unsigned (regcache, regnum++, val);
}
if (b < len)
{
val = extract_unsigned_integer (&contents[b], 1);
- write_register (regnum++, (val << 8));
+ regcache_cooked_write_unsigned (regcache, regnum++, (val << 8));
}
}
else
@@ -1076,6 +1066,10 @@ d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
si = pop_stack_item (si);
}
+ /* Finally, update the SP register. */
+ regcache_cooked_write_unsigned (regcache, SP_REGNUM,
+ d10v_convert_daddr_to_raw (sp));
+
return sp;
}
@@ -1348,26 +1342,29 @@ tdisassemble_command (char *arg, int from_tty)
{
int i, count;
CORE_ADDR low, high;
- char *space_index;
if (!arg)
{
low = 0;
high = trace_data.size;
}
- else if (!(space_index = (char *) strchr (arg, ' ')))
- {
- low = parse_and_eval_address (arg);
- high = low + 5;
- }
else
- {
- /* Two arguments. */
- *space_index = '\0';
- low = parse_and_eval_address (arg);
- high = parse_and_eval_address (space_index + 1);
- if (high < low)
- high = low;
+ {
+ char *space_index = strchr (arg, ' ');
+ if (space_index == NULL)
+ {
+ low = parse_and_eval_address (arg);
+ high = low + 5;
+ }
+ else
+ {
+ /* Two arguments. */
+ *space_index = '\0';
+ low = parse_and_eval_address (arg);
+ high = parse_and_eval_address (space_index + 1);
+ if (high < low)
+ high = low;
+ }
}
printf_filtered ("Dump of trace from %s to %s:\n", paddr_u (low), paddr_u (high));
@@ -1456,9 +1453,6 @@ d10v_frame_this_id (struct frame_info *next_frame,
CORE_ADDR base;
CORE_ADDR pc;
- /* Start with a NULL frame ID. */
- (*this_id) = null_frame_id;
-
/* The PC is easy. */
pc = frame_pc_unwind (next_frame);
@@ -1470,7 +1464,7 @@ d10v_frame_this_id (struct frame_info *next_frame,
/* Hopefully the prologue analysis either correctly determined the
frame's base (which is the SP from the previous frame), or set
that base to "NULL". */
- base = info->base;
+ base = info->prev_sp;
if (base == STACK_START || base == 0)
return;
@@ -1484,8 +1478,7 @@ d10v_frame_this_id (struct frame_info *next_frame,
&& get_frame_id (next_frame).base == base)
return;
- this_id->base = base;
- this_id->pc = pc;
+ (*this_id) = frame_id_build (base, pc);
}
static void
@@ -1606,8 +1599,6 @@ static gdbarch_init_ftype d10v_gdbarch_init;
static struct gdbarch *
d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- static LONGEST d10v_call_dummy_words[] =
- {0};
struct gdbarch *gdbarch;
int d10v_num_regs;
struct gdbarch_tdep *tdep;
@@ -1651,11 +1642,9 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, d10v_write_pc);
set_gdbarch_read_fp (gdbarch, d10v_read_fp);
set_gdbarch_read_sp (gdbarch, d10v_read_sp);
- set_gdbarch_write_sp (gdbarch, d10v_write_sp);
set_gdbarch_num_regs (gdbarch, d10v_num_regs);
set_gdbarch_sp_regnum (gdbarch, 15);
- set_gdbarch_fp_regnum (gdbarch, 11);
set_gdbarch_pc_regnum (gdbarch, 18);
set_gdbarch_register_name (gdbarch, d10v_register_name);
set_gdbarch_register_size (gdbarch, 2);
@@ -1696,20 +1685,8 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
"d10v_gdbarch_init: bad byte order for float format");
}
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_words (gdbarch, d10v_call_dummy_words);
- set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (d10v_call_dummy_words));
- set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
-
set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
- set_gdbarch_push_return_address (gdbarch, d10v_push_return_address);
-
+ set_gdbarch_push_dummy_call (gdbarch, d10v_push_dummy_call);
set_gdbarch_store_return_value (gdbarch, d10v_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, d10v_use_struct_convention);
@@ -1746,10 +1723,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
-
-extern void (*target_resume_hook) (void);
-extern void (*target_wait_loop_hook) (void);
-
void
_initialize_d10v_tdep (void)
{
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 3aeadd3ba3c..7c350336a6b 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,43 @@
+2003-04-02 J. Brobecker <brobecker@gnat.com>
+
+ * observer.texi (GDB Observers): Adjust the documentation for the
+ normal_stop notification to better describe reality. Fix a couple
+ of minor typos.
+
+2003-04-02 Bob Rossi <bob_rossi@cox.net>
+
+ * gdb.texinfo (GDB/MI Program Control): Add
+ '-file-list-exec-source-file'
+
+2003-03-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ references to CALL_DUMMY_P.
+
+2003-03-30 Andrew Cagney <cagney@redhat.com>
+
+ * 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
+ references to write_sp.
+
+2003-03-27 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.texinfo (GDB/MI Variable Objects): Replace @include with
+ chapter body. Use @smallexample instead of @example.
+ (Annotations): Ditto.
+ * Makefile.in (GDB_DOC_SOURCE_INCLUDES): Remove gdbmi.texinfo and
+ annotate.texi.
+
+2003-03-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Replace
+ PUSH_ARGUMENTS with push_dummy_call, add gdbarch, regcache and
+ dummy_addr parameters.
+
2003-03-25 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index db74889328c..52213143688 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -98,10 +98,8 @@ DVIPS = dvips
# Main GDB manual
GDB_DOC_SOURCE_INCLUDES = \
- $(srcdir)/annotate.texi \
$(srcdir)/fdl.texi \
$(srcdir)/gpl.texi \
- $(GDBMI_DIR)/gdbmi.texinfo \
$(READLINE_DIR)/rluser.texinfo \
$(READLINE_DIR)/inc-hist.texinfo
GDB_DOC_BUILD_INCLUDES = \
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8c38e877353..f00cf2b287c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -14045,8 +14045,4570 @@ environment. Users of this environment can use a new command,
each value is printed in its own window.
@end ignore
-@include annotate.texi
-@include gdbmi.texinfo
+
+@node GDB/MI
+@chapter The @sc{gdb/mi} Interface
+
+@unnumberedsec Function and Purpose
+
+@cindex @sc{gdb/mi}, its purpose
+@sc{gdb/mi} is a line based machine oriented text interface to @value{GDBN}. It is
+specifically intended to support the development of systems which use
+the debugger as just one small component of a larger system.
+
+This chapter is a specification of the @sc{gdb/mi} interface. It is written
+in the form of a reference manual.
+
+Note that @sc{gdb/mi} is still under construction, so some of the
+features described below are incomplete and subject to change.
+
+@unnumberedsec Notation and Terminology
+
+@cindex notational conventions, for @sc{gdb/mi}
+This chapter uses the following notation:
+
+@itemize @bullet
+@item
+@code{|} separates two alternatives.
+
+@item
+@code{[ @var{something} ]} indicates that @var{something} is optional:
+it may or may not be given.
+
+@item
+@code{( @var{group} )*} means that @var{group} inside the parentheses
+may repeat zero or more times.
+
+@item
+@code{( @var{group} )+} means that @var{group} inside the parentheses
+may repeat one or more times.
+
+@item
+@code{"@var{string}"} means a literal @var{string}.
+@end itemize
+
+@ignore
+@heading Dependencies
+@end ignore
+
+@heading Acknowledgments
+
+In alphabetic order: Andrew Cagney, Fernando Nasser, Stan Shebs and
+Elena Zannoni.
+
+@menu
+* GDB/MI Command Syntax::
+* GDB/MI Compatibility with CLI::
+* GDB/MI Output Records::
+* GDB/MI Command Description Format::
+* GDB/MI Breakpoint Table Commands::
+* GDB/MI Data Manipulation::
+* GDB/MI Program Control::
+* GDB/MI Miscellaneous Commands::
+@ignore
+* GDB/MI Kod Commands::
+* GDB/MI Memory Overlay Commands::
+* GDB/MI Signal Handling Commands::
+@end ignore
+* GDB/MI Stack Manipulation::
+* GDB/MI Symbol Query::
+* GDB/MI Target Manipulation::
+* GDB/MI Thread Commands::
+* GDB/MI Tracepoint Commands::
+* GDB/MI Variable Objects::
+@end menu
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Command Syntax
+@section @sc{gdb/mi} Command Syntax
+
+@menu
+* GDB/MI Input Syntax::
+* GDB/MI Output Syntax::
+* GDB/MI Simple Examples::
+@end menu
+
+@node GDB/MI Input Syntax
+@subsection @sc{gdb/mi} Input Syntax
+
+@cindex input syntax for @sc{gdb/mi}
+@cindex @sc{gdb/mi}, input syntax
+@table @code
+@item @var{command} @expansion{}
+@code{@var{cli-command} | @var{mi-command}}
+
+@item @var{cli-command} @expansion{}
+@code{[ @var{token} ] @var{cli-command} @var{nl}}, where
+@var{cli-command} is any existing @value{GDBN} CLI command.
+
+@item @var{mi-command} @expansion{}
+@code{[ @var{token} ] "-" @var{operation} ( " " @var{option} )*
+@code{[} " --" @code{]} ( " " @var{parameter} )* @var{nl}}
+
+@item @var{token} @expansion{}
+"any sequence of digits"
+
+@item @var{option} @expansion{}
+@code{"-" @var{parameter} [ " " @var{parameter} ]}
+
+@item @var{parameter} @expansion{}
+@code{@var{non-blank-sequence} | @var{c-string}}
+
+@item @var{operation} @expansion{}
+@emph{any of the operations described in this chapter}
+
+@item @var{non-blank-sequence} @expansion{}
+@emph{anything, provided it doesn't contain special characters such as
+"-", @var{nl}, """ and of course " "}
+
+@item @var{c-string} @expansion{}
+@code{""" @var{seven-bit-iso-c-string-content} """}
+
+@item @var{nl} @expansion{}
+@code{CR | CR-LF}
+@end table
+
+@noindent
+Notes:
+
+@itemize @bullet
+@item
+The CLI commands are still handled by the @sc{mi} interpreter; their
+output is described below.
+
+@item
+The @code{@var{token}}, when present, is passed back when the command
+finishes.
+
+@item
+Some @sc{mi} commands accept optional arguments as part of the parameter
+list. Each option is identified by a leading @samp{-} (dash) and may be
+followed by an optional argument parameter. Options occur first in the
+parameter list and can be delimited from normal parameters using
+@samp{--} (this is useful when some parameters begin with a dash).
+@end itemize
+
+Pragmatics:
+
+@itemize @bullet
+@item
+We want easy access to the existing CLI syntax (for debugging).
+
+@item
+We want it to be easy to spot a @sc{mi} operation.
+@end itemize
+
+@node GDB/MI Output Syntax
+@subsection @sc{gdb/mi} Output Syntax
+
+@cindex output syntax of @sc{gdb/mi}
+@cindex @sc{gdb/mi}, output syntax
+The output from @sc{gdb/mi} consists of zero or more out-of-band records
+followed, optionally, by a single result record. This result record
+is for the most recent command. The sequence of output records is
+terminated by @samp{(@value{GDBP})}.
+
+If an input command was prefixed with a @code{@var{token}} then the
+corresponding output for that command will also be prefixed by that same
+@var{token}.
+
+@table @code
+@item @var{output} @expansion{}
+@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}}
+
+@item @var{result-record} @expansion{}
+@code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}}
+
+@item @var{out-of-band-record} @expansion{}
+@code{@var{async-record} | @var{stream-record}}
+
+@item @var{async-record} @expansion{}
+@code{@var{exec-async-output} | @var{status-async-output} | @var{notify-async-output}}
+
+@item @var{exec-async-output} @expansion{}
+@code{[ @var{token} ] "*" @var{async-output}}
+
+@item @var{status-async-output} @expansion{}
+@code{[ @var{token} ] "+" @var{async-output}}
+
+@item @var{notify-async-output} @expansion{}
+@code{[ @var{token} ] "=" @var{async-output}}
+
+@item @var{async-output} @expansion{}
+@code{@var{async-class} ( "," @var{result} )* @var{nl}}
+
+@item @var{result-class} @expansion{}
+@code{"done" | "running" | "connected" | "error" | "exit"}
+
+@item @var{async-class} @expansion{}
+@code{"stopped" | @var{others}} (where @var{others} will be added
+depending on the needs---this is still in development).
+
+@item @var{result} @expansion{}
+@code{ @var{variable} "=" @var{value}}
+
+@item @var{variable} @expansion{}
+@code{ @var{string} }
+
+@item @var{value} @expansion{}
+@code{ @var{const} | @var{tuple} | @var{list} }
+
+@item @var{const} @expansion{}
+@code{@var{c-string}}
+
+@item @var{tuple} @expansion{}
+@code{ "@{@}" | "@{" @var{result} ( "," @var{result} )* "@}" }
+
+@item @var{list} @expansion{}
+@code{ "[]" | "[" @var{value} ( "," @var{value} )* "]" | "["
+@var{result} ( "," @var{result} )* "]" }
+
+@item @var{stream-record} @expansion{}
+@code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
+
+@item @var{console-stream-output} @expansion{}
+@code{"~" @var{c-string}}
+
+@item @var{target-stream-output} @expansion{}
+@code{"@@" @var{c-string}}
+
+@item @var{log-stream-output} @expansion{}
+@code{"&" @var{c-string}}
+
+@item @var{nl} @expansion{}
+@code{CR | CR-LF}
+
+@item @var{token} @expansion{}
+@emph{any sequence of digits}.
+@end table
+
+@noindent
+Notes:
+
+@itemize @bullet
+@item
+All output sequences end in a single line containing a period.
+
+@item
+The @code{@var{token}} is from the corresponding request. If an execution
+command is interrupted by the @samp{-exec-interrupt} command, the
+@var{token} associated with the @samp{*stopped} message is the one of the
+original execution command, not the one of the interrupt command.
+
+@item
+@cindex status output in @sc{gdb/mi}
+@var{status-async-output} contains on-going status information about the
+progress of a slow operation. It can be discarded. All status output is
+prefixed by @samp{+}.
+
+@item
+@cindex async output in @sc{gdb/mi}
+@var{exec-async-output} contains asynchronous state change on the target
+(stopped, started, disappeared). All async output is prefixed by
+@samp{*}.
+
+@item
+@cindex notify output in @sc{gdb/mi}
+@var{notify-async-output} contains supplementary information that the
+client should handle (e.g., a new breakpoint information). All notify
+output is prefixed by @samp{=}.
+
+@item
+@cindex console output in @sc{gdb/mi}
+@var{console-stream-output} is output that should be displayed as is in the
+console. It is the textual response to a CLI command. All the console
+output is prefixed by @samp{~}.
+
+@item
+@cindex target output in @sc{gdb/mi}
+@var{target-stream-output} is the output produced by the target program.
+All the target output is prefixed by @samp{@@}.
+
+@item
+@cindex log output in @sc{gdb/mi}
+@var{log-stream-output} is output text coming from @value{GDBN}'s internals, for
+instance messages that should be displayed as part of an error log. All
+the log output is prefixed by @samp{&}.
+
+@item
+@cindex list output in @sc{gdb/mi}
+New @sc{gdb/mi} commands should only output @var{lists} containing
+@var{values}.
+
+
+@end itemize
+
+@xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more
+details about the various output records.
+
+@node GDB/MI Simple Examples
+@subsection Simple Examples of @sc{gdb/mi} Interaction
+@cindex @sc{gdb/mi}, simple examples
+
+This subsection presents several simple examples of interaction using
+the @sc{gdb/mi} interface. In these examples, @samp{->} means that the
+following line is passed to @sc{gdb/mi} as input, while @samp{<-} means
+the output received from @sc{gdb/mi}.
+
+@subsubheading Target Stop
+@c Ummm... There is no "-stop" command. This assumes async, no?
+Here's an example of stopping the inferior process:
+
+@smallexample
+-> -stop
+<- (@value{GDBP})
+@end smallexample
+
+@noindent
+and later:
+
+@smallexample
+<- *stop,reason="stop",address="0x123",source="a.c:123"
+<- (@value{GDBP})
+@end smallexample
+
+@subsubheading Simple CLI Command
+
+Here's an example of a simple CLI command being passed through
+@sc{gdb/mi} and on to the CLI.
+
+@smallexample
+-> print 1+2
+<- &"print 1+2\n"
+<- ~"$1 = 3\n"
+<- ^done
+<- (@value{GDBP})
+@end smallexample
+
+@subsubheading Command With Side Effects
+
+@smallexample
+-> -symbol-file xyz.exe
+<- *breakpoint,nr="3",address="0x123",source="a.c:123"
+<- (@value{GDBP})
+@end smallexample
+
+@subsubheading A Bad Command
+
+Here's what happens if you pass a non-existent command:
+
+@smallexample
+-> -rubbish
+<- ^error,msg="Undefined MI command: rubbish"
+<- (@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Compatibility with CLI
+@section @sc{gdb/mi} Compatibility with CLI
+
+@cindex compatibility, @sc{gdb/mi} and CLI
+@cindex @sc{gdb/mi}, compatibility with CLI
+To help users familiar with @value{GDBN}'s existing CLI interface, @sc{gdb/mi}
+accepts existing CLI commands. As specified by the syntax, such
+commands can be directly entered into the @sc{gdb/mi} interface and @value{GDBN} will
+respond.
+
+This mechanism is provided as an aid to developers of @sc{gdb/mi}
+clients and not as a reliable interface into the CLI. Since the command
+is being interpreteted in an environment that assumes @sc{gdb/mi}
+behaviour, the exact output of such commands is likely to end up being
+an un-supported hybrid of @sc{gdb/mi} and CLI output.
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Output Records
+@section @sc{gdb/mi} Output Records
+
+@menu
+* GDB/MI Result Records::
+* GDB/MI Stream Records::
+* GDB/MI Out-of-band Records::
+@end menu
+
+@node GDB/MI Result Records
+@subsection @sc{gdb/mi} Result Records
+
+@cindex result records in @sc{gdb/mi}
+@cindex @sc{gdb/mi}, result records
+In addition to a number of out-of-band notifications, the response to a
+@sc{gdb/mi} command includes one of the following result indications:
+
+@table @code
+@findex ^done
+@item "^done" [ "," @var{results} ]
+The synchronous operation was successful, @code{@var{results}} are the return
+values.
+
+@item "^running"
+@findex ^running
+@c Is this one correct? Should it be an out-of-band notification?
+The asynchronous operation was successfully started. The target is
+running.
+
+@item "^error" "," @var{c-string}
+@findex ^error
+The operation failed. The @code{@var{c-string}} contains the corresponding
+error message.
+@end table
+
+@node GDB/MI Stream Records
+@subsection @sc{gdb/mi} Stream Records
+
+@cindex @sc{gdb/mi}, stream records
+@cindex stream records in @sc{gdb/mi}
+@value{GDBN} internally maintains a number of output streams: the console, the
+target, and the log. The output intended for each of these streams is
+funneled through the @sc{gdb/mi} interface using @dfn{stream records}.
+
+Each stream record begins with a unique @dfn{prefix character} which
+identifies its stream (@pxref{GDB/MI Output Syntax, , @sc{gdb/mi} Output
+Syntax}). In addition to the prefix, each stream record contains a
+@code{@var{string-output}}. This is either raw text (with an implicit new
+line) or a quoted C string (which does not contain an implicit newline).
+
+@table @code
+@item "~" @var{string-output}
+The console output stream contains text that should be displayed in the
+CLI console window. It contains the textual responses to CLI commands.
+
+@item "@@" @var{string-output}
+The target output stream contains any textual output from the running
+target.
+
+@item "&" @var{string-output}
+The log stream contains debugging messages being produced by @value{GDBN}'s
+internals.
+@end table
+
+@node GDB/MI Out-of-band Records
+@subsection @sc{gdb/mi} Out-of-band Records
+
+@cindex out-of-band records in @sc{gdb/mi}
+@cindex @sc{gdb/mi}, out-of-band records
+@dfn{Out-of-band} records are used to notify the @sc{gdb/mi} client of
+additional changes that have occurred. Those changes can either be a
+consequence of @sc{gdb/mi} (e.g., a breakpoint modified) or a result of
+target activity (e.g., target stopped).
+
+The following is a preliminary list of possible out-of-band records.
+
+@table @code
+@item "*" "stop"
+@end table
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Command Description Format
+@section @sc{gdb/mi} Command Description Format
+
+The remaining sections describe blocks of commands. Each block of
+commands is laid out in a fashion similar to this section.
+
+Note the the line breaks shown in the examples are here only for
+readability. They don't appear in the real output.
+Also note that the commands with a non-available example (N.A.@:) are
+not yet implemented.
+
+@subheading Motivation
+
+The motivation for this collection of commands.
+
+@subheading Introduction
+
+A brief introduction to this collection of commands as a whole.
+
+@subheading Commands
+
+For each command in the block, the following is described:
+
+@subsubheading Synopsis
+
+@smallexample
+ -command @var{args}@dots{}
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} CLI command.
+
+@subsubheading Result
+
+@subsubheading Out-of-band
+
+@subsubheading Notes
+
+@subsubheading Example
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Breakpoint Table Commands
+@section @sc{gdb/mi} Breakpoint table commands
+
+@cindex breakpoint commands for @sc{gdb/mi}
+@cindex @sc{gdb/mi}, breakpoint commands
+This section documents @sc{gdb/mi} commands for manipulating
+breakpoints.
+
+@subheading The @code{-break-after} Command
+@findex -break-after
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-after @var{number} @var{count}
+@end smallexample
+
+The breakpoint number @var{number} is not in effect until it has been
+hit @var{count} times. To see how this is reflected in the output of
+the @samp{-break-list} command, see the description of the
+@samp{-break-list} command below.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{ignore}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-insert main
+^done,bkpt=@{number="1",addr="0x000100d0",file="hello.c",line="5"@}
+(@value{GDBP})
+-break-after 1 3
+~
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
+ignore="3"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@ignore
+@subheading The @code{-break-catch} Command
+@findex -break-catch
+
+@subheading The @code{-break-commands} Command
+@findex -break-commands
+@end ignore
+
+
+@subheading The @code{-break-condition} Command
+@findex -break-condition
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-condition @var{number} @var{expr}
+@end smallexample
+
+Breakpoint @var{number} will stop the program only if the condition in
+@var{expr} is true. The condition becomes part of the
+@samp{-break-list} output (see the description of the @samp{-break-list}
+command below).
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{condition}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-condition 1 1
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
+times="0",ignore="3"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-delete} Command
+@findex -break-delete
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-delete ( @var{breakpoint} )+
+@end smallexample
+
+Delete the breakpoint(s) whose number(s) are specified in the argument
+list. This is obviously reflected in the breakpoint list.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{delete}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-delete 1
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-disable} Command
+@findex -break-disable
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-disable ( @var{breakpoint} )+
+@end smallexample
+
+Disable the named @var{breakpoint}(s). The field @samp{enabled} in the
+break list is now set to @samp{n} for the named @var{breakpoint}(s).
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{disable}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-disable 2
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-enable} Command
+@findex -break-enable
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-enable ( @var{breakpoint} )+
+@end smallexample
+
+Enable (previously disabled) @var{breakpoint}(s).
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{enable}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-enable 2
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-info} Command
+@findex -break-info
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-info @var{breakpoint}
+@end smallexample
+
+@c REDUNDANT???
+Get information about a single breakpoint.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{info break @var{breakpoint}}.
+
+@subsubheading Example
+N.A.
+
+@subheading The @code{-break-insert} Command
+@findex -break-insert
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-insert [ -t ] [ -h ] [ -r ]
+ [ -c @var{condition} ] [ -i @var{ignore-count} ]
+ [ -p @var{thread} ] [ @var{line} | @var{addr} ]
+@end smallexample
+
+@noindent
+If specified, @var{line}, can be one of:
+
+@itemize @bullet
+@item function
+@c @item +offset
+@c @item -offset
+@c @item linenum
+@item filename:linenum
+@item filename:function
+@item *address
+@end itemize
+
+The possible optional parameters of this command are:
+
+@table @samp
+@item -t
+Insert a tempoary breakpoint.
+@item -h
+Insert a hardware breakpoint.
+@item -c @var{condition}
+Make the breakpoint conditional on @var{condition}.
+@item -i @var{ignore-count}
+Initialize the @var{ignore-count}.
+@item -r
+Insert a regular breakpoint in all the functions whose names match the
+given regular expression. Other flags are not applicable to regular
+expresson.
+@end table
+
+@subsubheading Result
+
+The result is in the form:
+
+@smallexample
+ ^done,bkptno="@var{number}",func="@var{funcname}",
+ file="@var{filename}",line="@var{lineno}"
+@end smallexample
+
+@noindent
+where @var{number} is the @value{GDBN} number for this breakpoint, @var{funcname}
+is the name of the function where the breakpoint was inserted,
+@var{filename} is the name of the source file which contains this
+function, and @var{lineno} is the source line number within that file.
+
+Note: this format is open to change.
+@c An out-of-band breakpoint instead of part of the result?
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak},
+@samp{hbreak}, @samp{thbreak}, and @samp{rbreak}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-insert main
+^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
+(@value{GDBP})
+-break-insert -t foo
+^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
+bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
+addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}]@}
+(@value{GDBP})
+-break-insert -r foo.*
+~int foo(int, int);
+^done,bkpt=@{number="3",addr="0x00010774",file="recursive2.c",line="11"@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-list} Command
+@findex -break-list
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-list
+@end smallexample
+
+Displays the list of inserted breakpoints, showing the following fields:
+
+@table @samp
+@item Number
+number of the breakpoint
+@item Type
+type of the breakpoint: @samp{breakpoint} or @samp{watchpoint}
+@item Disposition
+should the breakpoint be deleted or disabled when it is hit: @samp{keep}
+or @samp{nokeep}
+@item Enabled
+is the breakpoint enabled or no: @samp{y} or @samp{n}
+@item Address
+memory location at which the breakpoint is set
+@item What
+logical location of the breakpoint, expressed by function name, file
+name, line number
+@item Times
+number of times the breakpoint has been hit
+@end table
+
+If there are no breakpoints or watchpoints, the @code{BreakpointTable}
+@code{body} field is an empty list.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info break}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
+bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}]@}
+(@value{GDBP})
+@end smallexample
+
+Here's an example of the result when there are no breakpoints:
+
+@smallexample
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-watch} Command
+@findex -break-watch
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-watch [ -a | -r ]
+@end smallexample
+
+Create a watchpoint. With the @samp{-a} option it will create an
+@dfn{access} watchpoint, i.e. a watchpoint that triggers either on a
+read from or on a write to the memory location. With the @samp{-r}
+option, the watchpoint created is a @dfn{read} watchpoint, i.e. it will
+trigger only when the memory location is accessed for reading. Without
+either of the options, the watchpoint created is a regular watchpoint,
+i.e. it will trigger when the memory location is accessed for writing.
+@xref{Set Watchpoints, , Setting watchpoints}.
+
+Note that @samp{-break-list} will report a single list of watchpoints and
+breakpoints inserted.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{watch}, @samp{awatch}, and
+@samp{rwatch}.
+
+@subsubheading Example
+
+Setting a watchpoint on a variable in the @code{main} function:
+
+@smallexample
+(@value{GDBP})
+-break-watch x
+^done,wpt=@{number="2",exp="x"@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
+value=@{old="-268439212",new="55"@},
+frame=@{func="main",args=[],file="recursive2.c",line="5"@}
+(@value{GDBP})
+@end smallexample
+
+Setting a watchpoint on a variable local to a function. @value{GDBN} will stop
+the program execution twice: first for the variable changing value, then
+for the watchpoint going out of scope.
+
+@smallexample
+(@value{GDBP})
+-break-watch C
+^done,wpt=@{number="5",exp="C"@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-trigger",
+wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@},
+frame=@{func="callee4",args=[],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-scope",wpnum="5",
+frame=@{func="callee3",args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
+(@value{GDBP})
+@end smallexample
+
+Listing breakpoints and watchpoints, at different points in the program
+execution. Note that once the watchpoint goes out of scope, it is
+deleted.
+
+@smallexample
+(@value{GDBP})
+-break-watch C
+^done,wpt=@{number="2",exp="C"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
+bkpt=@{number="2",type="watchpoint",disp="keep",
+enabled="y",addr="",what="C",times="0"@}]@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@},
+value=@{old="-276895068",new="3"@},
+frame=@{func="callee4",args=[],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
+bkpt=@{number="2",type="watchpoint",disp="keep",
+enabled="y",addr="",what="C",times="-5"@}]@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-scope",wpnum="2",
+frame=@{func="callee3",args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Data Manipulation
+@section @sc{gdb/mi} Data Manipulation
+
+@cindex data manipulation, in @sc{gdb/mi}
+@cindex @sc{gdb/mi}, data manipulation
+This section describes the @sc{gdb/mi} commands that manipulate data:
+examine memory and registers, evaluate expressions, etc.
+
+@c REMOVED FROM THE INTERFACE.
+@c @subheading -data-assign
+@c Change the value of a program variable. Plenty of side effects.
+@c @subsubheading GDB command
+@c set variable
+@c @subsubheading Example
+@c N.A.
+
+@subheading The @code{-data-disassemble} Command
+@findex -data-disassemble
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-disassemble
+ [ -s @var{start-addr} -e @var{end-addr} ]
+ | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ]
+ -- @var{mode}
+@end smallexample
+
+@noindent
+Where:
+
+@table @samp
+@item @var{start-addr}
+is the beginning address (or @code{$pc})
+@item @var{end-addr}
+is the end address
+@item @var{filename}
+is the name of the file to disassemble
+@item @var{linenum}
+is the line number to disassemble around
+@item @var{lines}
+is the the number of disassembly lines to be produced. If it is -1,
+the whole function will be disassembled, in case no @var{end-addr} is
+specified. If @var{end-addr} is specified as a non-zero value, and
+@var{lines} is lower than the number of disassembly lines between
+@var{start-addr} and @var{end-addr}, only @var{lines} lines are
+displayed; if @var{lines} is higher than the number of lines between
+@var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr}
+are displayed.
+@item @var{mode}
+is either 0 (meaning only disassembly) or 1 (meaning mixed source and
+disassembly).
+@end table
+
+@subsubheading Result
+
+The output for each instruction is composed of four fields:
+
+@itemize @bullet
+@item Address
+@item Func-name
+@item Offset
+@item Instruction
+@end itemize
+
+Note that whatever included in the instruction field, is not manipulated
+directely by @sc{gdb/mi}, i.e. it is not possible to adjust its format.
+
+@subsubheading @value{GDBN} Command
+
+There's no direct mapping from this command to the CLI.
+
+@subsubheading Example
+
+Disassemble from the current value of @code{$pc} to @code{$pc + 20}:
+
+@smallexample
+(@value{GDBP})
+-data-disassemble -s $pc -e "$pc + 20" -- 0
+^done,
+asm_insns=[
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov 2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi %hi(0x11800), %o2"@},
+@{address="0x000107c8",func-name="main",offset="12",
+inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@},
+@{address="0x000107cc",func-name="main",offset="16",
+inst="sethi %hi(0x11800), %o2"@},
+@{address="0x000107d0",func-name="main",offset="20",
+inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}]
+(@value{GDBP})
+@end smallexample
+
+Disassemble the whole @code{main} function. Line 32 is part of
+@code{main}.
+
+@smallexample
+-data-disassemble -f basics.c -l 32 -- 0
+^done,asm_insns=[
+@{address="0x000107bc",func-name="main",offset="0",
+inst="save %sp, -112, %sp"@},
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov 2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi %hi(0x11800), %o2"@},
+[@dots{}]
+@{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
+@{address="0x00010820",func-name="main",offset="100",inst="restore "@}]
+(@value{GDBP})
+@end smallexample
+
+Disassemble 3 instructions from the start of @code{main}:
+
+@smallexample
+(@value{GDBP})
+-data-disassemble -f basics.c -l 32 -n 3 -- 0
+^done,asm_insns=[
+@{address="0x000107bc",func-name="main",offset="0",
+inst="save %sp, -112, %sp"@},
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov 2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi %hi(0x11800), %o2"@}]
+(@value{GDBP})
+@end smallexample
+
+Disassemble 3 instructions from the start of @code{main} in mixed mode:
+
+@smallexample
+(@value{GDBP})
+-data-disassemble -f basics.c -l 32 -n 3 -- 1
+^done,asm_insns=[
+src_and_asm_line=@{line="31",
+file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
+ testsuite/gdb.mi/basics.c",line_asm_insn=[
+@{address="0x000107bc",func-name="main",offset="0",
+inst="save %sp, -112, %sp"@}]@},
+src_and_asm_line=@{line="32",
+file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
+ testsuite/gdb.mi/basics.c",line_asm_insn=[
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov 2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi %hi(0x11800), %o2"@}]@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-evaluate-expression} Command
+@findex -data-evaluate-expression
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-evaluate-expression @var{expr}
+@end smallexample
+
+Evaluate @var{expr} as an expression. The expression could contain an
+inferior function call. The function call will execute synchronously.
+If the expression contains spaces, it must be enclosed in double quotes.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{print}, @samp{output}, and
+@samp{call}. In @code{gdbtk} only, there's a corresponding
+@samp{gdb_eval} command.
+
+@subsubheading Example
+
+In the following example, the numbers that precede the commands are the
+@dfn{tokens} described in @ref{GDB/MI Command Syntax, ,@sc{gdb/mi}
+Command Syntax}. Notice how @sc{gdb/mi} returns the same tokens in its
+output.
+
+@smallexample
+211-data-evaluate-expression A
+211^done,value="1"
+(@value{GDBP})
+311-data-evaluate-expression &A
+311^done,value="0xefffeb7c"
+(@value{GDBP})
+411-data-evaluate-expression A+3
+411^done,value="4"
+(@value{GDBP})
+511-data-evaluate-expression "A + 3"
+511^done,value="4"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-list-changed-registers} Command
+@findex -data-list-changed-registers
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-list-changed-registers
+@end smallexample
+
+Display a list of the registers that have changed.
+
+@subsubheading @value{GDBN} Command
+
+@value{GDBN} doesn't have a direct analog for this command; @code{gdbtk}
+has the corresponding command @samp{gdb_changed_register_list}.
+
+@subsubheading Example
+
+On a PPC MBX board:
+
+@smallexample
+(@value{GDBP})
+-exec-continue
+^running
+
+(@value{GDBP})
+*stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
+args=[],file="try.c",line="5"@}
+(@value{GDBP})
+-data-list-changed-registers
+^done,changed-registers=["0","1","2","4","5","6","7","8","9",
+"10","11","13","14","15","16","17","18","19","20","21","22","23",
+"24","25","26","27","28","30","31","64","65","66","67","69"]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-list-register-names} Command
+@findex -data-list-register-names
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-list-register-names [ ( @var{regno} )+ ]
+@end smallexample
+
+Show a list of register names for the current target. If no arguments
+are given, it shows a list of the names of all the registers. If
+integer numbers are given as arguments, it will print a list of the
+names of the registers corresponding to the arguments. To ensure
+consistency between a register name and its number, the output list may
+include empty register names.
+
+@subsubheading @value{GDBN} Command
+
+@value{GDBN} does not have a command which corresponds to
+@samp{-data-list-register-names}. In @code{gdbtk} there is a
+corresponding command @samp{gdb_regnames}.
+
+@subsubheading Example
+
+For the PPC MBX board:
+@smallexample
+(@value{GDBP})
+-data-list-register-names
+^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7",
+"r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
+"r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
+"r30","r31","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","ps","cr","lr","ctr","xer"]
+(@value{GDBP})
+-data-list-register-names 1 2 3
+^done,register-names=["r1","r2","r3"]
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-data-list-register-values} Command
+@findex -data-list-register-values
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-list-register-values @var{fmt} [ ( @var{regno} )*]
+@end smallexample
+
+Display the registers' contents. @var{fmt} is the format according to
+which the registers' contents are to be returned, followed by an optional
+list of numbers specifying the registers to display. A missing list of
+numbers indicates that the contents of all the registers must be returned.
+
+Allowed formats for @var{fmt} are:
+
+@table @code
+@item x
+Hexadecimal
+@item o
+Octal
+@item t
+Binary
+@item d
+Decimal
+@item r
+Raw
+@item N
+Natural
+@end table
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{info reg}, @samp{info
+all-reg}, and (in @code{gdbtk}) @samp{gdb_fetch_registers}.
+
+@subsubheading Example
+
+For a PPC MBX board (note: line breaks are for readability only, they
+don't appear in the actual output):
+
+@smallexample
+(@value{GDBP})
+-data-list-register-values r 64 65
+^done,register-values=[@{number="64",value="0xfe00a300"@},
+@{number="65",value="0x00029002"@}]
+(@value{GDBP})
+-data-list-register-values x
+^done,register-values=[@{number="0",value="0xfe0043c8"@},
+@{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@},
+@{number="3",value="0x0"@},@{number="4",value="0xa"@},
+@{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@},
+@{number="7",value="0xfe011e98"@},@{number="8",value="0x2"@},
+@{number="9",value="0xfa202820"@},@{number="10",value="0xfa202808"@},
+@{number="11",value="0x1"@},@{number="12",value="0x0"@},
+@{number="13",value="0x4544"@},@{number="14",value="0xffdfffff"@},
+@{number="15",value="0xffffffff"@},@{number="16",value="0xfffffeff"@},
+@{number="17",value="0xefffffed"@},@{number="18",value="0xfffffffe"@},
+@{number="19",value="0xffffffff"@},@{number="20",value="0xffffffff"@},
+@{number="21",value="0xffffffff"@},@{number="22",value="0xfffffff7"@},
+@{number="23",value="0xffffffff"@},@{number="24",value="0xffffffff"@},
+@{number="25",value="0xffffffff"@},@{number="26",value="0xfffffffb"@},
+@{number="27",value="0xffffffff"@},@{number="28",value="0xf7bfffff"@},
+@{number="29",value="0x0"@},@{number="30",value="0xfe010000"@},
+@{number="31",value="0x0"@},@{number="32",value="0x0"@},
+@{number="33",value="0x0"@},@{number="34",value="0x0"@},
+@{number="35",value="0x0"@},@{number="36",value="0x0"@},
+@{number="37",value="0x0"@},@{number="38",value="0x0"@},
+@{number="39",value="0x0"@},@{number="40",value="0x0"@},
+@{number="41",value="0x0"@},@{number="42",value="0x0"@},
+@{number="43",value="0x0"@},@{number="44",value="0x0"@},
+@{number="45",value="0x0"@},@{number="46",value="0x0"@},
+@{number="47",value="0x0"@},@{number="48",value="0x0"@},
+@{number="49",value="0x0"@},@{number="50",value="0x0"@},
+@{number="51",value="0x0"@},@{number="52",value="0x0"@},
+@{number="53",value="0x0"@},@{number="54",value="0x0"@},
+@{number="55",value="0x0"@},@{number="56",value="0x0"@},
+@{number="57",value="0x0"@},@{number="58",value="0x0"@},
+@{number="59",value="0x0"@},@{number="60",value="0x0"@},
+@{number="61",value="0x0"@},@{number="62",value="0x0"@},
+@{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@},
+@{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@},
+@{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@},
+@{number="69",value="0x20002b03"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-read-memory} Command
+@findex -data-read-memory
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-read-memory [ -o @var{byte-offset} ]
+ @var{address} @var{word-format} @var{word-size}
+ @var{nr-rows} @var{nr-cols} [ @var{aschar} ]
+@end smallexample
+
+@noindent
+where:
+
+@table @samp
+@item @var{address}
+An expression specifying the address of the first memory word to be
+read. Complex expressions containing embedded white space should be
+quoted using the C convention.
+
+@item @var{word-format}
+The format to be used to print the memory words. The notation is the
+same as for @value{GDBN}'s @code{print} command (@pxref{Output Formats,
+,Output formats}).
+
+@item @var{word-size}
+The size of each memory word in bytes.
+
+@item @var{nr-rows}
+The number of rows in the output table.
+
+@item @var{nr-cols}
+The number of columns in the output table.
+
+@item @var{aschar}
+If present, indicates that each row should include an @sc{ascii} dump. The
+value of @var{aschar} is used as a padding character when a byte is not a
+member of the printable @sc{ascii} character set (printable @sc{ascii}
+characters are those whose code is between 32 and 126, inclusively).
+
+@item @var{byte-offset}
+An offset to add to the @var{address} before fetching memory.
+@end table
+
+This command displays memory contents as a table of @var{nr-rows} by
+@var{nr-cols} words, each word being @var{word-size} bytes. In total,
+@code{@var{nr-rows} * @var{nr-cols} * @var{word-size}} bytes are read
+(returned as @samp{total-bytes}). Should less than the requested number
+of bytes be returned by the target, the missing words are identified
+using @samp{N/A}. The number of bytes read from the target is returned
+in @samp{nr-bytes} and the starting address used to read memory in
+@samp{addr}.
+
+The address of the next/previous row or page is available in
+@samp{next-row} and @samp{prev-row}, @samp{next-page} and
+@samp{prev-page}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{x}. @code{gdbtk} has
+@samp{gdb_get_mem} memory read command.
+
+@subsubheading Example
+
+Read six bytes of memory starting at @code{bytes+6} but then offset by
+@code{-6} bytes. Format as three rows of two columns. One byte per
+word. Display each word in hex.
+
+@smallexample
+(@value{GDBP})
+9-data-read-memory -o -6 -- bytes+6 x 1 3 2
+9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
+next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
+prev-page="0x0000138a",memory=[
+@{addr="0x00001390",data=["0x00","0x01"]@},
+@{addr="0x00001392",data=["0x02","0x03"]@},
+@{addr="0x00001394",data=["0x04","0x05"]@}]
+(@value{GDBP})
+@end smallexample
+
+Read two bytes of memory starting at address @code{shorts + 64} and
+display as a single word formatted in decimal.
+
+@smallexample
+(@value{GDBP})
+5-data-read-memory shorts+64 d 2 1 1
+5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
+next-row="0x00001512",prev-row="0x0000150e",
+next-page="0x00001512",prev-page="0x0000150e",memory=[
+@{addr="0x00001510",data=["128"]@}]
+(@value{GDBP})
+@end smallexample
+
+Read thirty two bytes of memory starting at @code{bytes+16} and format
+as eight rows of four columns. Include a string encoding with @samp{x}
+used as the non-printable character.
+
+@smallexample
+(@value{GDBP})
+4-data-read-memory bytes+16 x 1 8 4 x
+4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
+next-row="0x000013c0",prev-row="0x0000139c",
+next-page="0x000013c0",prev-page="0x00001380",memory=[
+@{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"@},
+@{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"@},
+@{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"@},
+@{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"@},
+@{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"@},
+@{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@},
+@{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@},
+@{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}]
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-display-delete} Command
+@findex -display-delete
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-delete @var{number}
+@end smallexample
+
+Delete the display @var{number}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{delete display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-disable} Command
+@findex -display-disable
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-disable @var{number}
+@end smallexample
+
+Disable display @var{number}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{disable display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-enable} Command
+@findex -display-enable
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-enable @var{number}
+@end smallexample
+
+Enable display @var{number}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{enable display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-insert} Command
+@findex -display-insert
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-insert @var{expression}
+@end smallexample
+
+Display @var{expression} every time the program stops.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-list} Command
+@findex -display-list
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-list
+@end smallexample
+
+List the displays. Do not show the current values.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-environment-cd} Command
+@findex -environment-cd
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-cd @var{pathdir}
+@end smallexample
+
+Set @value{GDBN}'s working directory.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{cd}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-environment-directory} Command
+@findex -environment-directory
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-directory [ -r ] [ @var{pathdir} ]+
+@end smallexample
+
+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
+@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 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
+character must not be used
+in any directory name.
+If no directories are specified, the current search path is displayed.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{dir}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
+^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"
+(@value{GDBP})
+-environment-directory ""
+^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"
+(@value{GDBP})
+-environment-directory -r /home/jjohnstn/src/gdb /usr/src
+^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd"
+(@value{GDBP})
+-environment-directory -r
+^done,source-path="$cdir:$cwd"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-environment-path} Command
+@findex -environment-path
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-path [ -r ] [ @var{pathdir} ]+
+@end smallexample
+
+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
+@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 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
+character must not be used
+in any directory name.
+If no directories are specified, the current path is displayed.
+
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{path}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-path
+^done,path="/usr/bin"
+(@value{GDBP})
+-environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin
+^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin"
+(@value{GDBP})
+-environment-path -r /usr/local/bin
+^done,path="/usr/local/bin:/usr/bin"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-environment-pwd} Command
+@findex -environment-pwd
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-pwd
+@end smallexample
+
+Show the current working directory.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{pwd}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-pwd
+^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb"
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Program Control
+@section @sc{gdb/mi} Program control
+
+@subsubheading Program termination
+
+As a result of execution, the inferior program can run to completion, if
+it doesn't encounter any breakpoints. In this case the output will
+include an exit code, if the program has exited exceptionally.
+
+@subsubheading Examples
+
+@noindent
+Program exited normally:
+
+@smallexample
+(@value{GDBP})
+-exec-run
+^running
+(@value{GDBP})
+x = 55
+*stopped,reason="exited-normally"
+(@value{GDBP})
+@end smallexample
+
+@noindent
+Program exited exceptionally:
+
+@smallexample
+(@value{GDBP})
+-exec-run
+^running
+(@value{GDBP})
+x = 55
+*stopped,reason="exited",exit-code="01"
+(@value{GDBP})
+@end smallexample
+
+Another way the program can terminate is if it receives a signal such as
+@code{SIGINT}. In this case, @sc{gdb/mi} displays this:
+
+@smallexample
+(@value{GDBP})
+*stopped,reason="exited-signalled",signal-name="SIGINT",
+signal-meaning="Interrupt"
+@end smallexample
+
+
+@subheading The @code{-exec-abort} Command
+@findex -exec-abort
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-abort
+@end smallexample
+
+Kill the inferior running program.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{kill}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-exec-arguments} Command
+@findex -exec-arguments
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-arguments @var{args}
+@end smallexample
+
+Set the inferior program arguments, to be used in the next
+@samp{-exec-run}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{set args}.
+
+@subsubheading Example
+
+@c FIXME!
+Don't have one around.
+
+
+@subheading The @code{-exec-continue} Command
+@findex -exec-continue
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-continue
+@end smallexample
+
+Asynchronous command. Resumes the execution of the inferior program
+until a breakpoint is encountered, or until the inferior exits.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} corresponding is @samp{continue}.
+
+@subsubheading Example
+
+@smallexample
+-exec-continue
+^running
+(@value{GDBP})
+@@Hello world
+*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=[],
+file="hello.c",line="13"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-finish} Command
+@findex -exec-finish
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-finish
+@end smallexample
+
+Asynchronous command. Resumes the execution of the inferior program
+until the current function is exited. Displays the results returned by
+the function.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{finish}.
+
+@subsubheading Example
+
+Function returning @code{void}.
+
+@smallexample
+-exec-finish
+^running
+(@value{GDBP})
+@@hello from foo
+*stopped,reason="function-finished",frame=@{func="main",args=[],
+file="hello.c",line="7"@}
+(@value{GDBP})
+@end smallexample
+
+Function returning other than @code{void}. The name of the internal
+@value{GDBN} variable storing the result is printed, together with the
+value itself.
+
+@smallexample
+-exec-finish
+^running
+(@value{GDBP})
+*stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo",
+args=[@{name="a",value="1"],@{name="b",value="9"@}@},
+file="recursive2.c",line="14"@},
+gdb-result-var="$1",return-value="0"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-interrupt} Command
+@findex -exec-interrupt
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-interrupt
+@end smallexample
+
+Asynchronous command. Interrupts the background execution of the target.
+Note how the token associated with the stop message is the one for the
+execution command that has been interrupted. The token for the interrupt
+itself only appears in the @samp{^done} output. If the user is trying to
+interrupt a non-running program, an error message will be printed.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{interrupt}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+111-exec-continue
+111^running
+
+(@value{GDBP})
+222-exec-interrupt
+222^done
+(@value{GDBP})
+111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
+frame=@{addr="0x00010140",func="foo",args=[],file="try.c",line="13"@}
+(@value{GDBP})
+
+(@value{GDBP})
+-exec-interrupt
+^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-next} Command
+@findex -exec-next
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-next
+@end smallexample
+
+Asynchronous command. Resumes execution of the inferior program, stopping
+when the beginning of the next source line is reached.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{next}.
+
+@subsubheading Example
+
+@smallexample
+-exec-next
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",line="8",file="hello.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-next-instruction} Command
+@findex -exec-next-instruction
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-next-instruction
+@end smallexample
+
+Asynchronous command. Executes one machine instruction. If the
+instruction is a function call continues until the function returns. If
+the program stops at an instruction in the middle of a source line, the
+address will be printed as well.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{nexti}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-next-instruction
+^running
+
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+addr="0x000100d4",line="5",file="hello.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-return} Command
+@findex -exec-return
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-return
+@end smallexample
+
+Makes current function return immediately. Doesn't execute the inferior.
+Displays the new current frame.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{return}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+200-break-insert callee4
+200^done,bkpt=@{number="1",addr="0x00010734",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
+(@value{GDBP})
+000-exec-run
+000^running
+(@value{GDBP})
+000*stopped,reason="breakpoint-hit",bkptno="1",
+frame=@{func="callee4",args=[],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
+(@value{GDBP})
+205-break-delete
+205^done
+(@value{GDBP})
+111-exec-return
+111^done,frame=@{level="0",func="callee3",
+args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-run} Command
+@findex -exec-run
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-run
+@end smallexample
+
+Asynchronous command. Starts execution of the inferior from the
+beginning. The inferior executes until either a breakpoint is
+encountered or the program exits.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{run}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-insert main
+^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
+(@value{GDBP})
+-exec-run
+^running
+(@value{GDBP})
+*stopped,reason="breakpoint-hit",bkptno="1",
+frame=@{func="main",args=[],file="recursive2.c",line="4"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-show-arguments} Command
+@findex -exec-show-arguments
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-show-arguments
+@end smallexample
+
+Print the arguments of the program.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{show args}.
+
+@subsubheading Example
+N.A.
+
+@c @subheading -exec-signal
+
+@subheading The @code{-exec-step} Command
+@findex -exec-step
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-step
+@end smallexample
+
+Asynchronous command. Resumes execution of the inferior program, stopping
+when the beginning of the next source line is reached, if the next
+source line is not a function call. If it is, stop at the first
+instruction of the called function.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{step}.
+
+@subsubheading Example
+
+Stepping into a function:
+
+@smallexample
+-exec-step
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+frame=@{func="foo",args=[@{name="a",value="10"@},
+@{name="b",value="0"@}],file="recursive2.c",line="11"@}
+(@value{GDBP})
+@end smallexample
+
+Regular stepping:
+
+@smallexample
+-exec-step
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",line="14",file="recursive2.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-step-instruction} Command
+@findex -exec-step-instruction
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-step-instruction
+@end smallexample
+
+Asynchronous command. Resumes the inferior which executes one machine
+instruction. The output, once @value{GDBN} has stopped, will vary depending on
+whether we have stopped in the middle of a source line or not. In the
+former case, the address at which the program stopped will be printed as
+well.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{stepi}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-step-instruction
+^running
+
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+frame=@{func="foo",args=[],file="try.c",line="10"@}
+(@value{GDBP})
+-exec-step-instruction
+^running
+
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+frame=@{addr="0x000100f4",func="foo",args=[],file="try.c",line="10"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-until} Command
+@findex -exec-until
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-until [ @var{location} ]
+@end smallexample
+
+Asynchronous command. Executes the inferior until the @var{location}
+specified in the argument is reached. If there is no argument, the inferior
+executes until a source line greater than the current one is reached.
+The reason for stopping in this case will be @samp{location-reached}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{until}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-until recursive2.c:6
+^running
+(@value{GDBP})
+x = 55
+*stopped,reason="location-reached",frame=@{func="main",args=[],
+file="recursive2.c",line="6"@}
+(@value{GDBP})
+@end smallexample
+
+@ignore
+@subheading -file-clear
+Is this going away????
+@end ignore
+
+
+@subheading The @code{-file-exec-and-symbols} Command
+@findex -file-exec-and-symbols
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-exec-and-symbols @var{file}
+@end smallexample
+
+Specify the executable file to be debugged. This file is the one from
+which the symbol table is also read. If no file is specified, the
+command clears the executable and symbol information. If breakpoints
+are set when using this command with no arguments, @value{GDBN} will produce
+error messages. Otherwise, no output is produced, except a completion
+notification.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{file}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-file-exec-file} Command
+@findex -file-exec-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-exec-file @var{file}
+@end smallexample
+
+Specify the executable file to be debugged. Unlike
+@samp{-file-exec-and-symbols}, the symbol table is @emph{not} read
+from this file. If used without argument, @value{GDBN} clears the information
+about the executable file. No output is produced, except a completion
+notification.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{exec-file}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-file-list-exec-sections} Command
+@findex -file-list-exec-sections
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-exec-sections
+@end smallexample
+
+List the sections of the current executable file.
+
+@subsubheading @value{GDBN} Command
+
+The @value{GDBN} command @samp{info file} shows, among the rest, the same
+information as this command. @code{gdbtk} has a corresponding command
+@samp{gdb_load_info}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-list-exec-source-file} Command
+@findex -file-list-exec-source-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-exec-source-file
+@end smallexample
+
+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
+
+There's no @value{GDBN} command which directly corresponds to this one.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+123-file-list-exec-source-file
+123^done,line="1",file="foo.c",fullname="/home/bar/foo.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-file-list-exec-source-files} Command
+@findex -file-list-exec-source-files
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-exec-source-files
+@end smallexample
+
+List the source files for the current executable.
+
+@subsubheading @value{GDBN} Command
+
+There's no @value{GDBN} command which directly corresponds to this one.
+@code{gdbtk} has an analogous command @samp{gdb_listfiles}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-list-shared-libraries} Command
+@findex -file-list-shared-libraries
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-shared-libraries
+@end smallexample
+
+List the shared libraries in the program.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info shared}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-list-symbol-files} Command
+@findex -file-list-symbol-files
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-symbol-files
+@end smallexample
+
+List symbol files.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info file} (part of it).
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-symbol-file} Command
+@findex -file-symbol-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-symbol-file @var{file}
+@end smallexample
+
+Read symbol table info from the specified @var{file} argument. When
+used without arguments, clears @value{GDBN}'s symbol table info. No output is
+produced, except for a completion notification.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{symbol-file}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
+^done
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Miscellaneous Commands
+@section Miscellaneous @value{GDBN} commands in @sc{gdb/mi}
+
+@c @subheading -gdb-complete
+
+@subheading The @code{-gdb-exit} Command
+@findex -gdb-exit
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-exit
+@end smallexample
+
+Exit @value{GDBN} immediately.
+
+@subsubheading @value{GDBN} Command
+
+Approximately corresponds to @samp{quit}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-gdb-exit
+@end smallexample
+
+@subheading The @code{-gdb-set} Command
+@findex -gdb-set
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-set
+@end smallexample
+
+Set an internal @value{GDBN} variable.
+@c IS THIS A DOLLAR VARIABLE? OR SOMETHING LIKE ANNOTATE ?????
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{set}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-gdb-set $foo=3
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-gdb-show} Command
+@findex -gdb-show
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-show
+@end smallexample
+
+Show the current value of a @value{GDBN} variable.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{show}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-gdb-show annotate
+^done,value="0"
+(@value{GDBP})
+@end smallexample
+
+@c @subheading -gdb-source
+
+
+@subheading The @code{-gdb-version} Command
+@findex -gdb-version
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-version
+@end smallexample
+
+Show version information for @value{GDBN}. Used mostly in testing.
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command. @value{GDBN} by default shows this
+information when you start an interactive session.
+
+@subsubheading Example
+
+@c This example modifies the actual output from GDB to avoid overfull
+@c box in TeX.
+@smallexample
+(@value{GDBP})
+-gdb-version
+~GNU gdb 5.2.1
+~Copyright 2000 Free Software Foundation, Inc.
+~GDB is free software, covered by the GNU General Public License, and
+~you are welcome to change it and/or distribute copies of it under
+~ certain conditions.
+~Type "show copying" to see the conditions.
+~There is absolutely no warranty for GDB. Type "show warranty" for
+~ details.
+~This GDB was configured as
+ "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
+^done
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-interpreter-exec} Command
+@findex -interpreter-exec
+
+@subheading Synopsis
+
+@smallexample
+-interpreter-exec @var{interpreter} @var{command}
+@end smallexample
+
+Execute the specified @var{command} in the given @var{interpreter}.
+
+@subheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{interpreter-exec}.
+
+@subheading Example
+
+@smallexample
+(@value{GDBP})
+-interpreter-exec console "break main"
+&"During symbol reading, couldn't parse type; debugger out of date?.\n"
+&"During symbol reading, bad structure-type format.\n"
+~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
+^done
+(@value{GDBP})
+@end smallexample
+
+@ignore
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Kod Commands
+@section @sc{gdb/mi} Kod Commands
+
+The Kod commands are not implemented.
+
+@c @subheading -kod-info
+
+@c @subheading -kod-list
+
+@c @subheading -kod-list-object-types
+
+@c @subheading -kod-show
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Memory Overlay Commands
+@section @sc{gdb/mi} Memory Overlay Commands
+
+The memory overlay commands are not implemented.
+
+@c @subheading -overlay-auto
+
+@c @subheading -overlay-list-mapping-state
+
+@c @subheading -overlay-list-overlays
+
+@c @subheading -overlay-map
+
+@c @subheading -overlay-off
+
+@c @subheading -overlay-on
+
+@c @subheading -overlay-unmap
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Signal Handling Commands
+@section @sc{gdb/mi} Signal Handling Commands
+
+Signal handling commands are not implemented.
+
+@c @subheading -signal-handle
+
+@c @subheading -signal-list-handle-actions
+
+@c @subheading -signal-list-signal-types
+@end ignore
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Stack Manipulation
+@section @sc{gdb/mi} Stack Manipulation Commands
+
+
+@subheading The @code{-stack-info-frame} Command
+@findex -stack-info-frame
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-info-frame
+@end smallexample
+
+Get info on the current frame.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame}
+(without arguments).
+
+@subsubheading Example
+N.A.
+
+@subheading The @code{-stack-info-depth} Command
+@findex -stack-info-depth
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-info-depth [ @var{max-depth} ]
+@end smallexample
+
+Return the depth of the stack. If the integer argument @var{max-depth}
+is specified, do not count beyond @var{max-depth} frames.
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command.
+
+@subsubheading Example
+
+For a stack with frame levels 0 through 11:
+
+@smallexample
+(@value{GDBP})
+-stack-info-depth
+^done,depth="12"
+(@value{GDBP})
+-stack-info-depth 4
+^done,depth="4"
+(@value{GDBP})
+-stack-info-depth 12
+^done,depth="12"
+(@value{GDBP})
+-stack-info-depth 11
+^done,depth="11"
+(@value{GDBP})
+-stack-info-depth 13
+^done,depth="12"
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-stack-list-arguments} Command
+@findex -stack-list-arguments
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-list-arguments @var{show-values}
+ [ @var{low-frame} @var{high-frame} ]
+@end smallexample
+
+Display a list of the arguments for the frames between @var{low-frame}
+and @var{high-frame} (inclusive). If @var{low-frame} and
+@var{high-frame} are not provided, list the arguments for the whole call
+stack.
+
+The @var{show-values} argument must have a value of 0 or 1. A value of
+0 means that only the names of the arguments are listed, a value of 1
+means that both names and values of the arguments are printed.
+
+@subsubheading @value{GDBN} Command
+
+@value{GDBN} does not have an equivalent command. @code{gdbtk} has a
+@samp{gdb_get_args} command which partially overlaps with the
+functionality of @samp{-stack-list-arguments}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames
+^done,
+stack=[
+frame=@{level="0",addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
+frame=@{level="1",addr="0x0001076c",func="callee3",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="17"@},
+frame=@{level="2",addr="0x0001078c",func="callee2",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@},
+frame=@{level="3",addr="0x000107b4",func="callee1",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
+frame=@{level="4",addr="0x000107e0",func="main",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}]
+(@value{GDBP})
+-stack-list-arguments 0
+^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=[]@}]
+(@value{GDBP})
+-stack-list-arguments 1
+^done,
+stack-args=[
+frame=@{level="0",args=[]@},
+frame=@{level="1",
+ args=[@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
+frame=@{level="2",args=[
+@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
+@{frame=@{level="3",args=[
+@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@},
+@{name="fltarg",value="3.5"@}]@},
+frame=@{level="4",args=[]@}]
+(@value{GDBP})
+-stack-list-arguments 0 2 2
+^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}]
+(@value{GDBP})
+-stack-list-arguments 1 2 2
+^done,stack-args=[frame=@{level="2",
+args=[@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@}]@}]
+(@value{GDBP})
+@end smallexample
+
+@c @subheading -stack-list-exception-handlers
+
+
+@subheading The @code{-stack-list-frames} Command
+@findex -stack-list-frames
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-list-frames [ @var{low-frame} @var{high-frame} ]
+@end smallexample
+
+List the frames currently on the stack. For each frame it displays the
+following info:
+
+@table @samp
+@item @var{level}
+The frame number, 0 being the topmost frame, i.e. the innermost function.
+@item @var{addr}
+The @code{$pc} value for that frame.
+@item @var{func}
+Function name.
+@item @var{file}
+File name of the source file where the function lives.
+@item @var{line}
+Line number corresponding to the @code{$pc}.
+@end table
+
+If invoked without arguments, this command prints a backtrace for the
+whole stack. If given two integer arguments, it shows the frames whose
+levels are between the two arguments (inclusive). If the two arguments
+are equal, it shows the single frame at the corresponding level.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{backtrace} and @samp{where}.
+
+@subsubheading Example
+
+Full stack backtrace:
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames
+^done,stack=
+[frame=@{level="0",addr="0x0001076c",func="foo",
+ file="recursive2.c",line="11"@},
+frame=@{level="1",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="2",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="3",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="4",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="5",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="6",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="7",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="8",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="9",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="10",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="11",addr="0x00010738",func="main",
+ file="recursive2.c",line="4"@}]
+(@value{GDBP})
+@end smallexample
+
+Show frames between @var{low_frame} and @var{high_frame}:
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames 3 5
+^done,stack=
+[frame=@{level="3",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="4",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@},
+frame=@{level="5",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@}]
+(@value{GDBP})
+@end smallexample
+
+Show a single frame:
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames 3 3
+^done,stack=
+[frame=@{level="3",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-stack-list-locals} Command
+@findex -stack-list-locals
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-list-locals @var{print-values}
+@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.
+
+@subsubheading @value{GDBN} Command
+
+@samp{info locals} in @value{GDBN}, @samp{gdb_get_locals} in @code{gdbtk}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-stack-list-locals 0
+^done,locals=[name="A",name="B",name="C"]
+(@value{GDBP})
+-stack-list-locals 1
+^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
+ @{name="C",value="3"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-stack-select-frame} Command
+@findex -stack-select-frame
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-select-frame @var{framenum}
+@end smallexample
+
+Change the current frame. Select a different frame @var{framenum} on
+the stack.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{frame}, @samp{up},
+@samp{down}, @samp{select-frame}, @samp{up-silent}, and @samp{down-silent}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-stack-select-frame 2
+^done
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Symbol Query
+@section @sc{gdb/mi} Symbol Query Commands
+
+
+@subheading The @code{-symbol-info-address} Command
+@findex -symbol-info-address
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-address @var{symbol}
+@end smallexample
+
+Describe where @var{symbol} is stored.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info address}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-file} Command
+@findex -symbol-info-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-file
+@end smallexample
+
+Show the file for the symbol.
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command. @code{gdbtk} has
+@samp{gdb_find_file}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-function} Command
+@findex -symbol-info-function
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-function
+@end smallexample
+
+Show which function the symbol lives in.
+
+@subsubheading @value{GDBN} Command
+
+@samp{gdb_get_function} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-line} Command
+@findex -symbol-info-line
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-line
+@end smallexample
+
+Show the core addresses of the code for a source line.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} comamnd is @samp{info line}.
+@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-symbol} Command
+@findex -symbol-info-symbol
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-symbol @var{addr}
+@end smallexample
+
+Describe what symbol is at location @var{addr}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info symbol}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-list-functions} Command
+@findex -symbol-list-functions
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-functions
+@end smallexample
+
+List the functions in the executable.
+
+@subsubheading @value{GDBN} Command
+
+@samp{info functions} in @value{GDBN}, @samp{gdb_listfunc} and
+@samp{gdb_search} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-list-types} Command
+@findex -symbol-list-types
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-types
+@end smallexample
+
+List all the type names.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding commands are @samp{info types} in @value{GDBN},
+@samp{gdb_search} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-list-variables} Command
+@findex -symbol-list-variables
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-variables
+@end smallexample
+
+List all the global and static variable names.
+
+@subsubheading @value{GDBN} Command
+
+@samp{info variables} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-locate} Command
+@findex -symbol-locate
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-locate
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+@samp{gdb_loc} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-type} Command
+@findex -symbol-type
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-type @var{variable}
+@end smallexample
+
+Show type of @var{variable}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{ptype}, @code{gdbtk} has
+@samp{gdb_obj_variable}.
+
+@subsubheading Example
+N.A.
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Target Manipulation
+@section @sc{gdb/mi} Target Manipulation Commands
+
+
+@subheading The @code{-target-attach} Command
+@findex -target-attach
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-attach @var{pid} | @var{file}
+@end smallexample
+
+Attach to a process @var{pid} or a file @var{file} outside of @value{GDBN}.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{attach}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-compare-sections} Command
+@findex -target-compare-sections
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-compare-sections [ @var{section} ]
+@end smallexample
+
+Compare data of section @var{section} on target to the exec file.
+Without the argument, all sections are compared.
+
+@subsubheading @value{GDBN} Command
+
+The @value{GDBN} equivalent is @samp{compare-sections}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-detach} Command
+@findex -target-detach
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-detach
+@end smallexample
+
+Disconnect from the remote target. There's no output.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{detach}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-target-detach
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-target-download} Command
+@findex -target-download
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-download
+@end smallexample
+
+Loads the executable onto the remote target.
+It prints out an update message every half second, which includes the fields:
+
+@table @samp
+@item section
+The name of the section.
+@item section-sent
+The size of what has been sent so far for that section.
+@item section-size
+The size of the section.
+@item total-sent
+The total size of what was sent so far (the current and the previous sections).
+@item total-size
+The size of the overall executable to download.
+@end table
+
+@noindent
+Each message is sent as status record (@pxref{GDB/MI Output Syntax, ,
+@sc{gdb/mi} Output Syntax}).
+
+In addition, it prints the name and size of the sections, as they are
+downloaded. These messages include the following fields:
+
+@table @samp
+@item section
+The name of the section.
+@item section-size
+The size of the section.
+@item total-size
+The size of the overall executable to download.
+@end table
+
+@noindent
+At the end, a summary is printed.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{load}.
+
+@subsubheading Example
+
+Note: each status message appears on a single line. Here the messages
+have been broken down so that they can fit onto a page.
+
+@smallexample
+(@value{GDBP})
+-target-download
++download,@{section=".text",section-size="6668",total-size="9880"@}
++download,@{section=".text",section-sent="512",section-size="6668",
+total-sent="512",total-size="9880"@}
++download,@{section=".text",section-sent="1024",section-size="6668",
+total-sent="1024",total-size="9880"@}
++download,@{section=".text",section-sent="1536",section-size="6668",
+total-sent="1536",total-size="9880"@}
++download,@{section=".text",section-sent="2048",section-size="6668",
+total-sent="2048",total-size="9880"@}
++download,@{section=".text",section-sent="2560",section-size="6668",
+total-sent="2560",total-size="9880"@}
++download,@{section=".text",section-sent="3072",section-size="6668",
+total-sent="3072",total-size="9880"@}
++download,@{section=".text",section-sent="3584",section-size="6668",
+total-sent="3584",total-size="9880"@}
++download,@{section=".text",section-sent="4096",section-size="6668",
+total-sent="4096",total-size="9880"@}
++download,@{section=".text",section-sent="4608",section-size="6668",
+total-sent="4608",total-size="9880"@}
++download,@{section=".text",section-sent="5120",section-size="6668",
+total-sent="5120",total-size="9880"@}
++download,@{section=".text",section-sent="5632",section-size="6668",
+total-sent="5632",total-size="9880"@}
++download,@{section=".text",section-sent="6144",section-size="6668",
+total-sent="6144",total-size="9880"@}
++download,@{section=".text",section-sent="6656",section-size="6668",
+total-sent="6656",total-size="9880"@}
++download,@{section=".init",section-size="28",total-size="9880"@}
++download,@{section=".fini",section-size="28",total-size="9880"@}
++download,@{section=".data",section-size="3156",total-size="9880"@}
++download,@{section=".data",section-sent="512",section-size="3156",
+total-sent="7236",total-size="9880"@}
++download,@{section=".data",section-sent="1024",section-size="3156",
+total-sent="7748",total-size="9880"@}
++download,@{section=".data",section-sent="1536",section-size="3156",
+total-sent="8260",total-size="9880"@}
++download,@{section=".data",section-sent="2048",section-size="3156",
+total-sent="8772",total-size="9880"@}
++download,@{section=".data",section-sent="2560",section-size="3156",
+total-sent="9284",total-size="9880"@}
++download,@{section=".data",section-sent="3072",section-size="3156",
+total-sent="9796",total-size="9880"@}
+^done,address="0x10004",load-size="9880",transfer-rate="6586",
+write-rate="429"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-target-exec-status} Command
+@findex -target-exec-status
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-exec-status
+@end smallexample
+
+Provide information on the state of the target (whether it is running or
+not, for instance).
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-list-available-targets} Command
+@findex -target-list-available-targets
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-list-available-targets
+@end smallexample
+
+List the possible targets to connect to.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{help target}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-list-current-targets} Command
+@findex -target-list-current-targets
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-list-current-targets
+@end smallexample
+
+Describe the current target.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding information is printed by @samp{info file} (among
+other things).
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-list-parameters} Command
+@findex -target-list-parameters
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-list-parameters
+@end smallexample
+
+@c ????
+
+@subsubheading @value{GDBN} Command
+
+No equivalent.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-select} Command
+@findex -target-select
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-select @var{type} @var{parameters @dots{}}
+@end smallexample
+
+Connect @value{GDBN} to the remote target. This command takes two args:
+
+@table @samp
+@item @var{type}
+The type of target, for instance @samp{async}, @samp{remote}, etc.
+@item @var{parameters}
+Device names, host names and the like. @xref{Target Commands, ,
+Commands for managing targets}, for more details.
+@end table
+
+The output is a connection notification, followed by the address at
+which the target program is, in the following form:
+
+@smallexample
+^connected,addr="@var{address}",func="@var{function name}",
+ args=[@var{arg list}]
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{target}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-target-select async /dev/ttya
+^connected,addr="0xfe00a300",func="??",args=[]
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Thread Commands
+@section @sc{gdb/mi} Thread Commands
+
+
+@subheading The @code{-thread-info} Command
+@findex -thread-info
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-info
+@end smallexample
+
+@subsubheading @value{GDBN} command
+
+No equivalent.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-thread-list-all-threads} Command
+@findex -thread-list-all-threads
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-list-all-threads
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+The equivalent @value{GDBN} command is @samp{info threads}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-thread-list-ids} Command
+@findex -thread-list-ids
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-list-ids
+@end smallexample
+
+Produces a list of the currently known @value{GDBN} thread ids. At the
+end of the list it also prints the total number of such threads.
+
+@subsubheading @value{GDBN} Command
+
+Part of @samp{info threads} supplies the same information.
+
+@subsubheading Example
+
+No threads present, besides the main process:
+
+@smallexample
+(@value{GDBP})
+-thread-list-ids
+^done,thread-ids=@{@},number-of-threads="0"
+(@value{GDBP})
+@end smallexample
+
+
+Several threads:
+
+@smallexample
+(@value{GDBP})
+-thread-list-ids
+^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
+number-of-threads="3"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-thread-select} Command
+@findex -thread-select
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-select @var{threadnum}
+@end smallexample
+
+Make @var{threadnum} the current thread. It prints the number of the new
+current thread, and the topmost frame for that thread.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{thread}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-next
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",thread-id="2",line="187",
+file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"
+(@value{GDBP})
+-thread-list-ids
+^done,
+thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
+number-of-threads="3"
+(@value{GDBP})
+-thread-select 3
+^done,new-thread-id="3",
+frame=@{level="0",func="vprintf",
+args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
+@{name="arg",value="0x2"@}],file="vprintf.c",line="31"@}
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Tracepoint Commands
+@section @sc{gdb/mi} Tracepoint Commands
+
+The tracepoint commands are not yet implemented.
+
+@c @subheading -trace-actions
+
+@c @subheading -trace-delete
+
+@c @subheading -trace-disable
+
+@c @subheading -trace-dump
+
+@c @subheading -trace-enable
+
+@c @subheading -trace-exists
+
+@c @subheading -trace-find
+
+@c @subheading -trace-frame-number
+
+@c @subheading -trace-info
+
+@c @subheading -trace-insert
+
+@c @subheading -trace-list
+
+@c @subheading -trace-pass-count
+
+@c @subheading -trace-save
+
+@c @subheading -trace-start
+
+@c @subheading -trace-stop
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Variable Objects
+@section @sc{gdb/mi} Variable Objects
+
+
+@subheading Motivation for Variable Objects in @sc{gdb/mi}
+
+For the implementation of a variable debugger window (locals, watched
+expressions, etc.), we are proposing the adaptation of the existing code
+used by @code{Insight}.
+
+The two main reasons for that are:
+
+@enumerate 1
+@item
+It has been proven in practice (it is already on its second generation).
+
+@item
+It will shorten development time (needless to say how important it is
+now).
+@end enumerate
+
+The original interface was designed to be used by Tcl code, so it was
+slightly changed so it could be used through @sc{gdb/mi}. This section
+describes the @sc{gdb/mi} operations that will be available and gives some
+hints about their use.
+
+@emph{Note}: In addition to the set of operations described here, we
+expect the @sc{gui} implementation of a variable window to require, at
+least, the following operations:
+
+@itemize @bullet
+@item @code{-gdb-show} @code{output-radix}
+@item @code{-stack-list-arguments}
+@item @code{-stack-list-locals}
+@item @code{-stack-select-frame}
+@end itemize
+
+@subheading Introduction to Variable Objects in @sc{gdb/mi}
+
+@cindex variable objects in @sc{gdb/mi}
+The basic idea behind variable objects is the creation of a named object
+to represent a variable, an expression, a memory location or even a CPU
+register. For each object created, a set of operations is available for
+examining or changing its properties.
+
+Furthermore, complex data types, such as C structures, are represented
+in a tree format. For instance, the @code{struct} type variable is the
+root and the children will represent the struct members. If a child
+is itself of a complex type, it will also have children of its own.
+Appropriate language differences are handled for C, C@t{++} and Java.
+
+When returning the actual values of the objects, this facility allows
+for the individual selection of the display format used in the result
+creation. It can be chosen among: binary, decimal, hexadecimal, octal
+and natural. Natural refers to a default format automatically
+chosen based on the variable type (like decimal for an @code{int}, hex
+for pointers, etc.).
+
+The following is the complete set of @sc{gdb/mi} operations defined to
+access this functionality:
+
+@multitable @columnfractions .4 .6
+@item @strong{Operation}
+@tab @strong{Description}
+
+@item @code{-var-create}
+@tab create a variable object
+@item @code{-var-delete}
+@tab delete the variable object and its children
+@item @code{-var-set-format}
+@tab set the display format of this variable
+@item @code{-var-show-format}
+@tab show the display format of this variable
+@item @code{-var-info-num-children}
+@tab tells how many children this object has
+@item @code{-var-list-children}
+@tab return a list of the object's children
+@item @code{-var-info-type}
+@tab show the type of this variable object
+@item @code{-var-info-expression}
+@tab print what this variable object represents
+@item @code{-var-show-attributes}
+@tab is this variable editable? does it exist here?
+@item @code{-var-evaluate-expression}
+@tab get the value of this variable
+@item @code{-var-assign}
+@tab set the value of this variable
+@item @code{-var-update}
+@tab update the variable and its children
+@end multitable
+
+In the next subsection we describe each operation in detail and suggest
+how it can be used.
+
+@subheading Description And Use of Operations on Variable Objects
+
+@subheading The @code{-var-create} Command
+@findex -var-create
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-create @{@var{name} | "-"@}
+ @{@var{frame-addr} | "*"@} @var{expression}
+@end smallexample
+
+This operation creates a variable object, which allows the monitoring of
+a variable, the result of an expression, a memory cell or a CPU
+register.
+
+The @var{name} parameter is the string by which the object can be
+referenced. It must be unique. If @samp{-} is specified, the varobj
+system will generate a string ``varNNNNNN'' automatically. It will be
+unique provided that one does not specify @var{name} on that format.
+The command fails if a duplicate name is found.
+
+The frame under which the expression should be evaluated can be
+specified by @var{frame-addr}. A @samp{*} indicates that the current
+frame should be used.
+
+@var{expression} is any expression valid on the current language set (must not
+begin with a @samp{*}), or one of the following:
+
+@itemize @bullet
+@item
+@samp{*@var{addr}}, where @var{addr} is the address of a memory cell
+
+@item
+@samp{*@var{addr}-@var{addr}} --- a memory address range (TBD)
+
+@item
+@samp{$@var{regname}} --- a CPU register name
+@end itemize
+
+@subsubheading Result
+
+This operation returns the name, number of children and the type of the
+object created. Type is returned as a string as the ones generated by
+the @value{GDBN} CLI:
+
+@smallexample
+ name="@var{name}",numchild="N",type="@var{type}"
+@end smallexample
+
+
+@subheading The @code{-var-delete} Command
+@findex -var-delete
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-delete @var{name}
+@end smallexample
+
+Deletes a previously created variable object and all of its children.
+
+Returns an error if the object @var{name} is not found.
+
+
+@subheading The @code{-var-set-format} Command
+@findex -var-set-format
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-set-format @var{name} @var{format-spec}
+@end smallexample
+
+Sets the output format for the value of the object @var{name} to be
+@var{format-spec}.
+
+The syntax for the @var{format-spec} is as follows:
+
+@smallexample
+ @var{format-spec} @expansion{}
+ @{binary | decimal | hexadecimal | octal | natural@}
+@end smallexample
+
+
+@subheading The @code{-var-show-format} Command
+@findex -var-show-format
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-show-format @var{name}
+@end smallexample
+
+Returns the format used to display the value of the object @var{name}.
+
+@smallexample
+ @var{format} @expansion{}
+ @var{format-spec}
+@end smallexample
+
+
+@subheading The @code{-var-info-num-children} Command
+@findex -var-info-num-children
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-info-num-children @var{name}
+@end smallexample
+
+Returns the number of children of a variable object @var{name}:
+
+@smallexample
+ numchild=@var{n}
+@end smallexample
+
+
+@subheading The @code{-var-list-children} Command
+@findex -var-list-children
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-list-children @var{name}
+@end smallexample
+
+Returns a list of the children of the specified variable object:
+
+@smallexample
+ numchild=@var{n},children=[@{name=@var{name},
+ numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
+@end smallexample
+
+
+@subheading The @code{-var-info-type} Command
+@findex -var-info-type
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-info-type @var{name}
+@end smallexample
+
+Returns the type of the specified variable @var{name}. The type is
+returned as a string in the same format as it is output by the
+@value{GDBN} CLI:
+
+@smallexample
+ type=@var{typename}
+@end smallexample
+
+
+@subheading The @code{-var-info-expression} Command
+@findex -var-info-expression
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-info-expression @var{name}
+@end smallexample
+
+Returns what is represented by the variable object @var{name}:
+
+@smallexample
+ lang=@var{lang-spec},exp=@var{expression}
+@end smallexample
+
+@noindent
+where @var{lang-spec} is @code{@{"C" | "C++" | "Java"@}}.
+
+@subheading The @code{-var-show-attributes} Command
+@findex -var-show-attributes
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-show-attributes @var{name}
+@end smallexample
+
+List attributes of the specified variable object @var{name}:
+
+@smallexample
+ status=@var{attr} [ ( ,@var{attr} )* ]
+@end smallexample
+
+@noindent
+where @var{attr} is @code{@{ @{ editable | noneditable @} | TBD @}}.
+
+@subheading The @code{-var-evaluate-expression} Command
+@findex -var-evaluate-expression
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-evaluate-expression @var{name}
+@end smallexample
+
+Evaluates the expression that is represented by the specified variable
+object and returns its value as a string in the current format specified
+for the object:
+
+@smallexample
+ value=@var{value}
+@end smallexample
+
+Note that one must invoke @code{-var-list-children} for a variable
+before the value of a child variable can be evaluated.
+
+@subheading The @code{-var-assign} Command
+@findex -var-assign
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-assign @var{name} @var{expression}
+@end smallexample
+
+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
+subsequent @code{-var-update} list.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-var-assign var1 3
+^done,value="3"
+(@value{GDBP})
+-var-update *
+^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}]
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-var-update} Command
+@findex -var-update
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-update @{@var{name} | "*"@}
+@end smallexample
+
+Update the value of the variable object @var{name} by evaluating its
+expression after fetching all the new values from memory or registers.
+A @samp{*} causes all existing variable objects to be updated.
+
+
+@node Annotations
+@chapter @value{GDBN} Annotations
+
+This chapter describes annotations in @value{GDBN}. Annotations are
+designed to interface @value{GDBN} to graphical user interfaces or
+other similar programs which want to interact with @value{GDBN} at a
+relatively high level.
+
+@ignore
+This is Edition @value{EDITION}, @value{DATE}.
+@end ignore
+
+@menu
+* Annotations Overview:: What annotations are; the general syntax.
+* Server Prefix:: Issuing a command without affecting user state.
+* Value Annotations:: Values are marked as such.
+* Frame Annotations:: Stack frames are annotated.
+* Displays:: @value{GDBN} can be told to display something periodically.
+* Prompting:: Annotations marking @value{GDBN}'s need for input.
+* Errors:: Annotations for error messages.
+* Breakpoint Info:: Information on breakpoints.
+* Invalidation:: Some annotations describe things now invalid.
+* Annotations for Running::
+ Whether the program is running, how it stopped, etc.
+* Source Annotations:: Annotations describing source code.
+* TODO:: Annotations which might be added in the future.
+@end menu
+
+@node Annotations Overview
+@section What is an Annotation?
+@cindex annotations
+
+To produce annotations, start @value{GDBN} with the @code{--annotate=2} option.
+
+Annotations start with a newline character, two @samp{control-z}
+characters, and the name of the annotation. If there is no additional
+information associated with this annotation, the name of the annotation
+is followed immediately by a newline. If there is additional
+information, the name of the annotation is followed by a space, the
+additional information, and a newline. The additional information
+cannot contain newline characters.
+
+Any output not beginning with a newline and two @samp{control-z}
+characters denotes literal output from @value{GDBN}. Currently there is
+no need for @value{GDBN} to output a newline followed by two
+@samp{control-z} characters, but if there was such a need, the
+annotations could be extended with an @samp{escape} annotation which
+means those three characters as output.
+
+A simple example of starting up @value{GDBN} with annotations is:
+
+@smallexample
+$ gdb --annotate=2
+GNU GDB 5.0
+Copyright 2000 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License,
+and you are welcome to change it and/or distribute copies of it
+under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB. Type "show warranty"
+for details.
+This GDB was configured as "sparc-sun-sunos4.1.3"
+
+^Z^Zpre-prompt
+(gdb)
+^Z^Zprompt
+quit
+
+^Z^Zpost-prompt
+$
+@end smallexample
+
+Here @samp{quit} is input to @value{GDBN}; the rest is output from
+@value{GDBN}. The three lines beginning @samp{^Z^Z} (where @samp{^Z}
+denotes a @samp{control-z} character) are annotations; the rest is
+output from @value{GDBN}.
+
+@node Server Prefix
+@section The Server Prefix
+@cindex server prefix for annotations
+
+To issue a command to @value{GDBN} without affecting certain aspects of
+the state which is seen by users, prefix it with @samp{server }. This
+means that this command will not affect the command history, nor will it
+affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
+pressed on a line by itself.
+
+The server prefix does not affect the recording of values into the value
+history; to print a value without recording it into the value history,
+use the @code{output} command instead of the @code{print} command.
+
+@node Value Annotations
+@section Values
+
+@cindex annotations for values
+When a value is printed in various contexts, @value{GDBN} uses
+annotations to delimit the value from the surrounding text.
+
+@findex value-history-begin
+@findex value-history-value
+@findex value-history-end
+If a value is printed using @code{print} and added to the value history,
+the annotation looks like
+
+@smallexample
+^Z^Zvalue-history-begin @var{history-number} @var{value-flags}
+@var{history-string}
+^Z^Zvalue-history-value
+@var{the-value}
+^Z^Zvalue-history-end
+@end smallexample
+
+@noindent
+where @var{history-number} is the number it is getting in the value
+history, @var{history-string} is a string, such as @samp{$5 = }, which
+introduces the value to the user, @var{the-value} is the output
+corresponding to the value itself, and @var{value-flags} is @samp{*} for
+a value which can be dereferenced and @samp{-} for a value which cannot.
+
+@findex value-begin
+@findex value-end
+If the value is not added to the value history (it is an invalid float
+or it is printed with the @code{output} command), the annotation is similar:
+
+@smallexample
+^Z^Zvalue-begin @var{value-flags}
+@var{the-value}
+^Z^Zvalue-end
+@end smallexample
+
+@findex arg-begin
+@findex arg-name-end
+@findex arg-value
+@findex arg-end
+When @value{GDBN} prints an argument to a function (for example, in the output
+from the @code{backtrace} command), it annotates it as follows:
+
+@smallexample
+^Z^Zarg-begin
+@var{argument-name}
+^Z^Zarg-name-end
+@var{separator-string}
+^Z^Zarg-value @var{value-flags}
+@var{the-value}
+^Z^Zarg-end
+@end smallexample
+
+@noindent
+where @var{argument-name} is the name of the argument,
+@var{separator-string} is text which separates the name from the value
+for the user's benefit (such as @samp{=}), and @var{value-flags} and
+@var{the-value} have the same meanings as in a
+@code{value-history-begin} annotation.
+
+@findex field-begin
+@findex field-name-end
+@findex field-value
+@findex field-end
+When printing a structure, @value{GDBN} annotates it as follows:
+
+@smallexample
+^Z^Zfield-begin @var{value-flags}
+@var{field-name}
+^Z^Zfield-name-end
+@var{separator-string}
+^Z^Zfield-value
+@var{the-value}
+^Z^Zfield-end
+@end smallexample
+
+@noindent
+where @var{field-name} is the name of the field, @var{separator-string}
+is text which separates the name from the value for the user's benefit
+(such as @samp{=}), and @var{value-flags} and @var{the-value} have the
+same meanings as in a @code{value-history-begin} annotation.
+
+When printing an array, @value{GDBN} annotates it as follows:
+
+@smallexample
+^Z^Zarray-section-begin @var{array-index} @var{value-flags}
+@end smallexample
+
+@noindent
+where @var{array-index} is the index of the first element being
+annotated and @var{value-flags} has the same meaning as in a
+@code{value-history-begin} annotation. This is followed by any number
+of elements, where is element can be either a single element:
+
+@findex elt
+@smallexample
+@samp{,} @var{whitespace} ; @r{omitted for the first element}
+@var{the-value}
+^Z^Zelt
+@end smallexample
+
+or a repeated element
+
+@findex elt-rep
+@findex elt-rep-end
+@smallexample
+@samp{,} @var{whitespace} ; @r{omitted for the first element}
+@var{the-value}
+^Z^Zelt-rep @var{number-of-repetitions}
+@var{repetition-string}
+^Z^Zelt-rep-end
+@end smallexample
+
+In both cases, @var{the-value} is the output for the value of the
+element and @var{whitespace} can contain spaces, tabs, and newlines. In
+the repeated case, @var{number-of-repetitions} is the number of
+consecutive array elements which contain that value, and
+@var{repetition-string} is a string which is designed to convey to the
+user that repetition is being depicted.
+
+@findex array-section-end
+Once all the array elements have been output, the array annotation is
+ended with
+
+@smallexample
+^Z^Zarray-section-end
+@end smallexample
+
+@node Frame Annotations
+@section Frames
+
+@cindex annotations for frames
+Whenever @value{GDBN} prints a frame, it annotates it. For example, this applies
+to frames printed when @value{GDBN} stops, output from commands such as
+@code{backtrace} or @code{up}, etc.
+
+@findex frame-begin
+The frame annotation begins with
+
+@smallexample
+^Z^Zframe-begin @var{level} @var{address}
+@var{level-string}
+@end smallexample
+
+@noindent
+where @var{level} is the number of the frame (0 is the innermost frame,
+and other frames have positive numbers), @var{address} is the address of
+the code executing in that frame, and @var{level-string} is a string
+designed to convey the level to the user. @var{address} is in the form
+@samp{0x} followed by one or more lowercase hex digits (note that this
+does not depend on the language). The frame ends with
+
+@findex frame-end
+@smallexample
+^Z^Zframe-end
+@end smallexample
+
+Between these annotations is the main body of the frame, which can
+consist of
+
+@itemize @bullet
+@item
+@findex function-call
+@smallexample
+^Z^Zfunction-call
+@var{function-call-string}
+@end smallexample
+
+where @var{function-call-string} is text designed to convey to the user
+that this frame is associated with a function call made by @value{GDBN} to a
+function in the program being debugged.
+
+@item
+@findex signal-handler-caller
+@smallexample
+^Z^Zsignal-handler-caller
+@var{signal-handler-caller-string}
+@end smallexample
+
+where @var{signal-handler-caller-string} is text designed to convey to
+the user that this frame is associated with whatever mechanism is used
+by this operating system to call a signal handler (it is the frame which
+calls the signal handler, not the frame for the signal handler itself).
+
+@item
+A normal frame.
+
+@findex frame-address
+@findex frame-address-end
+This can optionally (depending on whether this is thought of as
+interesting information for the user to see) begin with
+
+@smallexample
+^Z^Zframe-address
+@var{address}
+^Z^Zframe-address-end
+@var{separator-string}
+@end smallexample
+
+where @var{address} is the address executing in the frame (the same
+address as in the @code{frame-begin} annotation, but printed in a form
+which is intended for user consumption---in particular, the syntax varies
+depending on the language), and @var{separator-string} is a string
+intended to separate this address from what follows for the user's
+benefit.
+
+@findex frame-function-name
+@findex frame-args
+Then comes
+
+@smallexample
+^Z^Zframe-function-name
+@var{function-name}
+^Z^Zframe-args
+@var{arguments}
+@end smallexample
+
+where @var{function-name} is the name of the function executing in the
+frame, or @samp{??} if not known, and @var{arguments} are the arguments
+to the frame, with parentheses around them (each argument is annotated
+individually as well, @pxref{Value Annotations}).
+
+@findex frame-source-begin
+@findex frame-source-file
+@findex frame-source-file-end
+@findex frame-source-line
+@findex frame-source-end
+If source information is available, a reference to it is then printed:
+
+@smallexample
+^Z^Zframe-source-begin
+@var{source-intro-string}
+^Z^Zframe-source-file
+@var{filename}
+^Z^Zframe-source-file-end
+:
+^Z^Zframe-source-line
+@var{line-number}
+^Z^Zframe-source-end
+@end smallexample
+
+where @var{source-intro-string} separates for the user's benefit the
+reference from the text which precedes it, @var{filename} is the name of
+the source file, and @var{line-number} is the line number within that
+file (the first line is line 1).
+
+@findex frame-where
+If @value{GDBN} prints some information about where the frame is from (which
+library, which load segment, etc.; currently only done on the RS/6000),
+it is annotated with
+
+@smallexample
+^Z^Zframe-where
+@var{information}
+@end smallexample
+
+Then, if source is to actually be displayed for this frame (for example,
+this is not true for output from the @code{backtrace} command), then a
+@code{source} annotation (@pxref{Source Annotations}) is displayed. Unlike
+most annotations, this is output instead of the normal text which would be
+output, not in addition.
+@end itemize
+
+@node Displays
+@section Displays
+
+@findex display-begin
+@findex display-number-end
+@findex display-format
+@findex display-expression
+@findex display-expression-end
+@findex display-value
+@findex display-end
+@cindex annotations for display
+When @value{GDBN} is told to display something using the @code{display} command,
+the results of the display are annotated:
+
+@smallexample
+^Z^Zdisplay-begin
+@var{number}
+^Z^Zdisplay-number-end
+@var{number-separator}
+^Z^Zdisplay-format
+@var{format}
+^Z^Zdisplay-expression
+@var{expression}
+^Z^Zdisplay-expression-end
+@var{expression-separator}
+^Z^Zdisplay-value
+@var{value}
+^Z^Zdisplay-end
+@end smallexample
+
+@noindent
+where @var{number} is the number of the display, @var{number-separator}
+is intended to separate the number from what follows for the user,
+@var{format} includes information such as the size, format, or other
+information about how the value is being displayed, @var{expression} is
+the expression being displayed, @var{expression-separator} is intended
+to separate the expression from the text that follows for the user,
+and @var{value} is the actual value being displayed.
+
+@node Prompting
+@section Annotation for @value{GDBN} Input
+
+@cindex annotations for prompts
+When @value{GDBN} prompts for input, it annotates this fact so it is possible
+to know when to send output, when the output from a given command is
+over, etc.
+
+Different kinds of input each have a different @dfn{input type}. Each
+input type has three annotations: a @code{pre-} annotation, which
+denotes the beginning of any prompt which is being output, a plain
+annotation, which denotes the end of the prompt, and then a @code{post-}
+annotation which denotes the end of any echo which may (or may not) be
+associated with the input. For example, the @code{prompt} input type
+features the following annotations:
+
+@smallexample
+^Z^Zpre-prompt
+^Z^Zprompt
+^Z^Zpost-prompt
+@end smallexample
+
+The input types are
+
+@table @code
+@findex pre-prompt
+@findex prompt
+@findex post-prompt
+@item prompt
+When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
+
+@findex pre-commands
+@findex commands
+@findex post-commands
+@item commands
+When @value{GDBN} prompts for a set of commands, like in the @code{commands}
+command. The annotations are repeated for each command which is input.
+
+@findex pre-overload-choice
+@findex overload-choice
+@findex post-overload-choice
+@item overload-choice
+When @value{GDBN} wants the user to select between various overloaded functions.
+
+@findex pre-query
+@findex query
+@findex post-query
+@item query
+When @value{GDBN} wants the user to confirm a potentially dangerous operation.
+
+@findex pre-prompt-for-continue
+@findex prompt-for-continue
+@findex post-prompt-for-continue
+@item prompt-for-continue
+When @value{GDBN} is asking the user to press return to continue. Note: Don't
+expect this to work well; instead use @code{set height 0} to disable
+prompting. This is because the counting of lines is buggy in the
+presence of annotations.
+@end table
+
+@node Errors
+@section Errors
+@cindex annotations for errors, warnings and interrupts
+
+@findex quit
+@smallexample
+^Z^Zquit
+@end smallexample
+
+This annotation occurs right before @value{GDBN} responds to an interrupt.
+
+@findex error
+@smallexample
+^Z^Zerror
+@end smallexample
+
+This annotation occurs right before @value{GDBN} responds to an error.
+
+Quit and error annotations indicate that any annotations which @value{GDBN} was
+in the middle of may end abruptly. For example, if a
+@code{value-history-begin} annotation is followed by a @code{error}, one
+cannot expect to receive the matching @code{value-history-end}. One
+cannot expect not to receive it either, however; an error annotation
+does not necessarily mean that @value{GDBN} is immediately returning all the way
+to the top level.
+
+@findex error-begin
+A quit or error annotation may be preceded by
+
+@smallexample
+^Z^Zerror-begin
+@end smallexample
+
+Any output between that and the quit or error annotation is the error
+message.
+
+Warning messages are not yet annotated.
+@c If we want to change that, need to fix warning(), type_error(),
+@c range_error(), and possibly other places.
+
+@node Breakpoint Info
+@section Information on Breakpoints
+
+@cindex annotations for breakpoints
+The output from the @code{info breakpoints} command is annotated as follows:
+
+@findex breakpoints-headers
+@findex breakpoints-table
+@smallexample
+^Z^Zbreakpoints-headers
+@var{header-entry}
+^Z^Zbreakpoints-table
+@end smallexample
+
+@noindent
+where @var{header-entry} has the same syntax as an entry (see below) but
+instead of containing data, it contains strings which are intended to
+convey the meaning of each field to the user. This is followed by any
+number of entries. If a field does not apply for this entry, it is
+omitted. Fields may contain trailing whitespace. Each entry consists
+of:
+
+@findex record
+@findex field
+@smallexample
+^Z^Zrecord
+^Z^Zfield 0
+@var{number}
+^Z^Zfield 1
+@var{type}
+^Z^Zfield 2
+@var{disposition}
+^Z^Zfield 3
+@var{enable}
+^Z^Zfield 4
+@var{address}
+^Z^Zfield 5
+@var{what}
+^Z^Zfield 6
+@var{frame}
+^Z^Zfield 7
+@var{condition}
+^Z^Zfield 8
+@var{ignore-count}
+^Z^Zfield 9
+@var{commands}
+@end smallexample
+
+Note that @var{address} is intended for user consumption---the syntax
+varies depending on the language.
+
+The output ends with
+
+@findex breakpoints-table-end
+@smallexample
+^Z^Zbreakpoints-table-end
+@end smallexample
+
+@node Invalidation
+@section Invalidation Notices
+
+@cindex annotations for invalidation messages
+The following annotations say that certain pieces of state may have
+changed.
+
+@table @code
+@findex frames-invalid
+@item ^Z^Zframes-invalid
+
+The frames (for example, output from the @code{backtrace} command) may
+have changed.
+
+@findex breakpoints-invalid
+@item ^Z^Zbreakpoints-invalid
+
+The breakpoints may have changed. For example, the user just added or
+deleted a breakpoint.
+@end table
+
+@node Annotations for Running
+@section Running the Program
+@cindex annotations for running programs
+
+@findex starting
+@findex stopping
+When the program starts executing due to a @value{GDBN} command such as
+@code{step} or @code{continue},
+
+@smallexample
+^Z^Zstarting
+@end smallexample
+
+is output. When the program stops,
+
+@smallexample
+^Z^Zstopped
+@end smallexample
+
+is output. Before the @code{stopped} annotation, a variety of
+annotations describe how the program stopped.
+
+@table @code
+@findex exited
+@item ^Z^Zexited @var{exit-status}
+The program exited, and @var{exit-status} is the exit status (zero for
+successful exit, otherwise nonzero).
+
+@findex signalled
+@findex signal-name
+@findex signal-name-end
+@findex signal-string
+@findex signal-string-end
+@item ^Z^Zsignalled
+The program exited with a signal. After the @code{^Z^Zsignalled}, the
+annotation continues:
+
+@smallexample
+@var{intro-text}
+^Z^Zsignal-name
+@var{name}
+^Z^Zsignal-name-end
+@var{middle-text}
+^Z^Zsignal-string
+@var{string}
+^Z^Zsignal-string-end
+@var{end-text}
+@end smallexample
+
+@noindent
+where @var{name} is the name of the signal, such as @code{SIGILL} or
+@code{SIGSEGV}, and @var{string} is the explanation of the signal, such
+as @code{Illegal Instruction} or @code{Segmentation fault}.
+@var{intro-text}, @var{middle-text}, and @var{end-text} are for the
+user's benefit and have no particular format.
+
+@findex signal
+@item ^Z^Zsignal
+The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
+just saying that the program received the signal, not that it was
+terminated with it.
+
+@findex breakpoint
+@item ^Z^Zbreakpoint @var{number}
+The program hit breakpoint number @var{number}.
+
+@findex watchpoint
+@item ^Z^Zwatchpoint @var{number}
+The program hit watchpoint number @var{number}.
+@end table
+
+@node Source Annotations
+@section Displaying Source
+@cindex annotations for source display
+
+@findex source
+The following annotation is used instead of displaying source code:
+
+@smallexample
+^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr}
+@end smallexample
+
+where @var{filename} is an absolute file name indicating which source
+file, @var{line} is the line number within that file (where 1 is the
+first line in the file), @var{character} is the character position
+within the file (where 0 is the first character in the file) (for most
+debug formats this will necessarily point to the beginning of a line),
+@var{middle} is @samp{middle} if @var{addr} is in the middle of the
+line, or @samp{beg} if @var{addr} is at the beginning of the line, and
+@var{addr} is the address in the target program associated with the
+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).
+
+@node TODO
+@section Annotations We Might Want in the Future
+
+@format
+ - target-invalid
+ the target might have changed (registers, heap contents, or
+ execution status). For performance, we might eventually want
+ to hit `registers-invalid' and `all-registers-invalid' with
+ greater precision
+
+ - systematic annotation for set/show parameters (including
+ invalidation notices).
+
+ - similarly, `info' returns a list of candidates for invalidation
+ notices.
+@end format
@node GDB Bugs
@chapter Reporting Bugs in @value{GDBN}
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 0522d726ade..9df6edffffc 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -3084,11 +3084,6 @@ custom breakpoint insertion and removal routines if
@code{BREAKPOINT_FROM_PC} needs to read the target's memory for some
reason.
-@item CALL_DUMMY_P
-@findex CALL_DUMMY_P
-A C expression that is non-zero when the target supports inferior function
-calls.
-
@item CALL_DUMMY_WORDS
@findex CALL_DUMMY_WORDS
Pointer to an array of @code{LONGEST} words of data containing
@@ -3101,8 +3096,8 @@ data.
@item SIZEOF_CALL_DUMMY_WORDS
@findex SIZEOF_CALL_DUMMY_WORDS
-The size of @code{CALL_DUMMY_WORDS}. When @code{CALL_DUMMY_P} this must
-return a positive value. See also @code{CALL_DUMMY_LENGTH}.
+The size of @code{CALL_DUMMY_WORDS}. This must return a positive value.
+See also @code{CALL_DUMMY_LENGTH}.
@item CALL_DUMMY
@findex CALL_DUMMY
@@ -3115,7 +3110,7 @@ See the file @file{inferior.h}.
@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_ARGUMENTS}, which can handle
+function is no longer needed. @xref{push_dummy_call}, which can handle
all alignment directly.
@item CANNOT_FETCH_REGISTER (@var{regno})
@@ -3703,14 +3698,21 @@ definition is only used in generic code when parsing "$ps".)
If defined, used by @code{frame_pop} to remove a stack frame. This
method has been superseeded by generic code.
-@item PUSH_ARGUMENTS (@var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
-@findex PUSH_ARGUMENTS
-@anchor{PUSH_ARGUMENTS}
-Define this to push arguments onto the stack for inferior function
-call. Returns the updated stack pointer value.
+@item push_dummy_call (@var{gdbarch}, @var{regcache}, @var{dummy_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
+@findex push_dummy_call
+@findex DEPRECATED_PUSH_ARGUMENTS.
+@anchor{push_dummy_call}
+Define this to push the dummy frame's call to the inferior function onto
+the stack. In addition to pushing @var{nargs}, the code should push
+@var{struct_addr} (when @var{struct_return}), and the return value (in
+the call dummy at @var{dummy_addr}).
+
+Returns the updated top-of-stack pointer.
-@item PUSH_DUMMY_FRAME
-@findex PUSH_DUMMY_FRAME
+This method replaces @code{DEPRECATED_PUSH_ARGUMENTS}.
+
+@item DEPRECATED_PUSH_DUMMY_FRAME
+@findex DEPRECATED_PUSH_DUMMY_FRAME
Used in @samp{call_function_by_hand} to create an artificial stack frame.
@item REGISTER_BYTES
@@ -3770,10 +3772,8 @@ that is at the start of the real function.
@item SP_REGNUM
@findex SP_REGNUM
If the stack-pointer is kept in a register, then define this macro to be
-the number (greater than or equal to zero) of that register.
-
-This should only need to be defined if @code{TARGET_WRITE_SP} and
-@code{TARGET_WRITE_SP} are not defined.
+the number (greater than or equal to zero) of that register, or -1 if
+there is no such register.
@item STAB_REG_TO_REGNUM
@findex STAB_REG_TO_REGNUM
@@ -3880,19 +3880,16 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
@findex TARGET_WRITE_PC
@itemx TARGET_READ_SP
@findex TARGET_READ_SP
-@itemx TARGET_WRITE_SP
-@findex TARGET_WRITE_SP
@itemx TARGET_READ_FP
@findex TARGET_READ_FP
@findex read_pc
@findex write_pc
@findex read_sp
-@findex write_sp
@findex read_fp
These change the behavior of @code{read_pc}, @code{write_pc},
-@code{read_sp}, @code{write_sp} and @code{read_fp}. For most targets,
-these may be left undefined. @value{GDBN} will call the read and write
-register functions with the relevant @code{_REGNUM} argument.
+@code{read_sp} and @code{read_fp}. For most targets, these may be left
+undefined. @value{GDBN} will call the read and write register functions
+with the relevant @code{_REGNUM} argument.
These macros are useful when a target keeps one of these registers in a
hard to get at place; for example, part in a segment register and part
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index a967f3200e8..de48a192a36 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -12,7 +12,7 @@ notifications, the observer attaches a callback to the subject.
One subject can have several observers.
@file{observer.c} implements an internal generic low-level event
-notification mechanism. This generic event notification mechansim is
+notification mechanism. This generic event notification mechanism is
then re-used to implement the exported high-level notification
management routines for all possible notifications.
@@ -27,7 +27,7 @@ as it lacks a mechanism that would deallocate this data when the
callback is detached. This is not a problem so far, as this contextual
data is only used internally to hold a function pointer. Later on, if
a certain observer needs to provide support for user-level contextual
-data, then the generic notification mechanism will need need to be
+data, then the generic notification mechanism will need to be
enhanced to allow the observer to provide a routine to deallocate the
data when attaching the callback.
@@ -39,10 +39,16 @@ or detach routines during a notification.
@cindex @code{normal_stop} observer
@cindex notification about inferior execution stop
-@value{GDBN} will notify all @code{normal_stop} observers when the
-inferior execution has just stopped, and all the associated internal
-processing (such as breakpoint commands, annotations, etc) is about to
-be performed before the @value{GDBN} prompt is returned to the user.
+@value{GDBN} notifies all @code{normal_stop} observers when the
+inferior execution has just stopped, the associated messages and
+annotations have been printed, and the control is about to be returned
+to the user.
+
+Note that the @code{normal_stop} notification is not emitted when
+the execution stops due to a breakpoint, and this breakpoint has
+a condition that is not met. If the breakpoint has any associated
+commands list, the commands are executed after the notification
+is emitted.
The following interface is available to manage @code{normal_stop}
observers:
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 3f7746f235d..f088405213e 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -294,17 +294,6 @@ generic_pop_dummy_frame (void)
discard_innermost_dummy (&dummy_frame_stack);
}
-/* Function: fix_call_dummy
- Stub function. Generic dummy frames typically do not need to fix
- the frame being created */
-
-void
-generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
-{
- return;
-}
-
/* Given a call-dummy dummy-frame, return the registers. Here the
register value is taken from the local copy of the register buffer. */
@@ -368,7 +357,7 @@ dummy_frame_this_id (struct frame_info *next_frame,
just asking for trouble. */
if (gdbarch_unwind_dummy_id_p (current_gdbarch))
{
- /* Assume hand_function_call(), via SAVE_DUMMY_FRAME_TOS,
+ /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
previously saved the dummy frame's ID. Things only work if
the two return the same value. */
gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h
index d1a4bc8b459..bb41e8d7988 100644
--- a/gdb/dummy-frame.h
+++ b/gdb/dummy-frame.h
@@ -41,8 +41,8 @@ struct frame_id;
zero, and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember
to define PUSH_RETURN_ADDRESS, because no call instruction will be
being executed by the target. Also DEPRECATED_FRAME_CHAIN_VALID as
- generic_{file,func}_frame_chain_valid and FIX_CALL_DUMMY as
- generic_fix_call_dummy. */
+ generic_{file,func}_frame_chain_valid and do not set
+ FIX_CALL_DUMMY. */
/* If the PC falls in a dummy frame, return a dummy frame
unwinder. */
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 6d4e7f96233..2a4eac3f119 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -473,6 +473,7 @@ const struct language_defn f_language_defn =
f_val_print, /* Print a value using appropriate syntax */
c_value_print, /* FIXME */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%o", "0", "o", ""}, /* Octal format info */
{"%d", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 7100940897c..beab9fb8fe5 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -508,7 +508,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
case LOC_ARG:
if (frame == NULL)
return 0;
- addr = FRAME_ARGS_ADDRESS (frame);
+ addr = get_frame_args_address (frame);
if (!addr)
return 0;
addr += SYMBOL_VALUE (var);
@@ -520,7 +520,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
CORE_ADDR argref;
if (frame == NULL)
return 0;
- argref = FRAME_ARGS_ADDRESS (frame);
+ argref = get_frame_args_address (frame);
if (!argref)
return 0;
argref += SYMBOL_VALUE (var);
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
new file mode 100644
index 00000000000..f7ba4be1903
--- /dev/null
+++ b/gdb/frame-base.c
@@ -0,0 +1,154 @@
+/* Definitions for frame address handler, for GDB, the GNU debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "frame-base.h"
+#include "frame.h"
+
+/* A default frame base implementations. If it wasn't for the old
+ FRAME_LOCALS_ADDRESS and FRAME_ARGS_ADDRESS, these could be
+ combined into a single function. All architectures really need to
+ override this. */
+
+static CORE_ADDR
+default_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ return get_frame_base (this_frame); /* sigh! */
+}
+
+static CORE_ADDR
+default_frame_locals_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ return FRAME_LOCALS_ADDRESS (this_frame);
+}
+
+static CORE_ADDR
+default_frame_args_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ /* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except
+ that if it is unsure about the answer, it returns 0 instead of
+ guessing (this happens on the VAX and i960, for example).
+
+ On most machines, we never have to guess about the args address,
+ so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */
+#ifdef FRAME_ARGS_ADDRESS_CORRECT
+ return FRAME_ARGS_ADDRESS_CORRECT (this_frame);
+#else
+ return FRAME_ARGS_ADDRESS (this_frame);
+#endif
+}
+
+const struct frame_base default_frame_base = {
+ NULL, /* No parent. */
+ default_frame_base_address,
+ default_frame_locals_address,
+ default_frame_args_address
+};
+
+static struct gdbarch_data *frame_base_data;
+
+struct frame_base_table
+{
+ frame_base_p_ftype **p;
+ const struct frame_base *default_base;
+ int nr;
+};
+
+static void *
+frame_base_init (struct gdbarch *gdbarch)
+{
+ struct frame_base_table *table = XCALLOC (1, struct frame_base_table);
+ table->default_base = &default_frame_base;
+ return table;
+}
+
+static void
+frame_base_free (struct gdbarch *gdbarch, void *data)
+{
+ struct frame_base_table *table =
+ gdbarch_data (gdbarch, frame_base_data);
+ xfree (table->p);
+ xfree (table);
+}
+
+static struct frame_base_table *
+frame_base_table (struct gdbarch *gdbarch)
+{
+ struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+ if (table == NULL)
+ {
+ /* ULGH, called during architecture initialization. Patch
+ things up. */
+ table = frame_base_init (gdbarch);
+ set_gdbarch_data (gdbarch, frame_base_data, table);
+ }
+ return table;
+}
+
+/* Append a predicate to the end of the table. */
+static void
+append_predicate (struct frame_base_table *table, frame_base_p_ftype *p)
+{
+ table->p = xrealloc (table->p, ((table->nr + 1)
+ * sizeof (frame_base_p_ftype *)));
+ table->p[table->nr] = p;
+ table->nr++;
+}
+
+void
+frame_base_append_predicate (struct gdbarch *gdbarch,
+ frame_base_p_ftype *p)
+{
+ struct frame_base_table *table = frame_base_table (gdbarch);
+ append_predicate (table, p);
+}
+
+void
+frame_base_set_default (struct gdbarch *gdbarch,
+ const struct frame_base *default_base)
+{
+ struct frame_base_table *table = frame_base_table (gdbarch);
+ table->default_base = default_base;
+}
+
+const struct frame_base *
+frame_base_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ int i;
+ struct frame_base_table *table = frame_base_table (gdbarch);
+ for (i = 0; i < table->nr; i++)
+ {
+ const struct frame_base *desc = table->p[i] (pc);
+ if (desc != NULL)
+ return desc;
+ }
+ return table->default_base;
+}
+
+void
+_initialize_frame_base (void)
+{
+ frame_base_data = register_gdbarch_data (frame_base_init,
+ frame_base_free);
+}
diff --git a/gdb/frame-base.h b/gdb/frame-base.h
new file mode 100644
index 00000000000..5e0d5db2e25
--- /dev/null
+++ b/gdb/frame-base.h
@@ -0,0 +1,94 @@
+/* Definitions for a frame base, for GDB, the GNU debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined (FRAME_BASE_H)
+#define FRAME_BASE_H 1
+
+struct frame_info;
+struct frame_id;
+struct frame_unwind;
+struct frame_base;
+struct gdbarch;
+struct regcache;
+
+/* Return the frame base methods for the function that contains PC, or
+ NULL if it can't handle this frame. */
+
+typedef const struct frame_base *(frame_base_p_ftype) (CORE_ADDR pc);
+
+/* Add a frame base handler to the list. The predicates are polled in
+ the order that they are appended. */
+
+extern void frame_base_append_predicate (struct gdbarch *gdbarch,
+ frame_base_p_ftype *p);
+
+/* Set the default frame base. If all else fails, this one is
+ returned. If this isn't set, the default is to use legacy code
+ that uses things like the frame ID's base (ulgh!). */
+
+extern void frame_base_set_default (struct gdbarch *gdbarch,
+ const struct frame_base *def);
+
+/* Iterate through the list of frame base handlers until one returns
+ an implementation. */
+
+extern const struct frame_base *frame_base_find_by_pc (struct gdbarch *gdbarch,
+ CORE_ADDR pc);
+
+/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
+ and that this is a `normal frame'; use the NEXT frame, and its
+ register unwind method, to determine the address of THIS frame's
+ `base'.
+
+ The exact meaning of `base' is highly dependant on the type of the
+ debug info. It is assumed that dwarf2, stabs, ... will each
+ provide their own methods.
+
+ A typical implmentation will return the same value for base,
+ locals-base and args-base. That value, however, will likely be
+ different to the frame ID's stack address. */
+
+/* A generic base address. */
+
+typedef CORE_ADDR (frame_this_base_ftype) (struct frame_info *next_frame,
+ void **this_base_cache);
+
+/* The base address of the frame's local variables. */
+
+typedef CORE_ADDR (frame_this_locals_ftype) (struct frame_info *next_frame,
+ void **this_base_cache);
+
+/* The base address of the frame's arguments / parameters. */
+
+typedef CORE_ADDR (frame_this_args_ftype) (struct frame_info *next_frame,
+ void **this_base_cache);
+
+struct frame_base
+{
+ /* If non-NULL, a low-level unwinder that shares its implementation
+ with this high-level frame-base method. */
+ const struct frame_unwind *unwind;
+ frame_this_base_ftype *this_base;
+ frame_this_locals_ftype *this_locals;
+ frame_this_args_ftype *this_args;
+};
+
+#endif
diff --git a/gdb/frame.c b/gdb/frame.c
index 969ead33ef6..09dea5e4c02 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -58,13 +58,19 @@ get_frame_id (struct frame_info *fi)
{
return null_frame_id;
}
- else
+ if (!fi->id_p)
{
- struct frame_id id;
- id.base = fi->frame;
- id.pc = fi->pc;
- return id;
+ gdb_assert (!legacy_frame_p (current_gdbarch));
+ /* Find THIS frame's ID. */
+ fi->unwind->this_id (fi->next, &fi->prologue_cache, &fi->id);
+ fi->id_p = 1;
+ /* FIXME: cagney/2002-12-18: Instead of this hack, should only
+ store the frame ID in PREV_FRAME. Unfortunatly, some
+ architectures (HP/UX) still reply on EXTRA_FRAME_INFO and,
+ hence, still poke at the "struct frame_info" object directly. */
+ fi->frame = fi->id.base;
}
+ return frame_id_build (fi->frame, fi->pc);
}
const struct frame_id null_frame_id; /* All zeros. */
@@ -1039,6 +1045,9 @@ legacy_get_prev_frame (struct frame_info *this_frame)
problem. */
prev->type = NORMAL_FRAME;
+ /* A legacy frame's ID is always computed here. Mark it as valid. */
+ prev->id_p = 1;
+
/* Handle sentinel frame unwind as a special case. */
if (this_frame->level < 0)
{
@@ -1087,7 +1096,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
or some random address on the stack. Trying to use that
PC to apply standard frame ID unwind techniques is just
asking for trouble. */
- /* Assume hand_function_call(), via SAVE_DUMMY_FRAME_TOS,
+ /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
previously saved the dummy frame's ID. Things only work
if the two return the same value. */
gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
@@ -1420,6 +1429,7 @@ get_prev_frame (struct frame_info *this_frame)
return this_frame->prev;
this_frame->prev_p = 1;
+#if 0
/* If we're inside the entry file, it isn't valid. Don't apply this
test to a dummy frame - dummy frame PC's typically land in the
entry file. Don't apply this test to the sentinel frame.
@@ -1431,6 +1441,15 @@ get_prev_frame (struct frame_info *this_frame)
/* NOTE: cagney/2003-01-10: If there is a way of disabling this test
then it should probably be moved to before the ->prev_p test,
above. */
+ /* NOTE: vinschen/2003-04-01: Disabled. It turns out that the call to
+ inside_entry_file destroys a meaningful backtrace under some
+ conditions. E. g. the backtrace tests in the asm-source testcase
+ are broken for some targets. In this test the functions are all
+ implemented as part of one file and the testcase is not necessarily
+ linked with a start file (depending on the target). What happens is,
+ that the first frame is printed normaly and following frames are
+ treated as being inside the enttry file then. This way, only the
+ #0 frame is printed in the backtrace output. */
if (this_frame->type != DUMMY_FRAME && this_frame->level >= 0
&& inside_entry_file (get_frame_pc (this_frame)))
{
@@ -1439,6 +1458,7 @@ get_prev_frame (struct frame_info *this_frame)
"Outermost frame - inside entry file\n");
return NULL;
}
+#endif
/* If we're already inside the entry function for the main objfile,
then it isn't valid. Don't apply this test to a dummy frame -
@@ -1547,24 +1567,7 @@ get_prev_frame (struct frame_info *this_frame)
prev_frame->unwind = frame_unwind_find_by_pc (current_gdbarch,
prev_frame->pc);
- /* Find the prev's frame's ID. */
-
- /* The callee expects to be invoked with:
-
- this->unwind->this_id (this->next, &this->cache, &this->id);
-
- The below is carefully shifted one frame `to the left' so that
- both the unwind->this_id and unwind->prev_register methods are
- consistently invoked with NEXT_FRAME and THIS_PROLOGUE_CACHE.
-
- Also note that, while the PC for this new previous frame was
- unwound first (see above), the below is the first call that
- [potentially] requires analysis of the new previous frame's
- prologue. Consequently, it is this call, that typically ends up
- initializing the previous frame's prologue cache. */
- prev_frame->unwind->this_id (this_frame,
- &prev_frame->prologue_cache,
- &prev_frame->id);
+ /* The prev's frame's ID is computed by demand in get_frame_id(). */
/* The unwound frame ID is validate at the start of this function,
as part of the logic to decide if that frame should be further
@@ -1578,12 +1581,6 @@ get_prev_frame (struct frame_info *this_frame)
return 0 (indicating we don't know the address of the arglist) if
we don't know what frame this frame calls. */
- /* FIXME: cagney/2002-12-18: Instead of this hack, should only store
- the frame ID in PREV_FRAME. Unfortunatly, some architectures
- (HP/UX) still reply on EXTRA_FRAME_INFO and, hence, still poke at
- the "struct frame_info" object directly. */
- prev_frame->frame = prev_frame->id.base;
-
/* Link it in. */
this_frame->prev = prev_frame;
prev_frame->next = this_frame;
@@ -1625,6 +1622,12 @@ find_frame_sal (struct frame_info *frame, struct symtab_and_line *sal)
CORE_ADDR
get_frame_base (struct frame_info *fi)
{
+ if (!fi->id_p)
+ {
+ /* HACK: Force the ID code to (indirectly) initialize the
+ ->frame pointer. */
+ get_frame_id (fi);
+ }
return fi->frame;
}
diff --git a/gdb/frame.h b/gdb/frame.h
index 28426a2819d..231aaadbd0f 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -202,17 +202,17 @@ extern struct frame_id get_frame_id (struct frame_info *fi);
meaningful to the frame's high-level debug info. */
extern CORE_ADDR get_frame_base_address (struct frame_info *);
-/* Assuming that a frame is `normal', return the address of the first
- local variable, or 0 if the information isn't available. NOTE:
+/* Assuming that a frame is `normal', return the base-address of the
+ local variables, or 0 if the information isn't available. NOTE:
This address is really only meaningful to the frame's high-level
debug info. Typically, the argument and locals share a single
base-address. */
extern CORE_ADDR get_frame_locals_address (struct frame_info *);
-/* Assuming that a frame is `normal', return the address of the first
- parameter, or 0 if that information isn't available. NOTE: This
- address is really only meaningful to the frame's high-level debug
- info. Typically, the argument and locals share a single
+/* Assuming that a frame is `normal', return the base-address of the
+ parameter list, or 0 if that information isn't available. NOTE:
+ This address is really only meaningful to the frame's high-level
+ debug info. Typically, the argument and locals share a single
base-address. */
extern CORE_ADDR get_frame_args_address (struct frame_info *);
@@ -410,6 +410,7 @@ struct frame_info
/* This frame's ID. Note that the frame's ID, base and PC contain
redundant information. */
+ int id_p;
struct frame_id id;
/* The frame's high-level base methods, and corresponding cache.
@@ -548,10 +549,6 @@ extern int generic_pc_in_call_dummy (CORE_ADDR pc,
extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
-extern void generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
- int nargs, struct value **args,
- struct type *type, int gcc_p);
-
void generic_unwind_get_saved_register (char *raw_buffer,
int *optimizedp,
CORE_ADDR *addrp,
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index cb8dc55e679..42b471a7e89 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -42,7 +42,6 @@ static gdbarch_use_struct_convention_ftype frv_use_struct_convention;
static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
static gdbarch_init_extra_frame_info_ftype stupid_useless_init_extra_frame_info;
static gdbarch_push_arguments_ftype frv_push_arguments;
-static gdbarch_push_return_address_ftype frv_push_return_address;
static gdbarch_saved_pc_after_call_ftype frv_saved_pc_after_call;
static void frv_pop_frame_regular (struct frame_info *frame);
@@ -1089,15 +1088,12 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
/* Settings for calling functions in the inferior. */
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_push_arguments (gdbarch, frv_push_arguments);
- set_gdbarch_push_return_address (gdbarch, frv_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, frv_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, frv_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, frv_pop_frame);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, frv_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (frv_call_dummy_words));
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, frv_init_extra_frame_info);
/* Settings that should be unnecessary. */
@@ -1107,13 +1103,9 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index c45a70f054f..d08f14652b9 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -66,6 +66,7 @@
#include "gdb-events.h"
#include "reggroups.h"
#include "osabi.h"
+#include "symfile.h" /* For entry_point_address. */
/* Static function declarations */
@@ -148,7 +149,7 @@ struct gdbarch
gdbarch_write_pc_ftype *write_pc;
gdbarch_read_fp_ftype *read_fp;
gdbarch_read_sp_ftype *read_sp;
- gdbarch_write_sp_ftype *write_sp;
+ gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
gdbarch_pseudo_register_read_ftype *pseudo_register_read;
gdbarch_pseudo_register_write_ftype *pseudo_register_write;
@@ -189,10 +190,8 @@ struct gdbarch
gdbarch_call_dummy_address_ftype *call_dummy_address;
CORE_ADDR call_dummy_start_offset;
CORE_ADDR call_dummy_breakpoint_offset;
- int call_dummy_breakpoint_offset_p;
int call_dummy_length;
gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
- int call_dummy_p;
LONGEST * call_dummy_words;
int sizeof_call_dummy_words;
int deprecated_call_dummy_stack_adjust;
@@ -212,9 +211,10 @@ struct gdbarch
gdbarch_address_to_pointer_ftype *address_to_pointer;
gdbarch_integer_to_address_ftype *integer_to_address;
gdbarch_return_value_on_stack_ftype *return_value_on_stack;
- gdbarch_push_arguments_ftype *push_arguments;
+ gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
+ gdbarch_push_dummy_call_ftype *push_dummy_call;
gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
- gdbarch_push_return_address_ftype *push_return_address;
+ gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
gdbarch_extract_return_value_ftype *extract_return_value;
@@ -356,7 +356,6 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
- 0,
generic_pc_in_call_dummy,
0,
0,
@@ -502,7 +501,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->write_pc = generic_target_write_pc;
current_gdbarch->read_fp = generic_target_read_fp;
current_gdbarch->read_sp = generic_target_read_sp;
- current_gdbarch->write_sp = generic_target_write_sp;
current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
current_gdbarch->num_regs = -1;
current_gdbarch->sp_regnum = -1;
@@ -528,12 +526,8 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->cannot_store_register = cannot_register_not;
current_gdbarch->deprecated_use_generic_dummy_frames = 1;
current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
- current_gdbarch->call_dummy_start_offset = -1;
- current_gdbarch->call_dummy_breakpoint_offset = -1;
- current_gdbarch->call_dummy_breakpoint_offset_p = -1;
- current_gdbarch->call_dummy_length = -1;
+ current_gdbarch->call_dummy_address = entry_point_address;
current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
- current_gdbarch->call_dummy_p = -1;
current_gdbarch->call_dummy_words = legacy_call_dummy_words;
current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
current_gdbarch->register_convertible = generic_register_convertible_not;
@@ -543,7 +537,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
- current_gdbarch->push_arguments = default_push_arguments;
current_gdbarch->extract_return_value = legacy_extract_return_value;
current_gdbarch->store_return_value = legacy_store_return_value;
current_gdbarch->use_struct_convention = generic_use_struct_convention;
@@ -631,7 +624,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of write_pc, invalid_p == 0 */
/* Skip verify of read_fp, invalid_p == 0 */
/* Skip verify of read_sp, invalid_p == 0 */
- /* Skip verify of write_sp, invalid_p == 0 */
+ /* Skip verify of deprecated_dummy_write_sp, has predicate */
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
/* Skip verify of pseudo_register_read, has predicate */
/* Skip verify of pseudo_register_write, has predicate */
@@ -675,31 +668,12 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of get_longjmp_target, has predicate */
/* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
/* Skip verify of call_dummy_location, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
- fprintf_unfiltered (log, "\n\tcall_dummy_address");
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_start_offset == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
- if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_breakpoint_offset_p == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_length == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_length");
+ /* Skip verify of call_dummy_address, invalid_p == 0 */
/* Skip verify of deprecated_pc_in_call_dummy, has predicate */
- if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_p == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_p");
/* Skip verify of call_dummy_words, invalid_p == 0 */
/* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
/* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->fix_call_dummy == 0))
- fprintf_unfiltered (log, "\n\tfix_call_dummy");
+ /* Skip verify of fix_call_dummy, has predicate */
/* Skip verify of deprecated_init_frame_pc_first, has predicate */
/* Skip verify of deprecated_init_frame_pc, has predicate */
/* Skip verify of deprecated_get_saved_register, has predicate */
@@ -713,9 +687,10 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of address_to_pointer, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
/* Skip verify of return_value_on_stack, invalid_p == 0 */
- /* Skip verify of push_arguments, invalid_p == 0 */
+ /* Skip verify of deprecated_push_arguments, has predicate */
+ /* Skip verify of push_dummy_call, has predicate */
/* Skip verify of deprecated_push_dummy_frame, has predicate */
- /* Skip verify of push_return_address, has predicate */
+ /* Skip verify of deprecated_push_return_address, has predicate */
/* Skip verify of deprecated_pop_frame, has predicate */
/* Skip verify of deprecated_store_struct_return, has predicate */
/* Skip verify of extract_return_value, invalid_p == 0 */
@@ -953,27 +928,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
- if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
- (long) CALL_DUMMY_BREAKPOINT_OFFSET);
-#endif
-#ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
- XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
- CALL_DUMMY_BREAKPOINT_OFFSET_P);
+ "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
+ (long) CALL_DUMMY_BREAKPOINT_OFFSET);
#endif
#ifdef CALL_DUMMY_LENGTH
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
XSTRING (CALL_DUMMY_LENGTH));
- if (gdbarch->call_dummy_length >= 0)
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
- CALL_DUMMY_LENGTH);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
+ CALL_DUMMY_LENGTH);
#endif
#ifdef CALL_DUMMY_LOCATION
fprintf_unfiltered (file,
@@ -983,20 +948,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
CALL_DUMMY_LOCATION);
#endif
-#ifdef CALL_DUMMY_P
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_P # %s\n",
- XSTRING (CALL_DUMMY_P));
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_P = %d\n",
- CALL_DUMMY_P);
-#endif
#ifdef CALL_DUMMY_START_OFFSET
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
XSTRING (CALL_DUMMY_START_OFFSET));
fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
+ "gdbarch_dump: CALL_DUMMY_START_OFFSET = %ld\n",
(long) CALL_DUMMY_START_OFFSET);
#endif
#ifdef CALL_DUMMY_WORDS
@@ -1125,6 +1082,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_do_registers_info
/*DEPRECATED_DO_REGISTERS_INFO ()*/);
#endif
+#ifdef DEPRECATED_DUMMY_WRITE_SP_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_DUMMY_WRITE_SP_P()",
+ XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
+ DEPRECATED_DUMMY_WRITE_SP_P ());
+#endif
+#ifdef DEPRECATED_DUMMY_WRITE_SP
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_DUMMY_WRITE_SP(val)",
+ XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_dummy_write_sp
+ /*DEPRECATED_DUMMY_WRITE_SP ()*/);
+#endif
#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1413,6 +1393,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_pop_frame
/*DEPRECATED_POP_FRAME ()*/);
#endif
+#ifdef DEPRECATED_PUSH_ARGUMENTS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PUSH_ARGUMENTS_P()",
+ XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
+ DEPRECATED_PUSH_ARGUMENTS_P ());
+#endif
+#ifdef DEPRECATED_PUSH_ARGUMENTS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
+ XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_push_arguments
+ /*DEPRECATED_PUSH_ARGUMENTS ()*/);
+#endif
#ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1436,6 +1436,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_push_dummy_frame
/*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
#endif
+#ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
+ XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
+ DEPRECATED_PUSH_RETURN_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_PUSH_RETURN_ADDRESS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
+ XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_push_return_address
+ /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
+#endif
#ifdef DEPRECATED_STORE_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1585,6 +1605,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->extract_struct_value_address
/*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
#endif
+#ifdef FIX_CALL_DUMMY_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FIX_CALL_DUMMY_P()",
+ XSTRING (FIX_CALL_DUMMY_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n",
+ FIX_CALL_DUMMY_P ());
+#endif
#ifdef FIX_CALL_DUMMY
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1898,37 +1927,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: PS_REGNUM = %d\n",
PS_REGNUM);
#endif
-#ifdef PUSH_ARGUMENTS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
- XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
- "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n",
- (long) current_gdbarch->push_arguments
- /*PUSH_ARGUMENTS ()*/);
-#endif
-#ifdef PUSH_RETURN_ADDRESS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PUSH_RETURN_ADDRESS_P()",
- XSTRING (PUSH_RETURN_ADDRESS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n",
- PUSH_RETURN_ADDRESS_P ());
-#endif
-#ifdef PUSH_RETURN_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PUSH_RETURN_ADDRESS(pc, sp)",
- XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
+ "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
+ gdbarch_push_dummy_call_p (current_gdbarch));
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
- "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->push_return_address
- /*PUSH_RETURN_ADDRESS ()*/);
-#endif
+ "gdbarch_dump: push_dummy_call = 0x%08lx\n",
+ (long) current_gdbarch->push_dummy_call);
#ifdef REGISTER_BYTE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2236,8 +2242,8 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
XSTRING (SIZEOF_CALL_DUMMY_WORDS));
fprintf_unfiltered (file,
- "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
- (long) SIZEOF_CALL_DUMMY_WORDS);
+ "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
+ SIZEOF_CALL_DUMMY_WORDS);
#endif
#ifdef SKIP_PROLOGUE
fprintf_unfiltered (file,
@@ -2557,20 +2563,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->write_pc
/*TARGET_WRITE_PC ()*/);
#endif
-#ifdef TARGET_WRITE_SP
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "TARGET_WRITE_SP(val)",
- XSTRING (TARGET_WRITE_SP (val)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n",
- (long) current_gdbarch->write_sp
- /*TARGET_WRITE_SP ()*/);
-#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
@@ -2919,23 +2911,30 @@ set_gdbarch_read_sp (struct gdbarch *gdbarch,
gdbarch->read_sp = read_sp;
}
+int
+gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_dummy_write_sp != 0;
+}
+
void
-gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
+gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->write_sp == 0)
+ if (gdbarch->deprecated_dummy_write_sp == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_write_sp invalid");
+ "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
- gdbarch->write_sp (val);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
+ gdbarch->deprecated_dummy_write_sp (val);
}
void
-set_gdbarch_write_sp (struct gdbarch *gdbarch,
- gdbarch_write_sp_ftype write_sp)
+set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
+ gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
{
- gdbarch->write_sp = write_sp;
+ gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
}
void
@@ -3717,9 +3716,6 @@ CORE_ADDR
gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_start_offset == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_start_offset invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
return gdbarch->call_dummy_start_offset;
@@ -3736,9 +3732,6 @@ CORE_ADDR
gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
return gdbarch->call_dummy_breakpoint_offset;
@@ -3752,31 +3745,9 @@ set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
}
int
-gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_breakpoint_offset_p == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
- return gdbarch->call_dummy_breakpoint_offset_p;
-}
-
-void
-set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
- int call_dummy_breakpoint_offset_p)
-{
- gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
-}
-
-int
gdbarch_call_dummy_length (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_length == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_length invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
return gdbarch->call_dummy_length;
@@ -3816,25 +3787,6 @@ set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
}
-int
-gdbarch_call_dummy_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_p == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_p invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
- return gdbarch->call_dummy_p;
-}
-
-void
-set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
- int call_dummy_p)
-{
- gdbarch->call_dummy_p = call_dummy_p;
-}
-
LONGEST *
gdbarch_call_dummy_words (struct gdbarch *gdbarch)
{
@@ -3892,6 +3844,13 @@ set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
}
+int
+gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->fix_call_dummy != 0;
+}
+
void
gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
{
@@ -4218,23 +4177,56 @@ set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
gdbarch->return_value_on_stack = return_value_on_stack;
}
+int
+gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_push_arguments != 0;
+}
+
+CORE_ADDR
+gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_push_arguments == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_push_arguments invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
+ return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
+}
+
+void
+set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
+ gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
+{
+ gdbarch->deprecated_push_arguments = deprecated_push_arguments;
+}
+
+int
+gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->push_dummy_call != 0;
+}
+
CORE_ADDR
-gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->push_arguments == 0)
+ if (gdbarch->push_dummy_call == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_push_arguments invalid");
+ "gdbarch: gdbarch_push_dummy_call invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
- return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
+ return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
}
void
-set_gdbarch_push_arguments (struct gdbarch *gdbarch,
- gdbarch_push_arguments_ftype push_arguments)
+set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
+ gdbarch_push_dummy_call_ftype push_dummy_call)
{
- gdbarch->push_arguments = push_arguments;
+ gdbarch->push_dummy_call = push_dummy_call;
}
int
@@ -4264,29 +4256,29 @@ set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
}
int
-gdbarch_push_return_address_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->push_return_address != 0;
+ return gdbarch->deprecated_push_return_address != 0;
}
CORE_ADDR
-gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
+gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->push_return_address == 0)
+ if (gdbarch->deprecated_push_return_address == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_push_return_address invalid");
+ "gdbarch: gdbarch_deprecated_push_return_address invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
- return gdbarch->push_return_address (pc, sp);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
+ return gdbarch->deprecated_push_return_address (pc, sp);
}
void
-set_gdbarch_push_return_address (struct gdbarch *gdbarch,
- gdbarch_push_return_address_ftype push_return_address)
+set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
{
- gdbarch->push_return_address = push_return_address;
+ gdbarch->deprecated_push_return_address = deprecated_push_return_address;
}
int
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index dd66773a8ac..596f13194d3 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -39,6 +39,7 @@
#if !GDB_MULTI_ARCH
/* Pull in function declarations refered to, indirectly, via macros. */
#include "inferior.h" /* For unsigned_address_to_pointer(). */
+#include "symfile.h" /* For entry_point_address(). */
#endif
struct frame_info;
@@ -388,20 +389,42 @@ extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype
#endif
#endif
+/* The dummy call frame SP should be set by push_dummy_call. */
+
+#if defined (DEPRECATED_DUMMY_WRITE_SP)
+/* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
+#if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (0)
+#endif
+
+extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
+#endif
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_SP)
-#define TARGET_WRITE_SP(val) (generic_target_write_sp (val))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
+#define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
#endif
-typedef void (gdbarch_write_sp_ftype) (CORE_ADDR val);
-extern void gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
-extern void set_gdbarch_write_sp (struct gdbarch *gdbarch, gdbarch_write_sp_ftype *write_sp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP)
-#error "Non multi-arch definition of TARGET_WRITE_SP"
+typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
+extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
+extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
+#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP)
-#define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP)
+#define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
#endif
#endif
@@ -1118,6 +1141,11 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d
#endif
#endif
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
+#define CALL_DUMMY_ADDRESS() (entry_point_address ())
+#endif
+
typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
@@ -1135,44 +1163,27 @@ extern void set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_A
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET)
#error "Non multi-arch definition of CALL_DUMMY_START_OFFSET"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_START_OFFSET)
+#if !defined (CALL_DUMMY_START_OFFSET)
#define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch))
#endif
-#endif
extern CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_breakpoint_offset);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET)
#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
+#if !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
#define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch))
#endif
-#endif
-
-extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch);
-extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, int call_dummy_breakpoint_offset_p);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
-#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
-#define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch))
-#endif
-#endif
extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch);
extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH)
#error "Non multi-arch definition of CALL_DUMMY_LENGTH"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LENGTH)
+#if !defined (CALL_DUMMY_LENGTH)
#define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch))
#endif
-#endif
/* NOTE: cagney/2002-11-24: This function with predicate has a valid
(callable) initial value. As a consequence, even when the predicate
@@ -1217,17 +1228,6 @@ extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gd
#endif
#endif
-extern int gdbarch_call_dummy_p (struct gdbarch *gdbarch);
-extern void set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, int call_dummy_p);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P)
-#error "Non multi-arch definition of CALL_DUMMY_P"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P)
-#define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch))
-#endif
-#endif
-
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS)
#define CALL_DUMMY_WORDS (legacy_call_dummy_words)
@@ -1238,11 +1238,9 @@ extern void set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, LONGEST * cal
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS)
#error "Non multi-arch definition of CALL_DUMMY_WORDS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS)
+#if !defined (CALL_DUMMY_WORDS)
#define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS)
@@ -1254,11 +1252,9 @@ extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, int si
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS)
#error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS)
+#if !defined (SIZEOF_CALL_DUMMY_WORDS)
#define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch))
#endif
-#endif
#if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
/* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
@@ -1296,6 +1292,31 @@ extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdba
#endif
#endif
+#if defined (FIX_CALL_DUMMY)
+/* Legacy for systems yet to multi-arch FIX_CALL_DUMMY */
+#if !defined (FIX_CALL_DUMMY_P)
+#define FIX_CALL_DUMMY_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FIX_CALL_DUMMY_P)
+#define FIX_CALL_DUMMY_P() (0)
+#endif
+
+extern int gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY_P)
+#error "Non multi-arch definition of FIX_CALL_DUMMY"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY_P)
+#define FIX_CALL_DUMMY_P() (gdbarch_fix_call_dummy_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FIX_CALL_DUMMY)
+#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "FIX_CALL_DUMMY"), 0)
+#endif
+
typedef void (gdbarch_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
extern void gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy);
@@ -1629,23 +1650,51 @@ extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_
#endif
#endif
+/* Replaced by PUSH_DUMMY_CALL */
+
+#if defined (DEPRECATED_PUSH_ARGUMENTS)
+/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
+#if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#define DEPRECATED_PUSH_ARGUMENTS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#define DEPRECATED_PUSH_ARGUMENTS_P() (0)
+#endif
+
+extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
+#endif
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (PUSH_ARGUMENTS)
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (default_push_arguments (nargs, args, sp, struct_return, struct_addr))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
+#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
#endif
-typedef CORE_ADDR (gdbarch_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
-extern CORE_ADDR gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
-extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_arguments_ftype *push_arguments);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_ARGUMENTS)
-#error "Non multi-arch definition of PUSH_ARGUMENTS"
+typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern CORE_ADDR gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
+#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_ARGUMENTS)
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS)
+#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
#endif
#endif
+extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
+
+typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
+
#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
#if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
@@ -1683,40 +1732,42 @@ extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gd
#endif
#endif
-#if defined (PUSH_RETURN_ADDRESS)
-/* Legacy for systems yet to multi-arch PUSH_RETURN_ADDRESS */
-#if !defined (PUSH_RETURN_ADDRESS_P)
-#define PUSH_RETURN_ADDRESS_P() (1)
+/* NOTE: This can be handled directly in push_dummy_call. */
+
+#if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
+#if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS_P)
-#define PUSH_RETURN_ADDRESS_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
#endif
-extern int gdbarch_push_return_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS_P)
-#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
+extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS_P)
-#define PUSH_RETURN_ADDRESS_P() (gdbarch_push_return_address_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS)
-#define PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "PUSH_RETURN_ADDRESS"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
#endif
-typedef CORE_ADDR (gdbarch_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
-extern CORE_ADDR gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
-extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_push_return_address_ftype *push_return_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS)
-#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
+typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
+extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
+extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS)
-#define PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_push_return_address (current_gdbarch, pc, sp))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
#endif
#endif
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index a1122e17ea9..fa91815f8ef 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -430,7 +430,8 @@ f:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc:
f:2:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
f:2:TARGET_READ_FP:CORE_ADDR:read_fp:void:::0:generic_target_read_fp::0
f:2:TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
-f:2:TARGET_WRITE_SP:void:write_sp:CORE_ADDR val:val::0:generic_target_write_sp::0
+# The dummy call frame SP should be set by push_dummy_call.
+F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
# Function for getting target's idea of a frame pointer. FIXME: GDB's
# whole scheme for dealing with "frames" and "frame pointers" needs a
# serious shakedown.
@@ -519,22 +520,20 @@ F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc::0:0
# avoids any potential problems with moving beyond multi-arch partial.
v:1:DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
v:1:CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0
-f:2:CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void:::0:0::gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0
-v:2:CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset::::0:-1:::0x%08lx
-v:2:CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset::::0:-1::gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1:0x%08lx::CALL_DUMMY_BREAKPOINT_OFFSET_P
-v:1:CALL_DUMMY_BREAKPOINT_OFFSET_P:int:call_dummy_breakpoint_offset_p::::0:-1
-v:2:CALL_DUMMY_LENGTH:int:call_dummy_length::::0:-1:::::gdbarch->call_dummy_length >= 0
+f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0
+v::CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset
+v::CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset
+v::CALL_DUMMY_LENGTH:int:call_dummy_length
# NOTE: cagney/2002-11-24: This function with predicate has a valid
# (callable) initial value. As a consequence, even when the predicate
# is false, the corresponding function works. This simplifies the
# migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
# doesn't need to be modified.
F:1:DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::generic_pc_in_call_dummy:generic_pc_in_call_dummy
-v:1:CALL_DUMMY_P:int:call_dummy_p::::0:-1
-v:2:CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
-v:2:SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0:0x%08lx
+v::CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
+v::SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
-f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0
+F::FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
#
@@ -555,9 +554,12 @@ f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, COR
F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
#
f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
-f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr:::default_push_arguments::0
+# Replaced by PUSH_DUMMY_CALL
+F:2:DEPRECATED_PUSH_ARGUMENTS:CORE_ADDR:deprecated_push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr
+M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr
F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
-F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
+# NOTE: This can be handled directly in push_dummy_call.
+F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-:::0
# NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
@@ -802,6 +804,7 @@ cat <<EOF
#if !GDB_MULTI_ARCH
/* Pull in function declarations refered to, indirectly, via macros. */
#include "inferior.h" /* For unsigned_address_to_pointer(). */
+#include "symfile.h" /* For entry_point_address(). */
#endif
struct frame_info;
@@ -1302,6 +1305,7 @@ cat <<EOF
#include "gdb-events.h"
#include "reggroups.h"
#include "osabi.h"
+#include "symfile.h" /* For entry_point_address. */
/* Static function declarations */
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index e78bc0f3813..7bb25000bf9 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1148,23 +1148,16 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Call Dummies
*
* These values and methods are used when gdb calls a target function. */
- set_gdbarch_push_return_address (gdbarch, h8300_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, h8300_push_return_address);
set_gdbarch_deprecated_extract_return_value (gdbarch, h8300_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, h8300_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, h8300_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, h8300_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT);
@@ -1175,6 +1168,9 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* set_gdbarch_stack_align (gdbarch, SOME_stack_align); */
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 66b7b611e61..3d1ca88ce50 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "arch-utils.h"
#include "gdbcore.h"
#include "osabi.h"
+#include "gdb_string.h"
/* Forward declarations. */
extern void _initialize_hppa_hpux_tdep (void);
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 2f5412e2bb6..2e0c192250c 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -33,7 +33,7 @@
#include "language.h"
#include "osabi.h"
#include "gdb_assert.h"
-
+#include "infttrace.h"
/* For argument passing to the inferior */
#include "symtab.h"
@@ -886,7 +886,7 @@ hppa_frame_saved_pc (struct frame_info *frame)
{
CORE_ADDR pc = get_frame_pc (frame);
struct unwind_table_entry *u;
- CORE_ADDR old_pc;
+ CORE_ADDR old_pc = 0;
int spun_around_loop = 0;
int rp_offset = 0;
@@ -5003,9 +5003,8 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_dummy_frame (gdbarch, hppa_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, hppa_pop_frame);
set_gdbarch_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
/* set_gdbarch_fix_call_dummy (gdbarch, hppa_fix_call_dummy); */
- set_gdbarch_push_arguments (gdbarch, hppa_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, hppa_push_arguments);
set_gdbarch_smash_text_address (gdbarch, hppa_smash_text_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_read_pc (gdbarch, hppa_target_read_pc);
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 51b74fc7ba0..b953d2546f6 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -31,6 +31,7 @@
#include "gdbcore.h"
#include "gdb_wait.h"
#include "regcache.h"
+#include "gdb_string.h"
#include <signal.h>
extern CORE_ADDR text_end;
@@ -785,8 +786,6 @@ startup_semaphore_t;
static startup_semaphore_t startup_semaphore;
-extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);
-
#ifdef PT_SETTRC
/* This function causes the caller's process to be traced by its
parent. This is intended to be called after GDB forks itself,
@@ -907,14 +906,13 @@ hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
}
int
-hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
- enum bptype type)
+hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
{
error ("Hardware watchpoints not implemented on this platform.");
}
int
-hppa_can_use_hw_watchpoint (enum bptype type, int cnt, enum bptype ot)
+hppa_can_use_hw_watchpoint (int type, int cnt, int ot)
{
return 0;
}
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 6acf5760364..606ccfeba7c 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -35,6 +35,8 @@
#include "gdb-stabs.h"
#include "gdbtypes.h"
#include "demangle.h"
+#include "somsolib.h"
+#include "gdb_assert.h"
/* Private information attached to an objfile which we use to find
and internalize the HP C debug symbols within that objfile. */
@@ -1024,7 +1026,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits,
while (VALID_CURR_FILE || VALID_CURR_MODULE)
{
- char *mod_name_string;
+ char *mod_name_string = NULL;
char *full_name_string;
/* First check for modules like "version.c", which have no code
@@ -2321,7 +2323,7 @@ static unsigned long
hpread_get_textlow (int global, int index, struct objfile *objfile,
int symcount)
{
- union dnttentry *dn_bufp;
+ union dnttentry *dn_bufp = NULL;
struct minimal_symbol *msymbol;
/* Look for a DNTT_TYPE_FUNCTION symbol. */
@@ -2340,6 +2342,11 @@ hpread_get_textlow (int global, int index, struct objfile *objfile,
&& index < symcount);
}
+ /* NOTE: cagney/2003-03-29: If !(index < symcount), dn_bufp is left
+ undefined and that means that the test below is using a garbage
+ pointer from the stack. */
+ gdb_assert (dn_bufp != NULL);
+
/* Avoid going past a DNTT_TYPE_END when looking for a DNTT_TYPE_FUNCTION. This
might happen when a sourcefile has no functions. */
if (dn_bufp->dblock.kind == DNTT_TYPE_END)
@@ -3359,10 +3366,10 @@ static struct type *
hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
struct objfile *objfile, int newblock)
{
- struct type *type, *type1;
struct pending *syms;
struct pending *local_list = NULL;
int nsyms = 0;
+ struct type *type;
dnttpointer param;
union dnttentry *paramp;
char *name;
@@ -3378,11 +3385,17 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
}
else
{
+ struct type *type1 = NULL;
/* Nope, so read it in and store it away. */
if (dn_bufp->dblock.kind == DNTT_TYPE_DOC_FUNCTION ||
dn_bufp->dblock.kind == DNTT_TYPE_DOC_MEMFUNC)
type1 = lookup_function_type (hpread_type_lookup (dn_bufp->ddocfunc.retval,
objfile));
+ /* NOTE: cagney/2003-03-29: Oh, no not again. TYPE1 is
+ potentially left undefined here. Assert it isn't and hope
+ the assert never fails ... */
+ gdb_assert (type1 != NULL);
+
replace_type (type, type1);
/* Mark it -- in the middle of processing */
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 02abc9e537e..7ef1f6e80e0 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -925,7 +925,7 @@ static CORE_ADDR
i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
- sp = default_push_arguments (nargs, args, sp, struct_return, struct_addr);
+ sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
if (struct_return)
{
@@ -939,12 +939,6 @@ i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
return sp;
}
-static void
-i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- /* Do nothing. Everything was already done by i386_push_arguments. */
-}
-
/* These registers are used for returning integers (and on some
targets also for returning `struct' and `union' values when their
size and alignment match an integer type). */
@@ -1565,15 +1559,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
/* Call dummy code. */
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, NULL);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
@@ -1586,10 +1573,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_parm_boundary (gdbarch, 32);
set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
- set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, i386_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, i386_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, i386_pop_frame);
- set_gdbarch_deprecated_store_struct_return (gdbarch, i386_store_struct_return);
set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
@@ -1630,6 +1616,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
i386_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 1b3d7657e45..ecb49197291 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -96,8 +96,6 @@ static gdbarch_deprecated_extract_return_value_ftype ia64_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype ia64_extract_struct_value_address;
static gdbarch_use_struct_convention_ftype ia64_use_struct_convention;
static gdbarch_frameless_function_invocation_ftype ia64_frameless_function_invocation;
-static gdbarch_push_arguments_ftype ia64_push_arguments;
-static gdbarch_push_return_address_ftype ia64_push_return_address;
static gdbarch_saved_pc_after_call_ftype ia64_saved_pc_after_call;
static void ia64_pop_frame_regular (struct frame_info *frame);
static struct type *is_float_or_hfa_type (struct type *t);
@@ -2215,15 +2213,12 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, ia64_write_pc);
/* Settings for calling functions in the inferior. */
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_push_arguments (gdbarch, ia64_push_arguments);
- set_gdbarch_push_return_address (gdbarch, ia64_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, ia64_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, ia64_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, ia64_pop_frame);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, ia64_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words));
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, ia64_init_extra_frame_info);
set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address);
set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address);
@@ -2239,12 +2234,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
-
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 19077b4a54d..38666905706 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -986,50 +986,46 @@ run_stack_dummy (CORE_ADDR addr, struct regcache *buffer)
{
struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0);
int saved_async = 0;
+ struct breakpoint *bpt;
+ struct symtab_and_line sal;
/* Now proceed, having reached the desired place. */
clear_proceed_status ();
- if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
+ init_sal (&sal); /* initialize to zeroes */
+ if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
- struct breakpoint *bpt;
- struct symtab_and_line sal;
-
- init_sal (&sal); /* initialize to zeroes */
- if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
- {
- sal.pc = CALL_DUMMY_ADDRESS ();
- }
- else
- {
- /* If defined, CALL_DUMMY_BREAKPOINT_OFFSET is where we need
- to put a breakpoint instruction. If not, the call dummy
- already has the breakpoint instruction in it.
-
- ADDR IS THE ADDRESS of the call dummy plus the
- CALL_DUMMY_START_OFFSET, so we need to subtract the
- CALL_DUMMY_START_OFFSET. */
- sal.pc = addr - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET;
- }
- sal.section = find_pc_overlay (sal.pc);
-
- {
- /* Set up a frame ID for the dummy frame so we can pass it to
- set_momentary_breakpoint. We need to give the breakpoint a
- frame ID so that the breakpoint code can correctly
- re-identify the dummy breakpoint. */
- struct frame_id frame = frame_id_build (read_fp (), sal.pc);
- /* Create a momentary breakpoint at the return address of the
- inferior. That way it breaks when it returns. */
- bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy);
- bpt->disposition = disp_del;
- }
-
- /* If all error()s out of proceed ended up calling normal_stop (and
- perhaps they should; it already does in the special case of error
- out of resume()), then we wouldn't need this. */
- make_cleanup (breakpoint_auto_delete_contents, &stop_bpstat);
+ sal.pc = CALL_DUMMY_ADDRESS ();
+ }
+ else
+ {
+ /* If defined, CALL_DUMMY_BREAKPOINT_OFFSET is where we need to
+ put a breakpoint instruction. If not, the call dummy already
+ has the breakpoint instruction in it.
+
+ ADDR IS THE ADDRESS of the call dummy plus the
+ CALL_DUMMY_START_OFFSET, so we need to subtract the
+ CALL_DUMMY_START_OFFSET. */
+ sal.pc = addr - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET;
}
+ sal.section = find_pc_overlay (sal.pc);
+
+ {
+ /* Set up a frame ID for the dummy frame so we can pass it to
+ set_momentary_breakpoint. We need to give the breakpoint a
+ frame ID so that the breakpoint code can correctly re-identify
+ the dummy breakpoint. */
+ struct frame_id frame = frame_id_build (read_fp (), sal.pc);
+ /* Create a momentary breakpoint at the return address of the
+ inferior. That way it breaks when it returns. */
+ bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy);
+ bpt->disposition = disp_del;
+ }
+
+ /* If all error()s out of proceed ended up calling normal_stop (and
+ perhaps they should; it already does in the special case of error
+ out of resume()), then we wouldn't need this. */
+ make_cleanup (breakpoint_auto_delete_contents, &stop_bpstat);
disable_watchpoints_before_interactive_call_start ();
proceed_to_finish = 1; /* We want stop_registers, please... */
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 10da8ee5408..ae041f25004 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -178,8 +178,6 @@ extern CORE_ADDR read_sp (void);
extern CORE_ADDR generic_target_read_sp (void);
-extern void write_sp (CORE_ADDR);
-
extern void generic_target_write_sp (CORE_ADDR);
extern CORE_ADDR read_fp (void);
@@ -420,42 +418,13 @@ extern int attach_flag;
#define ON_STACK 1
#define AT_ENTRY_POINT 4
-#if !defined (CALL_DUMMY_ADDRESS)
-#define CALL_DUMMY_ADDRESS() (internal_error (__FILE__, __LINE__, "CALL_DUMMY_ADDRESS"), 0)
-#endif
-#if !defined (CALL_DUMMY_START_OFFSET)
-#define CALL_DUMMY_START_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_START_OFFSET"), 0)
-#endif
-#if !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
-#define CALL_DUMMY_BREAKPOINT_OFFSET_P (0)
-#define CALL_DUMMY_BREAKPOINT_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_BREAKPOINT_OFFSET"), 0)
-#endif
-#if !defined CALL_DUMMY_BREAKPOINT_OFFSET_P
-#define CALL_DUMMY_BREAKPOINT_OFFSET_P (1)
-#endif
-#if !defined (CALL_DUMMY_LENGTH)
-#define CALL_DUMMY_LENGTH (internal_error (__FILE__, __LINE__, "CALL_DUMMY_LENGTH"), 0)
-#endif
-
/* FIXME: cagney/2000-04-17: gdbarch should manage this. The default
shouldn't be necessary. */
-#if !defined (CALL_DUMMY_P)
-#if defined (CALL_DUMMY)
-#define CALL_DUMMY_P 1
-#else
-#define CALL_DUMMY_P 0
-#endif
-#endif
-
#if !defined PUSH_DUMMY_FRAME
#define PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "PUSH_DUMMY_FRAME"), 0)
#endif
-#if !defined FIX_CALL_DUMMY
-#define FIX_CALL_DUMMY(a1,a2,a3,a4,a5,a6,a7) (internal_error (__FILE__, __LINE__, "FIX_CALL_DUMMY"), 0)
-#endif
-
#if !defined STORE_STRUCT_RETURN
#define STORE_STRUCT_RETURN(a1,a2) (internal_error (__FILE__, __LINE__, "STORE_STRUCT_RETURN"), 0)
#endif
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6da33946ec1..74f1de1f672 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1153,6 +1153,11 @@ void
handle_inferior_event (struct execution_control_state *ecs)
{
CORE_ADDR real_stop_pc;
+ /* NOTE: cagney/2003-03-28: If you're looking at this code and
+ thinking that the variable stepped_after_stopped_by_watchpoint
+ isn't used, then you're wrong! The macro STOPPED_BY_WATCHPOINT,
+ defined in the file "config/pa/nm-hppah.h", accesses the variable
+ indirectly. Mutter something rude about the HP merge. */
int stepped_after_stopped_by_watchpoint;
int sw_single_step_trap_p = 0;
@@ -1165,7 +1170,15 @@ handle_inferior_event (struct execution_control_state *ecs)
case infwait_thread_hop_state:
/* Cancel the waiton_ptid. */
ecs->waiton_ptid = pid_to_ptid (-1);
- /* Fall thru to the normal_state case. */
+ /* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event
+ is serviced in this loop, below. */
+ if (ecs->enable_hw_watchpoints_after_wait)
+ {
+ TARGET_ENABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
+ ecs->enable_hw_watchpoints_after_wait = 0;
+ }
+ stepped_after_stopped_by_watchpoint = 0;
+ break;
case infwait_normal_state:
/* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event
@@ -1179,6 +1192,7 @@ handle_inferior_event (struct execution_control_state *ecs)
break;
case infwait_nullified_state:
+ stepped_after_stopped_by_watchpoint = 0;
break;
case infwait_nonstep_watch_state:
@@ -1189,6 +1203,9 @@ handle_inferior_event (struct execution_control_state *ecs)
in combination correctly? */
stepped_after_stopped_by_watchpoint = 1;
break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
}
ecs->infwait_state = infwait_normal_state;
@@ -1795,26 +1812,30 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_print_frame = 1;
}
+ /* NOTE: cagney/2003-03-29: These two checks for a random signal
+ at one stage in the past included checks for an inferior
+ function call's call dummy's return breakpoint. The original
+ comment, that went with the test, read:
+
+ ``End of a stack dummy. Some systems (e.g. Sony news) give
+ another signal besides SIGTRAP, so check here as well as
+ above.''
+
+ If someone ever tries to get get call dummys on a
+ non-executable stack to work (where the target would stop
+ with something like a SIGSEG), then those tests might need to
+ be re-instated. Given, however, that the tests were only
+ enabled when momentary breakpoints were not being used, I
+ suspect that it won't be the case. */
+
if (stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal
= !(bpstat_explains_signal (stop_bpstat)
|| trap_expected
- || (!CALL_DUMMY_BREAKPOINT_OFFSET_P
- && DEPRECATED_PC_IN_CALL_DUMMY (stop_pc, read_sp (),
- get_frame_base (get_current_frame ())))
|| (step_range_end && step_resume_breakpoint == NULL));
-
else
{
- ecs->random_signal = !(bpstat_explains_signal (stop_bpstat)
- /* End of a stack dummy. Some systems (e.g. Sony
- news) give another signal besides SIGTRAP, so
- check here as well as above. */
- || (!CALL_DUMMY_BREAKPOINT_OFFSET_P
- && DEPRECATED_PC_IN_CALL_DUMMY (stop_pc, read_sp (),
- get_frame_base
- (get_current_frame
- ()))));
+ ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
if (!ecs->random_signal)
stop_signal = TARGET_SIGNAL_TRAP;
}
@@ -2156,31 +2177,6 @@ process_event_stop_test:
return;
}
- if (!CALL_DUMMY_BREAKPOINT_OFFSET_P)
- {
- /* This is the old way of detecting the end of the stack dummy.
- An architecture which defines CALL_DUMMY_BREAKPOINT_OFFSET gets
- handled above. As soon as we can test it on all of them, all
- architectures should define it. */
-
- /* If this is the breakpoint at the end of a stack dummy,
- just stop silently, unless the user was doing an si/ni, in which
- case she'd better know what she's doing. */
-
- if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (),
- get_frame_base (get_current_frame ()))
- && !step_range_end)
- {
- stop_print_frame = 0;
- stop_stack_dummy = 1;
-#ifdef HP_OS_BUG
- trap_expected_after_continue = 1;
-#endif
- stop_stepping (ecs);
- return;
- }
- }
-
if (step_resume_breakpoint)
{
/* Having a step-resume breakpoint overrides anything
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index 02a55762cd9..f86ab025ef6 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -27,6 +27,7 @@
#include "gdb_string.h"
#include "gdb_wait.h"
#include "command.h"
+#include "gdbthread.h"
/* We need pstat functionality so that we can get the exec file
for a process we attach to.
@@ -2947,7 +2948,7 @@ ptrace_wait (ptid_t ptid, int *status)
child_acknowledge_created_inferior.)
*/
int
-parent_attach_all (void)
+parent_attach_all (int p1, PTRACE_ARG3_TYPE p2, int p3)
{
int tt_status;
@@ -3674,7 +3675,7 @@ call_ptrace (int pt_request, int gdb_tid, PTRACE_ARG3_TYPE addr, int data)
there's no need for any "break" statements.
*/
case PT_SETTRC:
- return parent_attach_all ();
+ return parent_attach_all (0, 0, 0);
case PT_RUREGS:
tt_status = read_from_register_save_state (gdb_tid,
@@ -5378,8 +5379,7 @@ hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
watchpoints.
*/
int
-hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
- enum bptype type)
+hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
{
CORE_ADDR page_start;
int dictionary_is_empty;
@@ -5439,7 +5439,7 @@ hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
hardware support.
*/
int
-hppa_can_use_hw_watchpoint (enum bptype type, int cnt, enum bptype ot)
+hppa_can_use_hw_watchpoint (int type, int cnt, int ot)
{
return (type == bp_hardware_watchpoint);
}
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index f6bc2deb9d8..9e73030362d 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -34,6 +34,7 @@
#include "jv-lang.h"
#include "gdbcore.h"
#include "block.h"
+#include "demangle.h"
#include <ctype.h>
struct type *java_int_type;
@@ -996,6 +997,12 @@ java_create_fundamental_type (struct objfile *objfile, int typeid)
return c_create_fundamental_type (objfile, typeid);
}
+static char *java_demangle (const char *mangled, int options)
+{
+ return cplus_demangle (mangled, options | DMGL_JAVA);
+}
+
+
/* Table mapping opcodes into strings for printing operators
and precedences of the operators. */
@@ -1055,6 +1062,7 @@ const struct language_defn java_language_defn =
java_val_print, /* Print a value using appropriate syntax */
java_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ java_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/language.c b/gdb/language.c
index 2b71d1f754e..0a650940444 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -44,6 +44,7 @@
#include "target.h"
#include "parser-defs.h"
#include "jv-lang.h"
+#include "demangle.h"
extern void _initialize_language (void);
@@ -1361,6 +1362,21 @@ skip_language_trampoline (CORE_ADDR pc)
return 0;
}
+/* Return demangled language symbol, or NULL.
+ FIXME: Options are only useful for certain languages and ignored
+ by others, so it would be better to remove them here and have a
+ more flexible demangler for the languages that need it.
+ FIXME: Sometimes the demangler is invoked when we don't know the
+ language, so we can't use this everywhere. */
+char *
+language_demangle (const struct language_defn *current_language,
+ const char *mangled, int options)
+{
+ if (current_language != NULL && current_language->la_demangle)
+ return current_language->la_demangle (mangled, options);
+ return NULL;
+}
+
/* Define the language that is no language. */
@@ -1428,6 +1444,13 @@ static CORE_ADDR unk_lang_trampoline (CORE_ADDR pc)
return 0;
}
+/* Unknown languages just use the cplus demangler. */
+static char *unk_lang_demangle (const char *mangled, int options)
+{
+ return cplus_demangle (mangled, options);
+}
+
+
static struct type **const (unknown_builtin_types[]) =
{
0
@@ -1456,6 +1479,7 @@ const struct language_defn unknown_language_defn =
unk_lang_val_print, /* Print a value using appropriate syntax */
unk_lang_value_print, /* Print a top-level value */
unk_lang_trampoline, /* Language specific skip_trampoline */
+ unk_lang_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
@@ -1487,6 +1511,7 @@ const struct language_defn auto_language_defn =
unk_lang_val_print, /* Print a value using appropriate syntax */
unk_lang_value_print, /* Print a top-level value */
unk_lang_trampoline, /* Language specific skip_trampoline */
+ unk_lang_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
@@ -1517,6 +1542,7 @@ const struct language_defn local_language_defn =
unk_lang_val_print, /* Print a value using appropriate syntax */
unk_lang_value_print, /* Print a top-level value */
unk_lang_trampoline, /* Language specific skip_trampoline */
+ unk_lang_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/language.h b/gdb/language.h
index 4b9f8cee46d..d9265324cdd 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -209,6 +209,9 @@ struct language_defn
if it isn't a language tramp for this language. */
CORE_ADDR (*skip_trampoline) (CORE_ADDR pc);
+ /* Return demangled language symbol, or NULL. */
+ char *(*la_demangle) (const char *mangled, int options);
+
/* Base 2 (binary) formats. */
struct language_format_info la_binary_format;
@@ -475,4 +478,8 @@ extern enum language get_frame_language (void); /* In stack.c */
extern CORE_ADDR skip_language_trampoline (CORE_ADDR pc);
+/* Return demangled language symbol, or NULL. */
+extern char *language_demangle (const struct language_defn *current_language,
+ const char *mangled, int options);
+
#endif /* defined (LANGUAGE_H) */
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index 9f9dd81d8c3..c36394e87f3 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -172,8 +172,7 @@ status_to_str (int status)
snprintf (buf, sizeof (buf), "%s (terminated)",
strsignal (WSTOPSIG (status)));
else
- snprintf (buf, sizeof (buf), "%d (exited)",
- WEXITSTATUS (status));
+ snprintf (buf, sizeof (buf), "%d (exited)", WEXITSTATUS (status));
return buf;
}
@@ -306,8 +305,8 @@ iterate_over_lwps (int (*callback) (struct lwp_info *, void *), void *data)
int
lin_lwp_prepare_to_proceed (void)
{
- if (! ptid_equal (trap_ptid, null_ptid)
- && ! ptid_equal (inferior_ptid, trap_ptid))
+ if (!ptid_equal (trap_ptid, null_ptid)
+ && !ptid_equal (inferior_ptid, trap_ptid))
{
/* Switched over from TRAP_PID. */
CORE_ADDR stop_pc = read_pc ();
@@ -319,7 +318,7 @@ lin_lwp_prepare_to_proceed (void)
if (trap_pc != stop_pc && breakpoint_here_p (trap_pc))
{
/* User hasn't deleted the breakpoint. Return non-zero, and
- switch back to TRAP_PID. */
+ switch back to TRAP_PID. */
inferior_ptid = trap_ptid;
/* FIXME: Is this stuff really necessary? */
@@ -355,7 +354,7 @@ lin_lwp_attach_lwp (ptid_t ptid, int verbose)
/* Make sure SIGCHLD is blocked. We don't want SIGCHLD events
to interrupt either the ptrace() or waitpid() calls below. */
- if (! sigismember (&blocked_mask, SIGCHLD))
+ if (!sigismember (&blocked_mask, SIGCHLD))
{
sigaddset (&blocked_mask, SIGCHLD);
sigprocmask (SIG_BLOCK, &blocked_mask, NULL);
@@ -380,8 +379,8 @@ lin_lwp_attach_lwp (ptid_t ptid, int verbose)
safe_strerror (errno));
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
- "LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n",
target_pid_to_str (ptid));
pid = waitpid (GET_LWP (ptid), &status, 0);
@@ -401,18 +400,18 @@ lin_lwp_attach_lwp (ptid_t ptid, int verbose)
{
fprintf_unfiltered (gdb_stdlog,
"LLAL: waitpid %s received %s\n",
- target_pid_to_str (ptid),
+ target_pid_to_str (ptid),
status_to_str (status));
}
}
else
{
/* We assume that the LWP representing the original process
- is already stopped. Mark it as stopped in the data structure
- that the lin-lwp layer uses to keep track of threads. Note
- that this won't have already been done since the main thread
- will have, we assume, been stopped by an attach from a
- different layer. */
+ is already stopped. Mark it as stopped in the data structure
+ that the lin-lwp layer uses to keep track of threads. Note
+ that this won't have already been done since the main thread
+ will have, we assume, been stopped by an attach from a
+ different layer. */
lp->stopped = 1;
}
}
@@ -455,8 +454,7 @@ lin_lwp_attach (char *args, int from_tty)
if (debug_lin_lwp)
{
fprintf_unfiltered (gdb_stdlog,
- "LLA: waitpid %ld, faking SIGSTOP\n",
- (long) pid);
+ "LLA: waitpid %ld, faking SIGSTOP\n", (long) pid);
}
}
@@ -467,7 +465,7 @@ detach_callback (struct lwp_info *lp, void *data)
if (debug_lin_lwp && lp->status)
fprintf_unfiltered (gdb_stdlog, "DC: Pending %s for %s on detach.\n",
- strsignal (WSTOPSIG (lp->status)),
+ strsignal (WSTOPSIG (lp->status)),
target_pid_to_str (lp->ptid));
while (lp->signalled && lp->stopped)
@@ -479,10 +477,10 @@ detach_callback (struct lwp_info *lp, void *data)
safe_strerror (errno));
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"DC: PTRACE_CONTINUE (%s, 0, %s) (OK)\n",
target_pid_to_str (lp->ptid),
- status_to_str (lp->status));
+ status_to_str (lp->status));
lp->stopped = 0;
lp->signalled = 0;
@@ -505,7 +503,7 @@ detach_callback (struct lwp_info *lp, void *data)
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"PTRACE_DETACH (%s, %s, 0) (OK)\n",
- target_pid_to_str (lp->ptid),
+ target_pid_to_str (lp->ptid),
strsignal (WSTOPSIG (lp->status)));
delete_lwp (lp->ptid);
@@ -547,7 +545,7 @@ resume_callback (struct lwp_info *lp, void *data)
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), 0, TARGET_SIGNAL_0);
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"RC: PTRACE_CONT %s, 0, 0 (resume sibling)\n",
target_pid_to_str (lp->ptid));
lp->stopped = 0;
@@ -606,13 +604,13 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
if (lp->status)
{
/* FIXME: What should we do if we are supposed to continue
- this thread with a signal? */
+ this thread with a signal? */
gdb_assert (signo == TARGET_SIGNAL_0);
return;
}
/* Mark LWP as not stopped to prevent it from being continued by
- resume_callback. */
+ resume_callback. */
lp->stopped = 0;
}
@@ -634,7 +632,7 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
static int
stop_callback (struct lwp_info *lp, void *data)
{
- if (! lp->stopped && ! lp->signalled)
+ if (!lp->stopped && !lp->signalled)
{
int ret;
@@ -662,7 +660,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
{
sigset_t *flush_mask = data;
- if (! lp->stopped && lp->signalled)
+ if (!lp->stopped && lp->signalled)
{
pid_t pid;
int status;
@@ -681,7 +679,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
{
fprintf_unfiltered (gdb_stdlog,
"SWC: waitpid %s received %s\n",
- target_pid_to_str (lp->ptid),
+ target_pid_to_str (lp->ptid),
status_to_str (status));
}
@@ -692,14 +690,14 @@ stop_wait_callback (struct lwp_info *lp, void *data)
if (in_thread_list (lp->ptid))
{
/* Core GDB cannot deal with us deleting the current
- thread. */
+ thread. */
if (!ptid_equal (lp->ptid, inferior_ptid))
delete_thread (lp->ptid);
printf_unfiltered ("[%s exited]\n",
target_pid_to_str (lp->ptid));
}
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog, "SWC: %s exited.\n",
+ fprintf_unfiltered (gdb_stdlog, "SWC: %s exited.\n",
target_pid_to_str (lp->ptid));
delete_lwp (lp->ptid);
@@ -727,29 +725,29 @@ stop_wait_callback (struct lwp_info *lp, void *data)
if (WSTOPSIG (status) == SIGTRAP)
{
/* If a LWP other than the LWP that we're reporting an
- event for has hit a GDB breakpoint (as opposed to
- some random trap signal), then just arrange for it to
- hit it again later. We don't keep the SIGTRAP status
- and don't forward the SIGTRAP signal to the LWP. We
- will handle the current event, eventually we will
- resume all LWPs, and this one will get its breakpoint
- trap again.
-
- If we do not do this, then we run the risk that the
- user will delete or disable the breakpoint, but the
- thread will have already tripped on it. */
+ event for has hit a GDB breakpoint (as opposed to
+ some random trap signal), then just arrange for it to
+ hit it again later. We don't keep the SIGTRAP status
+ and don't forward the SIGTRAP signal to the LWP. We
+ will handle the current event, eventually we will
+ resume all LWPs, and this one will get its breakpoint
+ trap again.
+
+ If we do not do this, then we run the risk that the
+ user will delete or disable the breakpoint, but the
+ thread will have already tripped on it. */
/* Now resume this LWP and get the SIGSTOP event. */
errno = 0;
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
if (debug_lin_lwp)
{
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"PTRACE_CONT %s, 0, 0 (%s)\n",
target_pid_to_str (lp->ptid),
errno ? safe_strerror (errno) : "OK");
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"SWC: Candidate SIGTRAP event in %s\n",
target_pid_to_str (lp->ptid));
}
@@ -767,39 +765,39 @@ stop_wait_callback (struct lwp_info *lp, void *data)
else
{
/* The thread was stopped with a signal other than
- SIGSTOP, and didn't accidentally trip a breakpoint. */
+ SIGSTOP, and didn't accidentally trip a breakpoint. */
if (debug_lin_lwp)
{
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"SWC: Pending event %s in %s\n",
- status_to_str ((int) status),
+ status_to_str ((int) status),
target_pid_to_str (lp->ptid));
}
/* Now resume this LWP and get the SIGSTOP event. */
errno = 0;
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"SWC: PTRACE_CONT %s, 0, 0 (%s)\n",
target_pid_to_str (lp->ptid),
errno ? safe_strerror (errno) : "OK");
/* Hold this event/waitstatus while we check to see if
- there are any more (we still want to get that SIGSTOP). */
+ there are any more (we still want to get that SIGSTOP). */
stop_wait_callback (lp, data);
/* If the lp->status field is still empty, use it to hold
- this event. If not, then this event must be returned
- to the event queue of the LWP. */
+ this event. If not, then this event must be returned
+ to the event queue of the LWP. */
if (lp->status == 0)
lp->status = status;
else
{
if (debug_lin_lwp)
{
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"SWC: kill %s, %s\n",
- target_pid_to_str (lp->ptid),
+ target_pid_to_str (lp->ptid),
status_to_str ((int) status));
}
kill (GET_LWP (lp->ptid), WSTOPSIG (status));
@@ -810,7 +808,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
else
{
/* We caught the SIGSTOP that we intended to catch, so
- there's no SIGSTOP pending. */
+ there's no SIGSTOP pending. */
lp->stopped = 1;
lp->signalled = 0;
}
@@ -904,8 +902,8 @@ cancel_breakpoints_callback (struct lwp_info *lp, void *data)
tripped on it. */
if (lp->status != 0
- && WIFSTOPPED (lp->status) && WSTOPSIG (lp->status) == SIGTRAP
- && breakpoint_inserted_here_p (read_pc_pid (lp->ptid) -
+ && WIFSTOPPED (lp->status) && WSTOPSIG (lp->status) == SIGTRAP
+ && breakpoint_inserted_here_p (read_pc_pid (lp->ptid) -
DECR_PC_AFTER_BREAK))
{
if (debug_lin_lwp)
@@ -948,7 +946,7 @@ select_event_lwp (struct lwp_info **orig_lp, int *status)
else
{
/* No single-stepping LWP. Select one at random, out of those
- which have had SIGTRAP events. */
+ which have had SIGTRAP events. */
/* First see how many SIGTRAP events we have. */
iterate_over_lwps (count_events_callback, &num_events);
@@ -958,8 +956,8 @@ select_event_lwp (struct lwp_info **orig_lp, int *status)
((num_events * (double) rand ()) / (RAND_MAX + 1.0));
if (debug_lin_lwp && num_events > 1)
- fprintf_unfiltered (gdb_stdlog,
- "SEL: Found %d SIGTRAP events, selecting #%d\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "SEL: Found %d SIGTRAP events, selecting #%d\n",
num_events, random_selector);
event_lp = iterate_over_lwps (select_event_lwp_callback,
@@ -970,7 +968,7 @@ select_event_lwp (struct lwp_info **orig_lp, int *status)
{
/* Switch the event LWP. */
*orig_lp = event_lp;
- *status = event_lp->status;
+ *status = event_lp->status;
}
/* Flush the wait status for the event LWP. */
@@ -1014,17 +1012,16 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (debug_lin_lwp)
{
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"CW: waitpid %ld received %s\n",
- (long) pid,
- status_to_str (status));
+ (long) pid, status_to_str (status));
}
save_errno = errno;
/* Make sure we don't report an event for the exit of the
- original program, if we've detached from it. */
- if (pid != -1 && ! WIFSTOPPED (status) && pid != GET_PID (inferior_ptid))
+ original program, if we've detached from it. */
+ if (pid != -1 && !WIFSTOPPED (status) && pid != GET_PID (inferior_ptid))
{
pid = -1;
save_errno = EINTR;
@@ -1037,7 +1034,7 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (pid == -1)
{
- warning ("Child process unexpectedly missing: %s",
+ warning ("Child process unexpectedly missing: %s",
safe_strerror (errno));
/* Claim it exited with unknown signal. */
@@ -1064,13 +1061,13 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
sigemptyset (&flush_mask);
/* Make sure SIGCHLD is blocked. */
- if (! sigismember (&blocked_mask, SIGCHLD))
+ if (!sigismember (&blocked_mask, SIGCHLD))
{
sigaddset (&blocked_mask, SIGCHLD);
sigprocmask (SIG_BLOCK, &blocked_mask, NULL);
}
- retry:
+retry:
/* Make sure there is at least one LWP that has been resumed, at
least if there are any LWPs at all. */
@@ -1089,7 +1086,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (debug_lin_lwp && status)
fprintf_unfiltered (gdb_stdlog,
"LLW: Using pending wait status %s for %s.\n",
- status_to_str (status),
+ status_to_str (status),
target_pid_to_str (lp->ptid));
}
@@ -1101,7 +1098,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
else if (is_lwp (ptid))
{
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"LLW: Waiting for specific LWP %s.\n",
target_pid_to_str (ptid));
@@ -1114,7 +1111,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (debug_lin_lwp && status)
fprintf_unfiltered (gdb_stdlog,
"LLW: Using pending wait status %s for %s.\n",
- status_to_str (status),
+ status_to_str (status),
target_pid_to_str (lp->ptid));
/* If we have to wait, take into account whether PID is a cloned
@@ -1127,19 +1124,19 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (status && lp->signalled)
{
/* A pending SIGSTOP may interfere with the normal stream of
- events. In a typical case where interference is a problem,
- we have a SIGSTOP signal pending for LWP A while
- single-stepping it, encounter an event in LWP B, and take the
- pending SIGSTOP while trying to stop LWP A. After processing
- the event in LWP B, LWP A is continued, and we'll never see
- the SIGTRAP associated with the last time we were
- single-stepping LWP A. */
+ events. In a typical case where interference is a problem,
+ we have a SIGSTOP signal pending for LWP A while
+ single-stepping it, encounter an event in LWP B, and take the
+ pending SIGSTOP while trying to stop LWP A. After processing
+ the event in LWP B, LWP A is continued, and we'll never see
+ the SIGTRAP associated with the last time we were
+ single-stepping LWP A. */
/* Resume the thread. It should halt immediately returning the
- pending SIGSTOP. */
+ pending SIGSTOP. */
registers_changed ();
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
- TARGET_SIGNAL_0);
+ TARGET_SIGNAL_0);
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s %s, 0, 0 (expect SIGSTOP)\n",
@@ -1152,8 +1149,8 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
stop_wait_callback (lp, NULL);
}
- set_sigint_trap (); /* Causes SIGINT to be passed on to the
- attached process. */
+ set_sigint_trap (); /* Causes SIGINT to be passed on to the
+ attached process. */
set_sigio_trap ();
while (status == 0)
@@ -1169,8 +1166,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
fprintf_unfiltered (gdb_stdlog,
"LLW: waitpid %ld received %s\n",
- (long) lwpid,
- status_to_str (status));
+ (long) lwpid, status_to_str (status));
}
lp = find_lwp_pid (pid_to_ptid (lwpid));
@@ -1179,13 +1175,13 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
our list, i.e. not part of the current process. This can happen
if we detach from a program we original forked and then it
exits. */
- if (! WIFSTOPPED (status) && ! lp)
+ if (!WIFSTOPPED (status) && !lp)
{
status = 0;
continue;
}
- if (! lp)
+ if (!lp)
{
lp = add_lwp (BUILD_LWP (lwpid, GET_PID (inferior_ptid)));
if (options & __WCLONE)
@@ -1197,10 +1193,10 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
&& WSTOPSIG (status) == SIGSTOP);
lp->signalled = 1;
- if (! in_thread_list (inferior_ptid))
+ if (!in_thread_list (inferior_ptid))
{
inferior_ptid = BUILD_LWP (GET_PID (inferior_ptid),
- GET_PID (inferior_ptid));
+ GET_PID (inferior_ptid));
add_thread (inferior_ptid);
}
@@ -1211,22 +1207,22 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
/* Make sure we don't report a TARGET_WAITKIND_EXITED or
- TARGET_WAITKIND_SIGNALLED event if there are still LWP's
- left in the process. */
+ TARGET_WAITKIND_SIGNALLED event if there are still LWP's
+ left in the process. */
if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
{
if (in_thread_list (lp->ptid))
{
/* Core GDB cannot deal with us deleting the current
- thread. */
- if (! ptid_equal (lp->ptid, inferior_ptid))
+ thread. */
+ if (!ptid_equal (lp->ptid, inferior_ptid))
delete_thread (lp->ptid);
printf_unfiltered ("[%s exited]\n",
target_pid_to_str (lp->ptid));
}
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
- "LLW: %s exited.\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: %s exited.\n",
target_pid_to_str (lp->ptid));
delete_lwp (lp->ptid);
@@ -1240,13 +1236,12 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
/* Make sure we don't report a SIGSTOP that we sent
- ourselves in an attempt to stop an LWP. */
+ ourselves in an attempt to stop an LWP. */
if (lp->signalled
- && WIFSTOPPED (status)
- && WSTOPSIG (status) == SIGSTOP)
+ && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP)
{
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"LLW: Delayed SIGSTOP caught for %s.\n",
target_pid_to_str (lp->ptid));
@@ -1255,11 +1250,11 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
registers_changed ();
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
- TARGET_SIGNAL_0);
+ TARGET_SIGNAL_0);
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s %s, 0, 0 (discard SIGSTOP)\n",
- lp->step ?
+ lp->step ?
"PTRACE_SINGLESTEP" : "PTRACE_CONT",
target_pid_to_str (lp->ptid));
@@ -1309,16 +1304,17 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
&& signal_pass_state (signo) == 1)
{
/* FIMXE: kettenis/2001-06-06: Should we resume all threads
- here? It is not clear we should. GDB may not expect
- other threads to run. On the other hand, not resuming
- newly attached threads may cause an unwanted delay in
- getting them running. */
+ here? It is not clear we should. GDB may not expect
+ other threads to run. On the other hand, not resuming
+ newly attached threads may cause an unwanted delay in
+ getting them running. */
registers_changed ();
child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step, signo);
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s %s, %s (preempt 'handle')\n",
- lp->step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
+ lp->step ?
+ "PTRACE_SINGLESTEP" : "PTRACE_CONT",
target_pid_to_str (lp->ptid),
signo ? strsignal (signo) : "0");
lp->stopped = 0;
@@ -1326,13 +1322,12 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
goto retry;
}
- if (signo == TARGET_SIGNAL_INT
- && signal_pass_state (signo) == 0)
+ if (signo == TARGET_SIGNAL_INT && signal_pass_state (signo) == 0)
{
/* If ^C/BREAK is typed at the tty/console, SIGINT gets
- forwarded to the entire process group, that is, all LWP's
- will receive it. Since we only want to report it once,
- we try to flush it from all LWPs except this one. */
+ forwarded to the entire process group, that is, all LWP's
+ will receive it. Since we only want to report it once,
+ we try to flush it from all LWPs except this one. */
sigaddset (&flush_mask, SIGINT);
}
}
@@ -1342,8 +1337,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog, "LLW: Candidate event %s in %s.\n",
- status_to_str (status),
- target_pid_to_str (lp->ptid));
+ status_to_str (status), target_pid_to_str (lp->ptid));
/* Now stop all other LWP's ... */
iterate_over_lwps (stop_callback, NULL);
@@ -1370,7 +1364,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
trap_ptid = (threaded ? lp->ptid : pid_to_ptid (GET_LWP (lp->ptid)));
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"LLW: trap_ptid is %s.\n",
target_pid_to_str (trap_ptid));
}
@@ -1387,7 +1381,7 @@ kill_callback (struct lwp_info *lp, void *data)
errno = 0;
ptrace (PTRACE_KILL, GET_LWP (lp->ptid), 0, 0);
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog,
+ fprintf_unfiltered (gdb_stdlog,
"KC: PTRACE_KILL %s, 0, 0 (%s)\n",
target_pid_to_str (lp->ptid),
errno ? safe_strerror (errno) : "OK");
@@ -1430,7 +1424,7 @@ kill_wait_callback (struct lwp_info *lp, void *data)
if (pid != (pid_t) -1 && debug_lin_lwp)
{
fprintf_unfiltered (gdb_stdlog,
- "KWC: wait %s received unk.\n",
+ "KWC: wait %s received unk.\n",
target_pid_to_str (lp->ptid));
}
}
@@ -1458,7 +1452,7 @@ lin_lwp_create_inferior (char *exec_file, char *allargs, char **env)
child_ops.to_create_inferior (exec_file, allargs, env);
}
-static void
+static void
lin_lwp_mourn_inferior (void)
{
trap_ptid = null_ptid;
@@ -1475,8 +1469,7 @@ lin_lwp_mourn_inferior (void)
static int
lin_lwp_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
+ struct mem_attrib *attrib, struct target_ops *target)
{
struct cleanup *old_chain = save_inferior_ptid ();
int xfer;
@@ -1502,7 +1495,7 @@ lin_lwp_thread_alive (ptid_t ptid)
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"LLTA: PTRACE_PEEKUSER %s, 0, 0 (%s)\n",
- target_pid_to_str (ptid),
+ target_pid_to_str (ptid),
errno ? safe_strerror (errno) : "OK");
if (errno)
return 0;
@@ -1586,11 +1579,9 @@ _initialize_lin_lwp (void)
sigemptyset (&blocked_mask);
add_show_from_set (add_set_cmd ("lin-lwp", no_class, var_zinteger,
- (char *) &debug_lin_lwp,
+ (char *) &debug_lin_lwp,
"Set debugging of GNU/Linux lwp module.\n\
-Enables printf debugging output.\n",
- &setdebuglist),
- &showdebuglist);
+Enables printf debugging output.\n", &setdebuglist), &showdebuglist);
}
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index 00383e9a6ee..a9512964dab 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -21,17 +21,17 @@
#include "defs.h"
#include "inferior.h"
-#include <sys/param.h> /* for MAXPATHLEN */
-#include <sys/procfs.h> /* for elf_gregset etc. */
-#include "gdb_stat.h" /* for struct stat */
-#include <ctype.h> /* for isdigit */
-#include <unistd.h> /* for open, pread64 */
-#include <fcntl.h> /* for O_RDONLY */
-#include "regcache.h" /* for registers_changed */
-#include "gregset.h" /* for gregset */
-#include "gdbcore.h" /* for get_exec_file */
-#include "gdbthread.h" /* for struct thread_info etc. */
-#include "elf-bfd.h" /* for elfcore_write_* */
+#include <sys/param.h> /* for MAXPATHLEN */
+#include <sys/procfs.h> /* for elf_gregset etc. */
+#include "gdb_stat.h" /* for struct stat */
+#include <ctype.h> /* for isdigit */
+#include <unistd.h> /* for open, pread64 */
+#include <fcntl.h> /* for O_RDONLY */
+#include "regcache.h" /* for registers_changed */
+#include "gregset.h" /* for gregset */
+#include "gdbcore.h" /* for get_exec_file */
+#include "gdbthread.h" /* for struct thread_info etc. */
+#include "elf-bfd.h" /* for elfcore_write_* */
#include "cli/cli-decode.h" /* for add_info */
#include "gdb_string.h"
@@ -69,28 +69,26 @@ child_pid_to_exec_file (int pid)
* Service function for corefiles and info proc.
*/
-static int
-read_mapping (FILE *mapfile,
- long long *addr,
- long long *endaddr,
- char *permissions,
- long long *offset,
- char *device,
- long long *inode,
- char *filename)
+static int
+read_mapping (FILE *mapfile,
+ long long *addr,
+ long long *endaddr,
+ char *permissions,
+ long long *offset,
+ char *device, long long *inode, char *filename)
{
- int ret = fscanf (mapfile, "%llx-%llx %s %llx %s %llx",
+ int ret = fscanf (mapfile, "%llx-%llx %s %llx %s %llx",
addr, endaddr, permissions, offset, device, inode);
if (ret > 0 && ret != EOF && *inode != 0)
{
/* Eat everything up to EOL for the filename. This will prevent
- weird filenames (such as one with embedded whitespace) from
- confusing this code. It also makes this code more robust
- in respect to annotations the kernel may add after the
- filename.
+ weird filenames (such as one with embedded whitespace) from
+ confusing this code. It also makes this code more robust
+ in respect to annotations the kernel may add after the
+ filename.
- Note the filename is used for informational purposes only. */
+ Note the filename is used for informational purposes only. */
ret += fscanf (mapfile, "%[^\n]\n", filename);
}
else
@@ -108,11 +106,9 @@ read_mapping (FILE *mapfile,
*/
static int
-linux_find_memory_regions (int (*func) (CORE_ADDR,
+linux_find_memory_regions (int (*func) (CORE_ADDR,
unsigned long,
- int, int, int,
- void *),
- void *obfd)
+ int, int, int, void *), void *obfd)
{
long long pid = PIDGET (inferior_ptid);
char mapsfilename[MAXPATHLEN];
@@ -128,31 +124,29 @@ linux_find_memory_regions (int (*func) (CORE_ADDR,
error ("Could not open %s\n", mapsfilename);
if (info_verbose)
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (gdb_stdout,
"Reading memory regions from %s\n", mapsfilename);
/* Now iterate until end-of-file. */
- while (read_mapping (mapsfile, &addr, &endaddr, &permissions[0],
+ while (read_mapping (mapsfile, &addr, &endaddr, &permissions[0],
&offset, &device[0], &inode, &filename[0]))
{
size = endaddr - addr;
/* Get the segment's permissions. */
- read = (strchr (permissions, 'r') != 0);
+ read = (strchr (permissions, 'r') != 0);
write = (strchr (permissions, 'w') != 0);
- exec = (strchr (permissions, 'x') != 0);
+ exec = (strchr (permissions, 'x') != 0);
if (info_verbose)
{
- fprintf_filtered (gdb_stdout,
- "Save segment, %lld bytes at 0x%s (%c%c%c)",
- size, paddr_nz (addr),
- read ? 'r' : ' ',
- write ? 'w' : ' ',
- exec ? 'x' : ' ');
+ fprintf_filtered (gdb_stdout,
+ "Save segment, %lld bytes at 0x%s (%c%c%c)",
+ size, paddr_nz (addr),
+ read ? 'r' : ' ',
+ write ? 'w' : ' ', exec ? 'x' : ' ');
if (filename && filename[0])
- fprintf_filtered (gdb_stdout,
- " for %s", filename);
+ fprintf_filtered (gdb_stdout, " for %s", filename);
fprintf_filtered (gdb_stdout, "\n");
}
@@ -169,7 +163,7 @@ linux_find_memory_regions (int (*func) (CORE_ADDR,
*/
static char *
-linux_do_thread_registers (bfd *obfd, ptid_t ptid,
+linux_do_thread_registers (bfd *obfd, ptid_t ptid,
char *note_data, int *note_size)
{
gdb_gregset_t gregs;
@@ -180,26 +174,23 @@ linux_do_thread_registers (bfd *obfd, ptid_t ptid,
unsigned long merged_pid = ptid_get_tid (ptid) << 16 | ptid_get_pid (ptid);
fill_gregset (&gregs, -1);
- note_data = (char *) elfcore_write_prstatus (obfd,
- note_data,
- note_size,
- merged_pid,
- stop_signal,
- &gregs);
+ note_data = (char *) elfcore_write_prstatus (obfd,
+ note_data,
+ note_size,
+ merged_pid,
+ stop_signal, &gregs);
fill_fpregset (&fpregs, -1);
- note_data = (char *) elfcore_write_prfpreg (obfd,
- note_data,
- note_size,
- &fpregs,
- sizeof (fpregs));
+ note_data = (char *) elfcore_write_prfpreg (obfd,
+ note_data,
+ note_size,
+ &fpregs, sizeof (fpregs));
#ifdef FILL_FPXREGSET
fill_fpxregset (&fpxregs, -1);
- note_data = (char *) elfcore_write_prxfpreg (obfd,
- note_data,
- note_size,
- &fpxregs,
- sizeof (fpxregs));
+ note_data = (char *) elfcore_write_prxfpreg (obfd,
+ note_data,
+ note_size,
+ &fpxregs, sizeof (fpxregs));
#endif
return note_data;
}
@@ -228,9 +219,9 @@ linux_corefile_thread_callback (struct thread_info *ti, void *data)
registers_changed ();
target_fetch_registers (-1); /* FIXME should not be necessary;
fill_gregset should do it automatically. */
- args->note_data = linux_do_thread_registers (args->obfd,
- ti->ptid,
- args->note_data,
+ args->note_data = linux_do_thread_registers (args->obfd,
+ ti->ptid,
+ args->note_data,
args->note_size);
args->num_notes++;
inferior_ptid = saved_ptid;
@@ -252,28 +243,24 @@ linux_make_note_section (bfd *obfd, int *note_size)
{
struct linux_corefile_thread_data thread_args;
struct cleanup *old_chain;
- char fname[16] = {'\0'};
- char psargs[80] = {'\0'};
+ char fname[16] = { '\0' };
+ char psargs[80] = { '\0' };
char *note_data = NULL;
ptid_t current_ptid = inferior_ptid;
if (get_exec_file (0))
{
strncpy (fname, strrchr (get_exec_file (0), '/') + 1, sizeof (fname));
- strncpy (psargs, get_exec_file (0),
- sizeof (psargs));
+ strncpy (psargs, get_exec_file (0), sizeof (psargs));
if (get_inferior_args ())
{
- strncat (psargs, " ",
- sizeof (psargs) - strlen (psargs));
- strncat (psargs, get_inferior_args (),
+ strncat (psargs, " ", sizeof (psargs) - strlen (psargs));
+ strncat (psargs, get_inferior_args (),
sizeof (psargs) - strlen (psargs));
}
- note_data = (char *) elfcore_write_prpsinfo (obfd,
- note_data,
- note_size,
- fname,
- psargs);
+ note_data = (char *) elfcore_write_prpsinfo (obfd,
+ note_data,
+ note_size, fname, psargs);
}
/* Dump information for threads. */
@@ -285,8 +272,8 @@ linux_make_note_section (bfd *obfd, int *note_size)
if (thread_args.num_notes == 0)
{
/* iterate_over_threads didn't come up with any threads;
- just use inferior_ptid. */
- note_data = linux_do_thread_registers (obfd, inferior_ptid,
+ just use inferior_ptid. */
+ note_data = linux_do_thread_registers (obfd, inferior_ptid,
note_data, note_size);
}
else
@@ -420,33 +407,30 @@ linux_info_proc_cmd (char *args, int from_tty)
if (TARGET_ADDR_BIT == 32)
{
header_fmt_string = "\t%10s %10s %10s %10s %7s\n";
- data_fmt_string = "\t%#10lx %#10lx %#10x %#10x %7s\n";
+ data_fmt_string = "\t%#10lx %#10lx %#10x %#10x %7s\n";
}
else
{
header_fmt_string = " %18s %18s %10s %10s %7s\n";
- data_fmt_string = " %#18lx %#18lx %#10x %#10x %7s\n";
+ data_fmt_string = " %#18lx %#18lx %#10x %#10x %7s\n";
}
printf_filtered ("Mapped address spaces:\n\n");
- printf_filtered (header_fmt_string,
+ printf_filtered (header_fmt_string,
"Start Addr",
" End Addr",
- " Size",
- " Offset",
- "objfile");
-
- while (read_mapping (procfile, &addr, &endaddr, &permissions[0],
+ " Size", " Offset", "objfile");
+
+ while (read_mapping (procfile, &addr, &endaddr, &permissions[0],
&offset, &device[0], &inode, &filename[0]))
{
size = endaddr - addr;
- printf_filtered (data_fmt_string,
- (unsigned long) addr, /* FIXME: pr_addr */
- (unsigned long) endaddr,
- (int) size,
- (unsigned int) offset,
+ printf_filtered (data_fmt_string, (unsigned long) addr, /* FIXME: pr_addr */
+ (unsigned long) endaddr,
+ (int) size,
+ (unsigned int) offset,
filename[0] ? filename : "");
-
+
}
fclose (procfile);
@@ -463,7 +447,7 @@ linux_info_proc_cmd (char *args, int from_tty)
printf_filtered (buffer);
fclose (procfile);
}
- else
+ else
warning ("unable to open /proc file '%s'", fname1);
}
if (stat_f || all)
@@ -493,16 +477,16 @@ linux_info_proc_cmd (char *args, int from_tty)
if (fscanf (procfile, "%u ", &itmp) > 0)
printf_filtered ("Flags: 0x%x\n", itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("Minor faults (no memory page): %u\n",
+ printf_filtered ("Minor faults (no memory page): %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("Minor faults, children: %u\n",
+ printf_filtered ("Minor faults, children: %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("Major faults (memory page faults): %u\n",
+ printf_filtered ("Major faults (memory page faults): %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("Major faults, children: %u\n",
+ printf_filtered ("Major faults, children: %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%d ", &itmp) > 0)
printf_filtered ("utime: %d\n", itmp);
@@ -513,36 +497,34 @@ linux_info_proc_cmd (char *args, int from_tty)
if (fscanf (procfile, "%d ", &itmp) > 0)
printf_filtered ("stime, children: %d\n", itmp);
if (fscanf (procfile, "%d ", &itmp) > 0)
- printf_filtered ("jiffies remaining in current time slice: %d\n",
+ printf_filtered ("jiffies remaining in current time slice: %d\n",
itmp);
if (fscanf (procfile, "%d ", &itmp) > 0)
printf_filtered ("'nice' value: %d\n", itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("jiffies until next timeout: %u\n",
+ printf_filtered ("jiffies until next timeout: %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("jiffies until next SIGALRM: %u\n",
+ printf_filtered ("jiffies until next SIGALRM: %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%d ", &itmp) > 0)
- printf_filtered ("start time (jiffies since system boot): %d\n",
+ printf_filtered ("start time (jiffies since system boot): %d\n",
itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("Virtual memory size: %u\n",
+ printf_filtered ("Virtual memory size: %u\n",
(unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("Resident set size: %u\n",
- (unsigned int) itmp);
+ printf_filtered ("Resident set size: %u\n", (unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
- printf_filtered ("rlim: %u\n",
- (unsigned int) itmp);
+ printf_filtered ("rlim: %u\n", (unsigned int) itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
printf_filtered ("Start of text: 0x%x\n", itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
printf_filtered ("End of text: 0x%x\n", itmp);
if (fscanf (procfile, "%u ", &itmp) > 0)
printf_filtered ("Start of stack: 0x%x\n", itmp);
-#if 0 /* Don't know how architecture-dependent the rest is...
- Anyway the signal bitmap info is available from "status". */
+#if 0 /* Don't know how architecture-dependent the rest is...
+ Anyway the signal bitmap info is available from "status". */
if (fscanf (procfile, "%u ", &itmp) > 0) /* FIXME arch? */
printf_filtered ("Kernel stack pointer: 0x%x\n", itmp);
if (fscanf (procfile, "%u ", &itmp) > 0) /* FIXME arch? */
@@ -574,7 +556,7 @@ _initialize_linux_proc (void)
inftarg_set_find_memory_regions (linux_find_memory_regions);
inftarg_set_make_corefile_notes (linux_make_note_section);
- add_info ("proc", linux_info_proc_cmd,
+ add_info ("proc", linux_info_proc_cmd,
"Show /proc process information about any running process.\n\
Specify any process id, or use the program being debugged by default.\n\
Specify any of the following keywords for detailed info:\n\
@@ -584,9 +566,9 @@ Specify any of the following keywords for detailed info:\n\
all -- list all available /proc info.");
}
-int linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
+int
+linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len, int write,
+ struct mem_attrib *attrib, struct target_ops *target)
{
int fd, ret;
char filename[64];
@@ -616,8 +598,7 @@ int linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len, int write,
#ifdef HAVE_PREAD64
if (pread64 (fd, myaddr, len, addr) != len)
#else
- if (lseek (fd, addr, SEEK_SET) == -1
- || read (fd, myaddr, len) != len)
+ if (lseek (fd, addr, SEEK_SET) == -1 || read (fd, myaddr, len) != len)
#endif
ret = 0;
else
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index 48c6931e29b..4932cdfebd4 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -427,6 +427,7 @@ const struct language_defn m2_language_defn =
m2_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"%loB", "", "o", "B"}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 02ba5c0b096..ef54821844e 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1369,7 +1369,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM);
set_gdbarch_fp_regnum (gdbarch, SOFT_FP_REGNUM);
@@ -1380,20 +1380,14 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
- set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_call_dummy_address (gdbarch, m68hc11_call_dummy_address);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); /*???*/
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_words (gdbarch, m68hc11_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (m68hc11_call_dummy_words));
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
- set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, m68hc11_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, m68hc11_push_return_address);
set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index a72ea534671..7a9886b5076 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1038,10 +1038,8 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 28);
set_gdbarch_call_dummy_start_offset (gdbarch, 12);
@@ -1051,6 +1049,9 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}
diff --git a/gdb/maint.c b/gdb/maint.c
index f2dfa682bac..166acdb2ea9 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -151,17 +151,8 @@ maintenance_demangle (char *args, int from_tty)
}
else
{
- switch (current_language->la_language)
- {
- case language_objc:
- /* Commented out until ObjC handling is enabled. */
- /* demangled = objc_demangle (args); */
- /* break; */
- case language_cplus:
- default:
- demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
- break;
- }
+ demangled = language_demangle (current_language, args,
+ DMGL_ANSI | DMGL_PARAMS);
if (demangled != NULL)
{
printf_unfiltered ("%s\n", demangled);
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index e3070b35d1e..21f3ce68c83 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1116,22 +1116,15 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Call Dummies: */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_breakpoint_from_pc (gdbarch, mcore_breakpoint_from_pc);
- set_gdbarch_push_return_address (gdbarch, mcore_push_return_address);
- set_gdbarch_push_arguments (gdbarch, mcore_push_arguments);
- set_gdbarch_call_dummy_length (gdbarch, 0);
+ set_gdbarch_deprecated_push_return_address (gdbarch, mcore_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mcore_push_arguments);
/* Frames: */
@@ -1163,6 +1156,9 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
between registers and stack. */
set_gdbarch_reg_struct_has_addr (gdbarch, mcore_reg_struct_has_addr);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 1785b9b8813..73b4975534c 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,17 @@
+2003-04-02 Bob Rossi <bob_rossi@cox.net>
+
+ * mi-cmd-file.c: New file to implement mi file commands.
+ * mi-getopt.c (mi_valid_noargs): Added mi_valid_noargs to verify
+ if a set of parameters passed to an MI function has no arguments
+ * mi-getopt.h (mi_valid_noargs): Declare.
+ * mi-cmds.c (mi_cmds): Added -file-list-exec-source-file command.
+ * mi-cmds.h (mi_cmd_file_list_exec_source_file): Declare.
+
+2003-03-27 Andrew Cagney <cagney@redhat.com>
+
+ * gdbmi.texinfo: Delete file. Contents moved to
+ ../doc/gdb.texinfo.
+
2003-03-12 Andrew Cagney <cagney@redhat.com>
* mi-main.c (get_register): Use frame_register instead of
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
deleted file mode 100644
index da8b77cc354..00000000000
--- a/gdb/mi/gdbmi.texinfo
+++ /dev/null
@@ -1,3902 +0,0 @@
-@c \input texinfo @c -*-texinfo-*-
-@c @c %**start of header
-@c @setfilename gdbmi.info
-@c @settitle GDB/MI Machine Interface
-@c @setchapternewpage off
-@c @c %**end of header
-
-@c @ifinfo
-@c This file documents GDB/MI, a Machine Interface to GDB.
-
-@c Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
-@c Contributed by Cygnus Solutions.
-
-@c Permission is granted to copy, distribute and/or modify this document
-@c under the terms of the GNU Free Documentation License, Version 1.1 or
-@c any later version published by the Free Software Foundation; with no
-@c Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-@c and with the Back-Cover Texts as in (a) below.
-
-@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-@c this GNU Manual, like GNU software. Copies published by the Free
-@c Software Foundation raise funds for GNU development.''
-@c @end ifinfo
-
-@c @c This title page illustrates only one of the
-@c @c two methods of forming a title page.
-
-@c @titlepage
-@c @title GDB/MI
-@c @subtitle Version 0.3
-@c @subtitle Apr 2001
-@c @author Andrew Cagney, Fernando Nasser and Elena Zannoni
-
-@c @c The following two commands
-@c @c start the copyright page.
-@c @page
-@c @vskip 0pt plus 1filll
-
-@c Copyright @copyright{} 2000, 2001, 2002 Free Software Foundation, Inc.
-
-@c Permission is granted to copy, distribute and/or modify this document
-@c under the terms of the GNU Free Documentation License, Version 1.1 or
-@c any later version published by the Free Software Foundation; with no
-@c Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
-@c and with the Back-Cover Texts as in (a) below.
-
-@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-@c this GNU Manual, like GNU software. Copies published by the Free
-@c Software Foundation raise funds for GNU development.''
-@c @end titlepage
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% CHAPTER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI
-@chapter The @sc{gdb/mi} Interface
-
-@unnumberedsec Function and Purpose
-
-@cindex @sc{gdb/mi}, its purpose
-@sc{gdb/mi} is a line based machine oriented text interface to @value{GDBN}. It is
-specifically intended to support the development of systems which use
-the debugger as just one small component of a larger system.
-
-This chapter is a specification of the @sc{gdb/mi} interface. It is written
-in the form of a reference manual.
-
-Note that @sc{gdb/mi} is still under construction, so some of the
-features described below are incomplete and subject to change.
-
-@unnumberedsec Notation and Terminology
-
-@cindex notational conventions, for @sc{gdb/mi}
-This chapter uses the following notation:
-
-@itemize @bullet
-@item
-@code{|} separates two alternatives.
-
-@item
-@code{[ @var{something} ]} indicates that @var{something} is optional:
-it may or may not be given.
-
-@item
-@code{( @var{group} )*} means that @var{group} inside the parentheses
-may repeat zero or more times.
-
-@item
-@code{( @var{group} )+} means that @var{group} inside the parentheses
-may repeat one or more times.
-
-@item
-@code{"@var{string}"} means a literal @var{string}.
-@end itemize
-
-@ignore
-@heading Dependencies
-@end ignore
-
-@heading Acknowledgments
-
-In alphabetic order: Andrew Cagney, Fernando Nasser, Stan Shebs and
-Elena Zannoni.
-
-@menu
-* GDB/MI Command Syntax::
-* GDB/MI Compatibility with CLI::
-* GDB/MI Output Records::
-* GDB/MI Command Description Format::
-* GDB/MI Breakpoint Table Commands::
-* GDB/MI Data Manipulation::
-* GDB/MI Program Control::
-* GDB/MI Miscellaneous Commands::
-@ignore
-* GDB/MI Kod Commands::
-* GDB/MI Memory Overlay Commands::
-* GDB/MI Signal Handling Commands::
-@end ignore
-* GDB/MI Stack Manipulation::
-* GDB/MI Symbol Query::
-* GDB/MI Target Manipulation::
-* GDB/MI Thread Commands::
-* GDB/MI Tracepoint Commands::
-* GDB/MI Variable Objects::
-@end menu
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Command Syntax
-@section @sc{gdb/mi} Command Syntax
-
-@menu
-* GDB/MI Input Syntax::
-* GDB/MI Output Syntax::
-* GDB/MI Simple Examples::
-@end menu
-
-@node GDB/MI Input Syntax
-@subsection @sc{gdb/mi} Input Syntax
-
-@cindex input syntax for @sc{gdb/mi}
-@cindex @sc{gdb/mi}, input syntax
-@table @code
-@item @var{command} @expansion{}
-@code{@var{cli-command} | @var{mi-command}}
-
-@item @var{cli-command} @expansion{}
-@code{[ @var{token} ] @var{cli-command} @var{nl}}, where
-@var{cli-command} is any existing @value{GDBN} CLI command.
-
-@item @var{mi-command} @expansion{}
-@code{[ @var{token} ] "-" @var{operation} ( " " @var{option} )*
-@code{[} " --" @code{]} ( " " @var{parameter} )* @var{nl}}
-
-@item @var{token} @expansion{}
-"any sequence of digits"
-
-@item @var{option} @expansion{}
-@code{"-" @var{parameter} [ " " @var{parameter} ]}
-
-@item @var{parameter} @expansion{}
-@code{@var{non-blank-sequence} | @var{c-string}}
-
-@item @var{operation} @expansion{}
-@emph{any of the operations described in this chapter}
-
-@item @var{non-blank-sequence} @expansion{}
-@emph{anything, provided it doesn't contain special characters such as
-"-", @var{nl}, """ and of course " "}
-
-@item @var{c-string} @expansion{}
-@code{""" @var{seven-bit-iso-c-string-content} """}
-
-@item @var{nl} @expansion{}
-@code{CR | CR-LF}
-@end table
-
-@noindent
-Notes:
-
-@itemize @bullet
-@item
-The CLI commands are still handled by the @sc{mi} interpreter; their
-output is described below.
-
-@item
-The @code{@var{token}}, when present, is passed back when the command
-finishes.
-
-@item
-Some @sc{mi} commands accept optional arguments as part of the parameter
-list. Each option is identified by a leading @samp{-} (dash) and may be
-followed by an optional argument parameter. Options occur first in the
-parameter list and can be delimited from normal parameters using
-@samp{--} (this is useful when some parameters begin with a dash).
-@end itemize
-
-Pragmatics:
-
-@itemize @bullet
-@item
-We want easy access to the existing CLI syntax (for debugging).
-
-@item
-We want it to be easy to spot a @sc{mi} operation.
-@end itemize
-
-@node GDB/MI Output Syntax
-@subsection @sc{gdb/mi} Output Syntax
-
-@cindex output syntax of @sc{gdb/mi}
-@cindex @sc{gdb/mi}, output syntax
-The output from @sc{gdb/mi} consists of zero or more out-of-band records
-followed, optionally, by a single result record. This result record
-is for the most recent command. The sequence of output records is
-terminated by @samp{(@value{GDBP})}.
-
-If an input command was prefixed with a @code{@var{token}} then the
-corresponding output for that command will also be prefixed by that same
-@var{token}.
-
-@table @code
-@item @var{output} @expansion{}
-@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}}
-
-@item @var{result-record} @expansion{}
-@code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}}
-
-@item @var{out-of-band-record} @expansion{}
-@code{@var{async-record} | @var{stream-record}}
-
-@item @var{async-record} @expansion{}
-@code{@var{exec-async-output} | @var{status-async-output} | @var{notify-async-output}}
-
-@item @var{exec-async-output} @expansion{}
-@code{[ @var{token} ] "*" @var{async-output}}
-
-@item @var{status-async-output} @expansion{}
-@code{[ @var{token} ] "+" @var{async-output}}
-
-@item @var{notify-async-output} @expansion{}
-@code{[ @var{token} ] "=" @var{async-output}}
-
-@item @var{async-output} @expansion{}
-@code{@var{async-class} ( "," @var{result} )* @var{nl}}
-
-@item @var{result-class} @expansion{}
-@code{"done" | "running" | "connected" | "error" | "exit"}
-
-@item @var{async-class} @expansion{}
-@code{"stopped" | @var{others}} (where @var{others} will be added
-depending on the needs---this is still in development).
-
-@item @var{result} @expansion{}
-@code{ @var{variable} "=" @var{value}}
-
-@item @var{variable} @expansion{}
-@code{ @var{string} }
-
-@item @var{value} @expansion{}
-@code{ @var{const} | @var{tuple} | @var{list} }
-
-@item @var{const} @expansion{}
-@code{@var{c-string}}
-
-@item @var{tuple} @expansion{}
-@code{ "@{@}" | "@{" @var{result} ( "," @var{result} )* "@}" }
-
-@item @var{list} @expansion{}
-@code{ "[]" | "[" @var{value} ( "," @var{value} )* "]" | "["
-@var{result} ( "," @var{result} )* "]" }
-
-@item @var{stream-record} @expansion{}
-@code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
-
-@item @var{console-stream-output} @expansion{}
-@code{"~" @var{c-string}}
-
-@item @var{target-stream-output} @expansion{}
-@code{"@@" @var{c-string}}
-
-@item @var{log-stream-output} @expansion{}
-@code{"&" @var{c-string}}
-
-@item @var{nl} @expansion{}
-@code{CR | CR-LF}
-
-@item @var{token} @expansion{}
-@emph{any sequence of digits}.
-@end table
-
-@noindent
-Notes:
-
-@itemize @bullet
-@item
-All output sequences end in a single line containing a period.
-
-@item
-The @code{@var{token}} is from the corresponding request. If an execution
-command is interrupted by the @samp{-exec-interrupt} command, the
-@var{token} associated with the @samp{*stopped} message is the one of the
-original execution command, not the one of the interrupt command.
-
-@item
-@cindex status output in @sc{gdb/mi}
-@var{status-async-output} contains on-going status information about the
-progress of a slow operation. It can be discarded. All status output is
-prefixed by @samp{+}.
-
-@item
-@cindex async output in @sc{gdb/mi}
-@var{exec-async-output} contains asynchronous state change on the target
-(stopped, started, disappeared). All async output is prefixed by
-@samp{*}.
-
-@item
-@cindex notify output in @sc{gdb/mi}
-@var{notify-async-output} contains supplementary information that the
-client should handle (e.g., a new breakpoint information). All notify
-output is prefixed by @samp{=}.
-
-@item
-@cindex console output in @sc{gdb/mi}
-@var{console-stream-output} is output that should be displayed as is in the
-console. It is the textual response to a CLI command. All the console
-output is prefixed by @samp{~}.
-
-@item
-@cindex target output in @sc{gdb/mi}
-@var{target-stream-output} is the output produced by the target program.
-All the target output is prefixed by @samp{@@}.
-
-@item
-@cindex log output in @sc{gdb/mi}
-@var{log-stream-output} is output text coming from @value{GDBN}'s internals, for
-instance messages that should be displayed as part of an error log. All
-the log output is prefixed by @samp{&}.
-
-@item
-@cindex list output in @sc{gdb/mi}
-New @sc{gdb/mi} commands should only output @var{lists} containing
-@var{values}.
-
-
-@end itemize
-
-@xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more
-details about the various output records.
-
-@node GDB/MI Simple Examples
-@subsection Simple Examples of @sc{gdb/mi} Interaction
-@cindex @sc{gdb/mi}, simple examples
-
-This subsection presents several simple examples of interaction using
-the @sc{gdb/mi} interface. In these examples, @samp{->} means that the
-following line is passed to @sc{gdb/mi} as input, while @samp{<-} means
-the output received from @sc{gdb/mi}.
-
-@subsubheading Target Stop
-@c Ummm... There is no "-stop" command. This assumes async, no?
-Here's an example of stopping the inferior process:
-
-@example
--> -stop
-<- (@value{GDBP})
-@end example
-
-@noindent
-and later:
-
-@example
-<- *stop,reason="stop",address="0x123",source="a.c:123"
-<- (@value{GDBP})
-@end example
-
-@subsubheading Simple CLI Command
-
-Here's an example of a simple CLI command being passed through
-@sc{gdb/mi} and on to the CLI.
-
-@example
--> print 1+2
-<- &"print 1+2\n"
-<- ~"$1 = 3\n"
-<- ^done
-<- (@value{GDBP})
-@end example
-
-@subsubheading Command With Side Effects
-
-@example
--> -symbol-file xyz.exe
-<- *breakpoint,nr="3",address="0x123",source="a.c:123"
-<- (@value{GDBP})
-@end example
-
-@subsubheading A Bad Command
-
-Here's what happens if you pass a non-existent command:
-
-@example
--> -rubbish
-<- ^error,msg="Undefined MI command: rubbish"
-<- (@value{GDBP})
-@end example
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Compatibility with CLI
-@section @sc{gdb/mi} Compatibility with CLI
-
-@cindex compatibility, @sc{gdb/mi} and CLI
-@cindex @sc{gdb/mi}, compatibility with CLI
-To help users familiar with @value{GDBN}'s existing CLI interface, @sc{gdb/mi}
-accepts existing CLI commands. As specified by the syntax, such
-commands can be directly entered into the @sc{gdb/mi} interface and @value{GDBN} will
-respond.
-
-This mechanism is provided as an aid to developers of @sc{gdb/mi}
-clients and not as a reliable interface into the CLI. Since the command
-is being interpreteted in an environment that assumes @sc{gdb/mi}
-behaviour, the exact output of such commands is likely to end up being
-an un-supported hybrid of @sc{gdb/mi} and CLI output.
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Output Records
-@section @sc{gdb/mi} Output Records
-
-@menu
-* GDB/MI Result Records::
-* GDB/MI Stream Records::
-* GDB/MI Out-of-band Records::
-@end menu
-
-@node GDB/MI Result Records
-@subsection @sc{gdb/mi} Result Records
-
-@cindex result records in @sc{gdb/mi}
-@cindex @sc{gdb/mi}, result records
-In addition to a number of out-of-band notifications, the response to a
-@sc{gdb/mi} command includes one of the following result indications:
-
-@table @code
-@findex ^done
-@item "^done" [ "," @var{results} ]
-The synchronous operation was successful, @code{@var{results}} are the return
-values.
-
-@item "^running"
-@findex ^running
-@c Is this one correct? Should it be an out-of-band notification?
-The asynchronous operation was successfully started. The target is
-running.
-
-@item "^error" "," @var{c-string}
-@findex ^error
-The operation failed. The @code{@var{c-string}} contains the corresponding
-error message.
-@end table
-
-@node GDB/MI Stream Records
-@subsection @sc{gdb/mi} Stream Records
-
-@cindex @sc{gdb/mi}, stream records
-@cindex stream records in @sc{gdb/mi}
-@value{GDBN} internally maintains a number of output streams: the console, the
-target, and the log. The output intended for each of these streams is
-funneled through the @sc{gdb/mi} interface using @dfn{stream records}.
-
-Each stream record begins with a unique @dfn{prefix character} which
-identifies its stream (@pxref{GDB/MI Output Syntax, , @sc{gdb/mi} Output
-Syntax}). In addition to the prefix, each stream record contains a
-@code{@var{string-output}}. This is either raw text (with an implicit new
-line) or a quoted C string (which does not contain an implicit newline).
-
-@table @code
-@item "~" @var{string-output}
-The console output stream contains text that should be displayed in the
-CLI console window. It contains the textual responses to CLI commands.
-
-@item "@@" @var{string-output}
-The target output stream contains any textual output from the running
-target.
-
-@item "&" @var{string-output}
-The log stream contains debugging messages being produced by @value{GDBN}'s
-internals.
-@end table
-
-@node GDB/MI Out-of-band Records
-@subsection @sc{gdb/mi} Out-of-band Records
-
-@cindex out-of-band records in @sc{gdb/mi}
-@cindex @sc{gdb/mi}, out-of-band records
-@dfn{Out-of-band} records are used to notify the @sc{gdb/mi} client of
-additional changes that have occurred. Those changes can either be a
-consequence of @sc{gdb/mi} (e.g., a breakpoint modified) or a result of
-target activity (e.g., target stopped).
-
-The following is a preliminary list of possible out-of-band records.
-
-@table @code
-@item "*" "stop"
-@end table
-
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Command Description Format
-@section @sc{gdb/mi} Command Description Format
-
-The remaining sections describe blocks of commands. Each block of
-commands is laid out in a fashion similar to this section.
-
-Note the the line breaks shown in the examples are here only for
-readability. They don't appear in the real output.
-Also note that the commands with a non-available example (N.A.@:) are
-not yet implemented.
-
-@subheading Motivation
-
-The motivation for this collection of commands.
-
-@subheading Introduction
-
-A brief introduction to this collection of commands as a whole.
-
-@subheading Commands
-
-For each command in the block, the following is described:
-
-@subsubheading Synopsis
-
-@example
- -command @var{args}@dots{}
-@end example
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} CLI command.
-
-@subsubheading Result
-
-@subsubheading Out-of-band
-
-@subsubheading Notes
-
-@subsubheading Example
-
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Breakpoint Table Commands
-@section @sc{gdb/mi} Breakpoint table commands
-
-@cindex breakpoint commands for @sc{gdb/mi}
-@cindex @sc{gdb/mi}, breakpoint commands
-This section documents @sc{gdb/mi} commands for manipulating
-breakpoints.
-
-@subheading The @code{-break-after} Command
-@findex -break-after
-
-@subsubheading Synopsis
-
-@example
- -break-after @var{number} @var{count}
-@end example
-
-The breakpoint number @var{number} is not in effect until it has been
-hit @var{count} times. To see how this is reflected in the output of
-the @samp{-break-list} command, see the description of the
-@samp{-break-list} command below.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{ignore}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-insert main
-^done,bkpt=@{number="1",addr="0x000100d0",file="hello.c",line="5"@}
-(@value{GDBP})
--break-after 1 3
-~
-^done
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
-ignore="3"@}]@}
-(@value{GDBP})
-@end smallexample
-
-@ignore
-@subheading The @code{-break-catch} Command
-@findex -break-catch
-
-@subheading The @code{-break-commands} Command
-@findex -break-commands
-@end ignore
-
-
-@subheading The @code{-break-condition} Command
-@findex -break-condition
-
-@subsubheading Synopsis
-
-@example
- -break-condition @var{number} @var{expr}
-@end example
-
-Breakpoint @var{number} will stop the program only if the condition in
-@var{expr} is true. The condition becomes part of the
-@samp{-break-list} output (see the description of the @samp{-break-list}
-command below).
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{condition}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-condition 1 1
-^done
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
-times="0",ignore="3"@}]@}
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-break-delete} Command
-@findex -break-delete
-
-@subsubheading Synopsis
-
-@example
- -break-delete ( @var{breakpoint} )+
-@end example
-
-Delete the breakpoint(s) whose number(s) are specified in the argument
-list. This is obviously reflected in the breakpoint list.
-
-@subsubheading @value{GDBN} command
-
-The corresponding @value{GDBN} command is @samp{delete}.
-
-@subsubheading Example
-
-@example
-(@value{GDBP})
--break-delete 1
-^done
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[]@}
-(@value{GDBP})
-@end example
-
-@subheading The @code{-break-disable} Command
-@findex -break-disable
-
-@subsubheading Synopsis
-
-@example
- -break-disable ( @var{breakpoint} )+
-@end example
-
-Disable the named @var{breakpoint}(s). The field @samp{enabled} in the
-break list is now set to @samp{n} for the named @var{breakpoint}(s).
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{disable}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-disable 2
-^done
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-break-enable} Command
-@findex -break-enable
-
-@subsubheading Synopsis
-
-@example
- -break-enable ( @var{breakpoint} )+
-@end example
-
-Enable (previously disabled) @var{breakpoint}(s).
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{enable}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-enable 2
-^done
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-break-info} Command
-@findex -break-info
-
-@subsubheading Synopsis
-
-@example
- -break-info @var{breakpoint}
-@end example
-
-@c REDUNDANT???
-Get information about a single breakpoint.
-
-@subsubheading @value{GDBN} command
-
-The corresponding @value{GDBN} command is @samp{info break @var{breakpoint}}.
-
-@subsubheading Example
-N.A.
-
-@subheading The @code{-break-insert} Command
-@findex -break-insert
-
-@subsubheading Synopsis
-
-@example
- -break-insert [ -t ] [ -h ] [ -r ]
- [ -c @var{condition} ] [ -i @var{ignore-count} ]
- [ -p @var{thread} ] [ @var{line} | @var{addr} ]
-@end example
-
-@noindent
-If specified, @var{line}, can be one of:
-
-@itemize @bullet
-@item function
-@c @item +offset
-@c @item -offset
-@c @item linenum
-@item filename:linenum
-@item filename:function
-@item *address
-@end itemize
-
-The possible optional parameters of this command are:
-
-@table @samp
-@item -t
-Insert a tempoary breakpoint.
-@item -h
-Insert a hardware breakpoint.
-@item -c @var{condition}
-Make the breakpoint conditional on @var{condition}.
-@item -i @var{ignore-count}
-Initialize the @var{ignore-count}.
-@item -r
-Insert a regular breakpoint in all the functions whose names match the
-given regular expression. Other flags are not applicable to regular
-expresson.
-@end table
-
-@subsubheading Result
-
-The result is in the form:
-
-@example
- ^done,bkptno="@var{number}",func="@var{funcname}",
- file="@var{filename}",line="@var{lineno}"
-@end example
-
-@noindent
-where @var{number} is the @value{GDBN} number for this breakpoint, @var{funcname}
-is the name of the function where the breakpoint was inserted,
-@var{filename} is the name of the source file which contains this
-function, and @var{lineno} is the source line number within that file.
-
-Note: this format is open to change.
-@c An out-of-band breakpoint instead of part of the result?
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak},
-@samp{hbreak}, @samp{thbreak}, and @samp{rbreak}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-insert main
-^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
-(@value{GDBP})
--break-insert -t foo
-^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
-bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
-addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}]@}
-(@value{GDBP})
--break-insert -r foo.*
-~int foo(int, int);
-^done,bkpt=@{number="3",addr="0x00010774",file="recursive2.c",line="11"@}
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-break-list} Command
-@findex -break-list
-
-@subsubheading Synopsis
-
-@example
- -break-list
-@end example
-
-Displays the list of inserted breakpoints, showing the following fields:
-
-@table @samp
-@item Number
-number of the breakpoint
-@item Type
-type of the breakpoint: @samp{breakpoint} or @samp{watchpoint}
-@item Disposition
-should the breakpoint be deleted or disabled when it is hit: @samp{keep}
-or @samp{nokeep}
-@item Enabled
-is the breakpoint enabled or no: @samp{y} or @samp{n}
-@item Address
-memory location at which the breakpoint is set
-@item What
-logical location of the breakpoint, expressed by function name, file
-name, line number
-@item Times
-number of times the breakpoint has been hit
-@end table
-
-If there are no breakpoints or watchpoints, the @code{BreakpointTable}
-@code{body} field is an empty list.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info break}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
-bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}]@}
-(@value{GDBP})
-@end smallexample
-
-Here's an example of the result when there are no breakpoints:
-
-@smallexample
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[]@}
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-break-watch} Command
-@findex -break-watch
-
-@subsubheading Synopsis
-
-@example
- -break-watch [ -a | -r ]
-@end example
-
-Create a watchpoint. With the @samp{-a} option it will create an
-@dfn{access} watchpoint, i.e. a watchpoint that triggers either on a
-read from or on a write to the memory location. With the @samp{-r}
-option, the watchpoint created is a @dfn{read} watchpoint, i.e. it will
-trigger only when the memory location is accessed for reading. Without
-either of the options, the watchpoint created is a regular watchpoint,
-i.e. it will trigger when the memory location is accessed for writing.
-@xref{Set Watchpoints, , Setting watchpoints}.
-
-Note that @samp{-break-list} will report a single list of watchpoints and
-breakpoints inserted.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} commands are @samp{watch}, @samp{awatch}, and
-@samp{rwatch}.
-
-@subsubheading Example
-
-Setting a watchpoint on a variable in the @code{main} function:
-
-@smallexample
-(@value{GDBP})
--break-watch x
-^done,wpt=@{number="2",exp="x"@}
-(@value{GDBP})
--exec-continue
-^running
-^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
-value=@{old="-268439212",new="55"@},
-frame=@{func="main",args=[],file="recursive2.c",line="5"@}
-(@value{GDBP})
-@end smallexample
-
-Setting a watchpoint on a variable local to a function. @value{GDBN} will stop
-the program execution twice: first for the variable changing value, then
-for the watchpoint going out of scope.
-
-@smallexample
-(@value{GDBP})
--break-watch C
-^done,wpt=@{number="5",exp="C"@}
-(@value{GDBP})
--exec-continue
-^running
-^done,reason="watchpoint-trigger",
-wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@},
-frame=@{func="callee4",args=[],
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
-(@value{GDBP})
--exec-continue
-^running
-^done,reason="watchpoint-scope",wpnum="5",
-frame=@{func="callee3",args=[@{name="strarg",
-value="0x11940 \"A string argument.\""@}],
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
-(@value{GDBP})
-@end smallexample
-
-Listing breakpoints and watchpoints, at different points in the program
-execution. Note that once the watchpoint goes out of scope, it is
-deleted.
-
-@smallexample
-(@value{GDBP})
--break-watch C
-^done,wpt=@{number="2",exp="C"@}
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
-bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="0"@}]@}
-(@value{GDBP})
--exec-continue
-^running
-^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@},
-value=@{old="-276895068",new="3"@},
-frame=@{func="callee4",args=[],
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
-bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="-5"@}]@}
-(@value{GDBP})
--exec-continue
-^running
-^done,reason="watchpoint-scope",wpnum="2",
-frame=@{func="callee3",args=[@{name="strarg",
-value="0x11940 \"A string argument.\""@}],
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
-(@value{GDBP})
--break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}]@}
-(@value{GDBP})
-@end smallexample
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Data Manipulation
-@section @sc{gdb/mi} Data Manipulation
-
-@cindex data manipulation, in @sc{gdb/mi}
-@cindex @sc{gdb/mi}, data manipulation
-This section describes the @sc{gdb/mi} commands that manipulate data:
-examine memory and registers, evaluate expressions, etc.
-
-@c REMOVED FROM THE INTERFACE.
-@c @subheading -data-assign
-@c Change the value of a program variable. Plenty of side effects.
-@c @subsubheading GDB command
-@c set variable
-@c @subsubheading Example
-@c N.A.
-
-@subheading The @code{-data-disassemble} Command
-@findex -data-disassemble
-
-@subsubheading Synopsis
-
-@example
- -data-disassemble
- [ -s @var{start-addr} -e @var{end-addr} ]
- | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ]
- -- @var{mode}
-@end example
-
-@noindent
-Where:
-
-@table @samp
-@item @var{start-addr}
-is the beginning address (or @code{$pc})
-@item @var{end-addr}
-is the end address
-@item @var{filename}
-is the name of the file to disassemble
-@item @var{linenum}
-is the line number to disassemble around
-@item @var{lines}
-is the the number of disassembly lines to be produced. If it is -1,
-the whole function will be disassembled, in case no @var{end-addr} is
-specified. If @var{end-addr} is specified as a non-zero value, and
-@var{lines} is lower than the number of disassembly lines between
-@var{start-addr} and @var{end-addr}, only @var{lines} lines are
-displayed; if @var{lines} is higher than the number of lines between
-@var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr}
-are displayed.
-@item @var{mode}
-is either 0 (meaning only disassembly) or 1 (meaning mixed source and
-disassembly).
-@end table
-
-@subsubheading Result
-
-The output for each instruction is composed of four fields:
-
-@itemize @bullet
-@item Address
-@item Func-name
-@item Offset
-@item Instruction
-@end itemize
-
-Note that whatever included in the instruction field, is not manipulated
-directely by @sc{gdb/mi}, i.e. it is not possible to adjust its format.
-
-@subsubheading @value{GDBN} Command
-
-There's no direct mapping from this command to the CLI.
-
-@subsubheading Example
-
-Disassemble from the current value of @code{$pc} to @code{$pc + 20}:
-
-@smallexample
-(@value{GDBP})
--data-disassemble -s $pc -e "$pc + 20" -- 0
-^done,
-asm_insns=[
-@{address="0x000107c0",func-name="main",offset="4",
-inst="mov 2, %o0"@},
-@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@},
-@{address="0x000107c8",func-name="main",offset="12",
-inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@},
-@{address="0x000107cc",func-name="main",offset="16",
-inst="sethi %hi(0x11800), %o2"@},
-@{address="0x000107d0",func-name="main",offset="20",
-inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}]
-(@value{GDBP})
-@end smallexample
-
-Disassemble the whole @code{main} function. Line 32 is part of
-@code{main}.
-
-@smallexample
--data-disassemble -f basics.c -l 32 -- 0
-^done,asm_insns=[
-@{address="0x000107bc",func-name="main",offset="0",
-inst="save %sp, -112, %sp"@},
-@{address="0x000107c0",func-name="main",offset="4",
-inst="mov 2, %o0"@},
-@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@},
-[@dots{}]
-@{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
-@{address="0x00010820",func-name="main",offset="100",inst="restore "@}]
-(@value{GDBP})
-@end smallexample
-
-Disassemble 3 instructions from the start of @code{main}:
-
-@smallexample
-(@value{GDBP})
--data-disassemble -f basics.c -l 32 -n 3 -- 0
-^done,asm_insns=[
-@{address="0x000107bc",func-name="main",offset="0",
-inst="save %sp, -112, %sp"@},
-@{address="0x000107c0",func-name="main",offset="4",
-inst="mov 2, %o0"@},
-@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@}]
-(@value{GDBP})
-@end smallexample
-
-Disassemble 3 instructions from the start of @code{main} in mixed mode:
-
-@smallexample
-(@value{GDBP})
--data-disassemble -f basics.c -l 32 -n 3 -- 1
-^done,asm_insns=[
-src_and_asm_line=@{line="31",
-file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
- testsuite/gdb.mi/basics.c",line_asm_insn=[
-@{address="0x000107bc",func-name="main",offset="0",
-inst="save %sp, -112, %sp"@}]@},
-src_and_asm_line=@{line="32",
-file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
- testsuite/gdb.mi/basics.c",line_asm_insn=[
-@{address="0x000107c0",func-name="main",offset="4",
-inst="mov 2, %o0"@},
-@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@}]@}]
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-data-evaluate-expression} Command
-@findex -data-evaluate-expression
-
-@subsubheading Synopsis
-
-@example
- -data-evaluate-expression @var{expr}
-@end example
-
-Evaluate @var{expr} as an expression. The expression could contain an
-inferior function call. The function call will execute synchronously.
-If the expression contains spaces, it must be enclosed in double quotes.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} commands are @samp{print}, @samp{output}, and
-@samp{call}. In @code{gdbtk} only, there's a corresponding
-@samp{gdb_eval} command.
-
-@subsubheading Example
-
-In the following example, the numbers that precede the commands are the
-@dfn{tokens} described in @ref{GDB/MI Command Syntax, ,@sc{gdb/mi}
-Command Syntax}. Notice how @sc{gdb/mi} returns the same tokens in its
-output.
-
-@smallexample
-211-data-evaluate-expression A
-211^done,value="1"
-(@value{GDBP})
-311-data-evaluate-expression &A
-311^done,value="0xefffeb7c"
-(@value{GDBP})
-411-data-evaluate-expression A+3
-411^done,value="4"
-(@value{GDBP})
-511-data-evaluate-expression "A + 3"
-511^done,value="4"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-data-list-changed-registers} Command
-@findex -data-list-changed-registers
-
-@subsubheading Synopsis
-
-@example
- -data-list-changed-registers
-@end example
-
-Display a list of the registers that have changed.
-
-@subsubheading @value{GDBN} Command
-
-@value{GDBN} doesn't have a direct analog for this command; @code{gdbtk}
-has the corresponding command @samp{gdb_changed_register_list}.
-
-@subsubheading Example
-
-On a PPC MBX board:
-
-@smallexample
-(@value{GDBP})
--exec-continue
-^running
-
-(@value{GDBP})
-*stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
-args=[],file="try.c",line="5"@}
-(@value{GDBP})
--data-list-changed-registers
-^done,changed-registers=["0","1","2","4","5","6","7","8","9",
-"10","11","13","14","15","16","17","18","19","20","21","22","23",
-"24","25","26","27","28","30","31","64","65","66","67","69"]
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-data-list-register-names} Command
-@findex -data-list-register-names
-
-@subsubheading Synopsis
-
-@example
- -data-list-register-names [ ( @var{regno} )+ ]
-@end example
-
-Show a list of register names for the current target. If no arguments
-are given, it shows a list of the names of all the registers. If
-integer numbers are given as arguments, it will print a list of the
-names of the registers corresponding to the arguments. To ensure
-consistency between a register name and its number, the output list may
-include empty register names.
-
-@subsubheading @value{GDBN} Command
-
-@value{GDBN} does not have a command which corresponds to
-@samp{-data-list-register-names}. In @code{gdbtk} there is a
-corresponding command @samp{gdb_regnames}.
-
-@subsubheading Example
-
-For the PPC MBX board:
-@smallexample
-(@value{GDBP})
--data-list-register-names
-^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7",
-"r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
-"r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
-"r30","r31","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","ps","cr","lr","ctr","xer"]
-(@value{GDBP})
--data-list-register-names 1 2 3
-^done,register-names=["r1","r2","r3"]
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-data-list-register-values} Command
-@findex -data-list-register-values
-
-@subsubheading Synopsis
-
-@example
- -data-list-register-values @var{fmt} [ ( @var{regno} )*]
-@end example
-
-Display the registers' contents. @var{fmt} is the format according to
-which the registers' contents are to be returned, followed by an optional
-list of numbers specifying the registers to display. A missing list of
-numbers indicates that the contents of all the registers must be returned.
-
-Allowed formats for @var{fmt} are:
-
-@table @code
-@item x
-Hexadecimal
-@item o
-Octal
-@item t
-Binary
-@item d
-Decimal
-@item r
-Raw
-@item N
-Natural
-@end table
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} commands are @samp{info reg}, @samp{info
-all-reg}, and (in @code{gdbtk}) @samp{gdb_fetch_registers}.
-
-@subsubheading Example
-
-For a PPC MBX board (note: line breaks are for readability only, they
-don't appear in the actual output):
-
-@smallexample
-(@value{GDBP})
--data-list-register-values r 64 65
-^done,register-values=[@{number="64",value="0xfe00a300"@},
-@{number="65",value="0x00029002"@}]
-(@value{GDBP})
--data-list-register-values x
-^done,register-values=[@{number="0",value="0xfe0043c8"@},
-@{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@},
-@{number="3",value="0x0"@},@{number="4",value="0xa"@},
-@{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@},
-@{number="7",value="0xfe011e98"@},@{number="8",value="0x2"@},
-@{number="9",value="0xfa202820"@},@{number="10",value="0xfa202808"@},
-@{number="11",value="0x1"@},@{number="12",value="0x0"@},
-@{number="13",value="0x4544"@},@{number="14",value="0xffdfffff"@},
-@{number="15",value="0xffffffff"@},@{number="16",value="0xfffffeff"@},
-@{number="17",value="0xefffffed"@},@{number="18",value="0xfffffffe"@},
-@{number="19",value="0xffffffff"@},@{number="20",value="0xffffffff"@},
-@{number="21",value="0xffffffff"@},@{number="22",value="0xfffffff7"@},
-@{number="23",value="0xffffffff"@},@{number="24",value="0xffffffff"@},
-@{number="25",value="0xffffffff"@},@{number="26",value="0xfffffffb"@},
-@{number="27",value="0xffffffff"@},@{number="28",value="0xf7bfffff"@},
-@{number="29",value="0x0"@},@{number="30",value="0xfe010000"@},
-@{number="31",value="0x0"@},@{number="32",value="0x0"@},
-@{number="33",value="0x0"@},@{number="34",value="0x0"@},
-@{number="35",value="0x0"@},@{number="36",value="0x0"@},
-@{number="37",value="0x0"@},@{number="38",value="0x0"@},
-@{number="39",value="0x0"@},@{number="40",value="0x0"@},
-@{number="41",value="0x0"@},@{number="42",value="0x0"@},
-@{number="43",value="0x0"@},@{number="44",value="0x0"@},
-@{number="45",value="0x0"@},@{number="46",value="0x0"@},
-@{number="47",value="0x0"@},@{number="48",value="0x0"@},
-@{number="49",value="0x0"@},@{number="50",value="0x0"@},
-@{number="51",value="0x0"@},@{number="52",value="0x0"@},
-@{number="53",value="0x0"@},@{number="54",value="0x0"@},
-@{number="55",value="0x0"@},@{number="56",value="0x0"@},
-@{number="57",value="0x0"@},@{number="58",value="0x0"@},
-@{number="59",value="0x0"@},@{number="60",value="0x0"@},
-@{number="61",value="0x0"@},@{number="62",value="0x0"@},
-@{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@},
-@{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@},
-@{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@},
-@{number="69",value="0x20002b03"@}]
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-data-read-memory} Command
-@findex -data-read-memory
-
-@subsubheading Synopsis
-
-@example
- -data-read-memory [ -o @var{byte-offset} ]
- @var{address} @var{word-format} @var{word-size}
- @var{nr-rows} @var{nr-cols} [ @var{aschar} ]
-@end example
-
-@noindent
-where:
-
-@table @samp
-@item @var{address}
-An expression specifying the address of the first memory word to be
-read. Complex expressions containing embedded white space should be
-quoted using the C convention.
-
-@item @var{word-format}
-The format to be used to print the memory words. The notation is the
-same as for @value{GDBN}'s @code{print} command (@pxref{Output Formats,
-,Output formats}).
-
-@item @var{word-size}
-The size of each memory word in bytes.
-
-@item @var{nr-rows}
-The number of rows in the output table.
-
-@item @var{nr-cols}
-The number of columns in the output table.
-
-@item @var{aschar}
-If present, indicates that each row should include an @sc{ascii} dump. The
-value of @var{aschar} is used as a padding character when a byte is not a
-member of the printable @sc{ascii} character set (printable @sc{ascii}
-characters are those whose code is between 32 and 126, inclusively).
-
-@item @var{byte-offset}
-An offset to add to the @var{address} before fetching memory.
-@end table
-
-This command displays memory contents as a table of @var{nr-rows} by
-@var{nr-cols} words, each word being @var{word-size} bytes. In total,
-@code{@var{nr-rows} * @var{nr-cols} * @var{word-size}} bytes are read
-(returned as @samp{total-bytes}). Should less than the requested number
-of bytes be returned by the target, the missing words are identified
-using @samp{N/A}. The number of bytes read from the target is returned
-in @samp{nr-bytes} and the starting address used to read memory in
-@samp{addr}.
-
-The address of the next/previous row or page is available in
-@samp{next-row} and @samp{prev-row}, @samp{next-page} and
-@samp{prev-page}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{x}. @code{gdbtk} has
-@samp{gdb_get_mem} memory read command.
-
-@subsubheading Example
-
-Read six bytes of memory starting at @code{bytes+6} but then offset by
-@code{-6} bytes. Format as three rows of two columns. One byte per
-word. Display each word in hex.
-
-@smallexample
-(@value{GDBP})
-9-data-read-memory -o -6 -- bytes+6 x 1 3 2
-9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
-next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
-prev-page="0x0000138a",memory=[
-@{addr="0x00001390",data=["0x00","0x01"]@},
-@{addr="0x00001392",data=["0x02","0x03"]@},
-@{addr="0x00001394",data=["0x04","0x05"]@}]
-(@value{GDBP})
-@end smallexample
-
-Read two bytes of memory starting at address @code{shorts + 64} and
-display as a single word formatted in decimal.
-
-@smallexample
-(@value{GDBP})
-5-data-read-memory shorts+64 d 2 1 1
-5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
-next-row="0x00001512",prev-row="0x0000150e",
-next-page="0x00001512",prev-page="0x0000150e",memory=[
-@{addr="0x00001510",data=["128"]@}]
-(@value{GDBP})
-@end smallexample
-
-Read thirty two bytes of memory starting at @code{bytes+16} and format
-as eight rows of four columns. Include a string encoding with @samp{x}
-used as the non-printable character.
-
-@smallexample
-(@value{GDBP})
-4-data-read-memory bytes+16 x 1 8 4 x
-4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
-next-row="0x000013c0",prev-row="0x0000139c",
-next-page="0x000013c0",prev-page="0x00001380",memory=[
-@{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"@},
-@{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"@},
-@{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"@},
-@{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"@},
-@{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"@},
-@{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@},
-@{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@},
-@{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}]
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-display-delete} Command
-@findex -display-delete
-
-@subsubheading Synopsis
-
-@example
- -display-delete @var{number}
-@end example
-
-Delete the display @var{number}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{delete display}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-display-disable} Command
-@findex -display-disable
-
-@subsubheading Synopsis
-
-@example
- -display-disable @var{number}
-@end example
-
-Disable display @var{number}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{disable display}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-display-enable} Command
-@findex -display-enable
-
-@subsubheading Synopsis
-
-@example
- -display-enable @var{number}
-@end example
-
-Enable display @var{number}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{enable display}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-display-insert} Command
-@findex -display-insert
-
-@subsubheading Synopsis
-
-@example
- -display-insert @var{expression}
-@end example
-
-Display @var{expression} every time the program stops.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{display}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-display-list} Command
-@findex -display-list
-
-@subsubheading Synopsis
-
-@example
- -display-list
-@end example
-
-List the displays. Do not show the current values.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info display}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-environment-cd} Command
-@findex -environment-cd
-
-@subsubheading Synopsis
-
-@example
- -environment-cd @var{pathdir}
-@end example
-
-Set @value{GDBN}'s working directory.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{cd}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
-^done
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-environment-directory} Command
-@findex -environment-directory
-
-@subsubheading Synopsis
-
-@example
- -environment-directory [ -r ] [ @var{pathdir} ]+
-@end example
-
-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
-@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 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
-character must not be used
-in any directory name.
-If no directories are specified, the current search path is displayed.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{dir}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
-^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"
-(@value{GDBP})
--environment-directory ""
-^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"
-(@value{GDBP})
--environment-directory -r /home/jjohnstn/src/gdb /usr/src
-^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd"
-(@value{GDBP})
--environment-directory -r
-^done,source-path="$cdir:$cwd"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-environment-path} Command
-@findex -environment-path
-
-@subsubheading Synopsis
-
-@example
- -environment-path [ -r ] [ @var{pathdir} ]+
-@end example
-
-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
-@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 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
-character must not be used
-in any directory name.
-If no directories are specified, the current path is displayed.
-
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{path}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--environment-path
-^done,path="/usr/bin"
-(@value{GDBP})
--environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin
-^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin"
-(@value{GDBP})
--environment-path -r /usr/local/bin
-^done,path="/usr/local/bin:/usr/bin"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-environment-pwd} Command
-@findex -environment-pwd
-
-@subsubheading Synopsis
-
-@example
- -environment-pwd
-@end example
-
-Show the current working directory.
-
-@subsubheading @value{GDBN} command
-
-The corresponding @value{GDBN} command is @samp{pwd}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--environment-pwd
-^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb"
-(@value{GDBP})
-@end smallexample
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Program Control
-@section @sc{gdb/mi} Program control
-
-@subsubheading Program termination
-
-As a result of execution, the inferior program can run to completion, if
-it doesn't encounter any breakpoints. In this case the output will
-include an exit code, if the program has exited exceptionally.
-
-@subsubheading Examples
-
-@noindent
-Program exited normally:
-
-@smallexample
-(@value{GDBP})
--exec-run
-^running
-(@value{GDBP})
-x = 55
-*stopped,reason="exited-normally"
-(@value{GDBP})
-@end smallexample
-
-@noindent
-Program exited exceptionally:
-
-@smallexample
-(@value{GDBP})
--exec-run
-^running
-(@value{GDBP})
-x = 55
-*stopped,reason="exited",exit-code="01"
-(@value{GDBP})
-@end smallexample
-
-Another way the program can terminate is if it receives a signal such as
-@code{SIGINT}. In this case, @sc{gdb/mi} displays this:
-
-@smallexample
-(@value{GDBP})
-*stopped,reason="exited-signalled",signal-name="SIGINT",
-signal-meaning="Interrupt"
-@end smallexample
-
-
-@subheading The @code{-exec-abort} Command
-@findex -exec-abort
-
-@subsubheading Synopsis
-
-@example
- -exec-abort
-@end example
-
-Kill the inferior running program.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{kill}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-exec-arguments} Command
-@findex -exec-arguments
-
-@subsubheading Synopsis
-
-@example
- -exec-arguments @var{args}
-@end example
-
-Set the inferior program arguments, to be used in the next
-@samp{-exec-run}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{set args}.
-
-@subsubheading Example
-
-@c FIXME!
-Don't have one around.
-
-
-@subheading The @code{-exec-continue} Command
-@findex -exec-continue
-
-@subsubheading Synopsis
-
-@example
- -exec-continue
-@end example
-
-Asynchronous command. Resumes the execution of the inferior program
-until a breakpoint is encountered, or until the inferior exits.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} corresponding is @samp{continue}.
-
-@subsubheading Example
-
-@smallexample
--exec-continue
-^running
-(@value{GDBP})
-@@Hello world
-*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=[],
-file="hello.c",line="13"@}
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-finish} Command
-@findex -exec-finish
-
-@subsubheading Synopsis
-
-@example
- -exec-finish
-@end example
-
-Asynchronous command. Resumes the execution of the inferior program
-until the current function is exited. Displays the results returned by
-the function.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{finish}.
-
-@subsubheading Example
-
-Function returning @code{void}.
-
-@smallexample
--exec-finish
-^running
-(@value{GDBP})
-@@hello from foo
-*stopped,reason="function-finished",frame=@{func="main",args=[],
-file="hello.c",line="7"@}
-(@value{GDBP})
-@end smallexample
-
-Function returning other than @code{void}. The name of the internal
-@value{GDBN} variable storing the result is printed, together with the
-value itself.
-
-@smallexample
--exec-finish
-^running
-(@value{GDBP})
-*stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo",
-args=[@{name="a",value="1"],@{name="b",value="9"@}@},
-file="recursive2.c",line="14"@},
-gdb-result-var="$1",return-value="0"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-interrupt} Command
-@findex -exec-interrupt
-
-@subsubheading Synopsis
-
-@example
- -exec-interrupt
-@end example
-
-Asynchronous command. Interrupts the background execution of the target.
-Note how the token associated with the stop message is the one for the
-execution command that has been interrupted. The token for the interrupt
-itself only appears in the @samp{^done} output. If the user is trying to
-interrupt a non-running program, an error message will be printed.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{interrupt}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
-111-exec-continue
-111^running
-
-(@value{GDBP})
-222-exec-interrupt
-222^done
-(@value{GDBP})
-111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
-frame=@{addr="0x00010140",func="foo",args=[],file="try.c",line="13"@}
-(@value{GDBP})
-
-(@value{GDBP})
--exec-interrupt
-^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-next} Command
-@findex -exec-next
-
-@subsubheading Synopsis
-
-@example
- -exec-next
-@end example
-
-Asynchronous command. Resumes execution of the inferior program, stopping
-when the beginning of the next source line is reached.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{next}.
-
-@subsubheading Example
-
-@smallexample
--exec-next
-^running
-(@value{GDBP})
-*stopped,reason="end-stepping-range",line="8",file="hello.c"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-next-instruction} Command
-@findex -exec-next-instruction
-
-@subsubheading Synopsis
-
-@example
- -exec-next-instruction
-@end example
-
-Asynchronous command. Executes one machine instruction. If the
-instruction is a function call continues until the function returns. If
-the program stops at an instruction in the middle of a source line, the
-address will be printed as well.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{nexti}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--exec-next-instruction
-^running
-
-(@value{GDBP})
-*stopped,reason="end-stepping-range",
-addr="0x000100d4",line="5",file="hello.c"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-return} Command
-@findex -exec-return
-
-@subsubheading Synopsis
-
-@example
- -exec-return
-@end example
-
-Makes current function return immediately. Doesn't execute the inferior.
-Displays the new current frame.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{return}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
-200-break-insert callee4
-200^done,bkpt=@{number="1",addr="0x00010734",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
-(@value{GDBP})
-000-exec-run
-000^running
-(@value{GDBP})
-000*stopped,reason="breakpoint-hit",bkptno="1",
-frame=@{func="callee4",args=[],
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
-(@value{GDBP})
-205-break-delete
-205^done
-(@value{GDBP})
-111-exec-return
-111^done,frame=@{level="0",func="callee3",
-args=[@{name="strarg",
-value="0x11940 \"A string argument.\""@}],
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-run} Command
-@findex -exec-run
-
-@subsubheading Synopsis
-
-@example
- -exec-run
-@end example
-
-Asynchronous command. Starts execution of the inferior from the
-beginning. The inferior executes until either a breakpoint is
-encountered or the program exits.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{run}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--break-insert main
-^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
-(@value{GDBP})
--exec-run
-^running
-(@value{GDBP})
-*stopped,reason="breakpoint-hit",bkptno="1",
-frame=@{func="main",args=[],file="recursive2.c",line="4"@}
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-show-arguments} Command
-@findex -exec-show-arguments
-
-@subsubheading Synopsis
-
-@example
- -exec-show-arguments
-@end example
-
-Print the arguments of the program.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{show args}.
-
-@subsubheading Example
-N.A.
-
-@c @subheading -exec-signal
-
-@subheading The @code{-exec-step} Command
-@findex -exec-step
-
-@subsubheading Synopsis
-
-@example
- -exec-step
-@end example
-
-Asynchronous command. Resumes execution of the inferior program, stopping
-when the beginning of the next source line is reached, if the next
-source line is not a function call. If it is, stop at the first
-instruction of the called function.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{step}.
-
-@subsubheading Example
-
-Stepping into a function:
-
-@smallexample
--exec-step
-^running
-(@value{GDBP})
-*stopped,reason="end-stepping-range",
-frame=@{func="foo",args=[@{name="a",value="10"@},
-@{name="b",value="0"@}],file="recursive2.c",line="11"@}
-(@value{GDBP})
-@end smallexample
-
-Regular stepping:
-
-@smallexample
--exec-step
-^running
-(@value{GDBP})
-*stopped,reason="end-stepping-range",line="14",file="recursive2.c"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-step-instruction} Command
-@findex -exec-step-instruction
-
-@subsubheading Synopsis
-
-@example
- -exec-step-instruction
-@end example
-
-Asynchronous command. Resumes the inferior which executes one machine
-instruction. The output, once @value{GDBN} has stopped, will vary depending on
-whether we have stopped in the middle of a source line or not. In the
-former case, the address at which the program stopped will be printed as
-well.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{stepi}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--exec-step-instruction
-^running
-
-(@value{GDBP})
-*stopped,reason="end-stepping-range",
-frame=@{func="foo",args=[],file="try.c",line="10"@}
-(@value{GDBP})
--exec-step-instruction
-^running
-
-(@value{GDBP})
-*stopped,reason="end-stepping-range",
-frame=@{addr="0x000100f4",func="foo",args=[],file="try.c",line="10"@}
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-exec-until} Command
-@findex -exec-until
-
-@subsubheading Synopsis
-
-@example
- -exec-until [ @var{location} ]
-@end example
-
-Asynchronous command. Executes the inferior until the @var{location}
-specified in the argument is reached. If there is no argument, the inferior
-executes until a source line greater than the current one is reached.
-The reason for stopping in this case will be @samp{location-reached}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{until}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--exec-until recursive2.c:6
-^running
-(@value{GDBP})
-x = 55
-*stopped,reason="location-reached",frame=@{func="main",args=[],
-file="recursive2.c",line="6"@}
-(@value{GDBP})
-@end smallexample
-
-@ignore
-@subheading -file-clear
-Is this going away????
-@end ignore
-
-
-@subheading The @code{-file-exec-and-symbols} Command
-@findex -file-exec-and-symbols
-
-@subsubheading Synopsis
-
-@example
- -file-exec-and-symbols @var{file}
-@end example
-
-Specify the executable file to be debugged. This file is the one from
-which the symbol table is also read. If no file is specified, the
-command clears the executable and symbol information. If breakpoints
-are set when using this command with no arguments, @value{GDBN} will produce
-error messages. Otherwise, no output is produced, except a completion
-notification.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{file}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
-^done
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-file-exec-file} Command
-@findex -file-exec-file
-
-@subsubheading Synopsis
-
-@example
- -file-exec-file @var{file}
-@end example
-
-Specify the executable file to be debugged. Unlike
-@samp{-file-exec-and-symbols}, the symbol table is @emph{not} read
-from this file. If used without argument, @value{GDBN} clears the information
-about the executable file. No output is produced, except a completion
-notification.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{exec-file}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
-^done
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-file-list-exec-sections} Command
-@findex -file-list-exec-sections
-
-@subsubheading Synopsis
-
-@example
- -file-list-exec-sections
-@end example
-
-List the sections of the current executable file.
-
-@subsubheading @value{GDBN} Command
-
-The @value{GDBN} command @samp{info file} shows, among the rest, the same
-information as this command. @code{gdbtk} has a corresponding command
-@samp{gdb_load_info}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-file-list-exec-source-files} Command
-@findex -file-list-exec-source-files
-
-@subsubheading Synopsis
-
-@example
- -file-list-exec-source-files
-@end example
-
-List the source files for the current executable.
-
-@subsubheading @value{GDBN} Command
-
-There's no @value{GDBN} command which directly corresponds to this one.
-@code{gdbtk} has an analogous command @samp{gdb_listfiles}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-file-list-shared-libraries} Command
-@findex -file-list-shared-libraries
-
-@subsubheading Synopsis
-
-@example
- -file-list-shared-libraries
-@end example
-
-List the shared libraries in the program.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info shared}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-file-list-symbol-files} Command
-@findex -file-list-symbol-files
-
-@subsubheading Synopsis
-
-@example
- -file-list-symbol-files
-@end example
-
-List symbol files.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info file} (part of it).
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-file-symbol-file} Command
-@findex -file-symbol-file
-
-@subsubheading Synopsis
-
-@example
- -file-symbol-file @var{file}
-@end example
-
-Read symbol table info from the specified @var{file} argument. When
-used without arguments, clears @value{GDBN}'s symbol table info. No output is
-produced, except for a completion notification.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{symbol-file}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
-^done
-(@value{GDBP})
-@end smallexample
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Miscellaneous Commands
-@section Miscellaneous @value{GDBN} commands in @sc{gdb/mi}
-
-@c @subheading -gdb-complete
-
-@subheading The @code{-gdb-exit} Command
-@findex -gdb-exit
-
-@subsubheading Synopsis
-
-@example
- -gdb-exit
-@end example
-
-Exit @value{GDBN} immediately.
-
-@subsubheading @value{GDBN} Command
-
-Approximately corresponds to @samp{quit}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--gdb-exit
-@end smallexample
-
-@subheading The @code{-gdb-set} Command
-@findex -gdb-set
-
-@subsubheading Synopsis
-
-@example
- -gdb-set
-@end example
-
-Set an internal @value{GDBN} variable.
-@c IS THIS A DOLLAR VARIABLE? OR SOMETHING LIKE ANNOTATE ?????
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{set}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--gdb-set $foo=3
-^done
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-gdb-show} Command
-@findex -gdb-show
-
-@subsubheading Synopsis
-
-@example
- -gdb-show
-@end example
-
-Show the current value of a @value{GDBN} variable.
-
-@subsubheading @value{GDBN} command
-
-The corresponding @value{GDBN} command is @samp{show}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--gdb-show annotate
-^done,value="0"
-(@value{GDBP})
-@end smallexample
-
-@c @subheading -gdb-source
-
-
-@subheading The @code{-gdb-version} Command
-@findex -gdb-version
-
-@subsubheading Synopsis
-
-@example
- -gdb-version
-@end example
-
-Show version information for @value{GDBN}. Used mostly in testing.
-
-@subsubheading @value{GDBN} Command
-
-There's no equivalent @value{GDBN} command. @value{GDBN} by default shows this
-information when you start an interactive session.
-
-@subsubheading Example
-
-@c This example modifies the actual output from GDB to avoid overfull
-@c box in TeX.
-@smallexample
-(@value{GDBP})
--gdb-version
-~GNU gdb 5.2.1
-~Copyright 2000 Free Software Foundation, Inc.
-~GDB is free software, covered by the GNU General Public License, and
-~you are welcome to change it and/or distribute copies of it under
-~ certain conditions.
-~Type "show copying" to see the conditions.
-~There is absolutely no warranty for GDB. Type "show warranty" for
-~ details.
-~This GDB was configured as
- "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
-^done
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-interpreter-exec} Command
-@findex -interpreter-exec
-
-@subheading Synopsis
-
-@smallexample
--interpreter-exec @var{interpreter} @var{command}
-@end smallexample
-
-Execute the specified @var{command} in the given @var{interpreter}.
-
-@subheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{interpreter-exec}.
-
-@subheading Example
-
-@smallexample
-(@value{GDBP})
--interpreter-exec console "break main"
-&"During symbol reading, couldn't parse type; debugger out of date?.\n"
-&"During symbol reading, bad structure-type format.\n"
-~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
-^done
-(@value{GDBP})
-@end smallexample
-
-@ignore
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Kod Commands
-@section @sc{gdb/mi} Kod Commands
-
-The Kod commands are not implemented.
-
-@c @subheading -kod-info
-
-@c @subheading -kod-list
-
-@c @subheading -kod-list-object-types
-
-@c @subheading -kod-show
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Memory Overlay Commands
-@section @sc{gdb/mi} Memory Overlay Commands
-
-The memory overlay commands are not implemented.
-
-@c @subheading -overlay-auto
-
-@c @subheading -overlay-list-mapping-state
-
-@c @subheading -overlay-list-overlays
-
-@c @subheading -overlay-map
-
-@c @subheading -overlay-off
-
-@c @subheading -overlay-on
-
-@c @subheading -overlay-unmap
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Signal Handling Commands
-@section @sc{gdb/mi} Signal Handling Commands
-
-Signal handling commands are not implemented.
-
-@c @subheading -signal-handle
-
-@c @subheading -signal-list-handle-actions
-
-@c @subheading -signal-list-signal-types
-@end ignore
-
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Stack Manipulation
-@section @sc{gdb/mi} Stack Manipulation Commands
-
-
-@subheading The @code{-stack-info-frame} Command
-@findex -stack-info-frame
-
-@subsubheading Synopsis
-
-@example
- -stack-info-frame
-@end example
-
-Get info on the current frame.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame}
-(without arguments).
-
-@subsubheading Example
-N.A.
-
-@subheading The @code{-stack-info-depth} Command
-@findex -stack-info-depth
-
-@subsubheading Synopsis
-
-@example
- -stack-info-depth [ @var{max-depth} ]
-@end example
-
-Return the depth of the stack. If the integer argument @var{max-depth}
-is specified, do not count beyond @var{max-depth} frames.
-
-@subsubheading @value{GDBN} Command
-
-There's no equivalent @value{GDBN} command.
-
-@subsubheading Example
-
-For a stack with frame levels 0 through 11:
-
-@smallexample
-(@value{GDBP})
--stack-info-depth
-^done,depth="12"
-(@value{GDBP})
--stack-info-depth 4
-^done,depth="4"
-(@value{GDBP})
--stack-info-depth 12
-^done,depth="12"
-(@value{GDBP})
--stack-info-depth 11
-^done,depth="11"
-(@value{GDBP})
--stack-info-depth 13
-^done,depth="12"
-(@value{GDBP})
-@end smallexample
-
-@subheading The @code{-stack-list-arguments} Command
-@findex -stack-list-arguments
-
-@subsubheading Synopsis
-
-@example
- -stack-list-arguments @var{show-values}
- [ @var{low-frame} @var{high-frame} ]
-@end example
-
-Display a list of the arguments for the frames between @var{low-frame}
-and @var{high-frame} (inclusive). If @var{low-frame} and
-@var{high-frame} are not provided, list the arguments for the whole call
-stack.
-
-The @var{show-values} argument must have a value of 0 or 1. A value of
-0 means that only the names of the arguments are listed, a value of 1
-means that both names and values of the arguments are printed.
-
-@subsubheading @value{GDBN} Command
-
-@value{GDBN} does not have an equivalent command. @code{gdbtk} has a
-@samp{gdb_get_args} command which partially overlaps with the
-functionality of @samp{-stack-list-arguments}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--stack-list-frames
-^done,
-stack=[
-frame=@{level="0",addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
-frame=@{level="1",addr="0x0001076c",func="callee3",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="17"@},
-frame=@{level="2",addr="0x0001078c",func="callee2",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@},
-frame=@{level="3",addr="0x000107b4",func="callee1",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
-frame=@{level="4",addr="0x000107e0",func="main",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}]
-(@value{GDBP})
--stack-list-arguments 0
-^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=[]@}]
-(@value{GDBP})
--stack-list-arguments 1
-^done,
-stack-args=[
-frame=@{level="0",args=[]@},
-frame=@{level="1",
- args=[@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
-frame=@{level="2",args=[
-@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
-@{frame=@{level="3",args=[
-@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@},
-@{name="fltarg",value="3.5"@}]@},
-frame=@{level="4",args=[]@}]
-(@value{GDBP})
--stack-list-arguments 0 2 2
-^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}]
-(@value{GDBP})
--stack-list-arguments 1 2 2
-^done,stack-args=[frame=@{level="2",
-args=[@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}]@}]
-(@value{GDBP})
-@end smallexample
-
-@c @subheading -stack-list-exception-handlers
-
-
-@subheading The @code{-stack-list-frames} Command
-@findex -stack-list-frames
-
-@subsubheading Synopsis
-
-@example
- -stack-list-frames [ @var{low-frame} @var{high-frame} ]
-@end example
-
-List the frames currently on the stack. For each frame it displays the
-following info:
-
-@table @samp
-@item @var{level}
-The frame number, 0 being the topmost frame, i.e. the innermost function.
-@item @var{addr}
-The @code{$pc} value for that frame.
-@item @var{func}
-Function name.
-@item @var{file}
-File name of the source file where the function lives.
-@item @var{line}
-Line number corresponding to the @code{$pc}.
-@end table
-
-If invoked without arguments, this command prints a backtrace for the
-whole stack. If given two integer arguments, it shows the frames whose
-levels are between the two arguments (inclusive). If the two arguments
-are equal, it shows the single frame at the corresponding level.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} commands are @samp{backtrace} and @samp{where}.
-
-@subsubheading Example
-
-Full stack backtrace:
-
-@smallexample
-(@value{GDBP})
--stack-list-frames
-^done,stack=
-[frame=@{level="0",addr="0x0001076c",func="foo",
- file="recursive2.c",line="11"@},
-frame=@{level="1",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="2",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="3",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="4",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="5",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="6",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="7",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="8",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="9",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="10",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="11",addr="0x00010738",func="main",
- file="recursive2.c",line="4"@}]
-(@value{GDBP})
-@end smallexample
-
-Show frames between @var{low_frame} and @var{high_frame}:
-
-@smallexample
-(@value{GDBP})
--stack-list-frames 3 5
-^done,stack=
-[frame=@{level="3",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="4",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@},
-frame=@{level="5",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@}]
-(@value{GDBP})
-@end smallexample
-
-Show a single frame:
-
-@smallexample
-(@value{GDBP})
--stack-list-frames 3 3
-^done,stack=
-[frame=@{level="3",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@}]
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-stack-list-locals} Command
-@findex -stack-list-locals
-
-@subsubheading Synopsis
-
-@example
- -stack-list-locals @var{print-values}
-@end example
-
-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.
-
-@subsubheading @value{GDBN} Command
-
-@samp{info locals} in @value{GDBN}, @samp{gdb_get_locals} in @code{gdbtk}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--stack-list-locals 0
-^done,locals=[name="A",name="B",name="C"]
-(@value{GDBP})
--stack-list-locals 1
-^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
- @{name="C",value="3"@}]
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-stack-select-frame} Command
-@findex -stack-select-frame
-
-@subsubheading Synopsis
-
-@example
- -stack-select-frame @var{framenum}
-@end example
-
-Change the current frame. Select a different frame @var{framenum} on
-the stack.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} commands are @samp{frame}, @samp{up},
-@samp{down}, @samp{select-frame}, @samp{up-silent}, and @samp{down-silent}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--stack-select-frame 2
-^done
-(@value{GDBP})
-@end smallexample
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Symbol Query
-@section @sc{gdb/mi} Symbol Query Commands
-
-
-@subheading The @code{-symbol-info-address} Command
-@findex -symbol-info-address
-
-@subsubheading Synopsis
-
-@example
- -symbol-info-address @var{symbol}
-@end example
-
-Describe where @var{symbol} is stored.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info address}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-file} Command
-@findex -symbol-info-file
-
-@subsubheading Synopsis
-
-@example
- -symbol-info-file
-@end example
-
-Show the file for the symbol.
-
-@subsubheading @value{GDBN} Command
-
-There's no equivalent @value{GDBN} command. @code{gdbtk} has
-@samp{gdb_find_file}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-function} Command
-@findex -symbol-info-function
-
-@subsubheading Synopsis
-
-@example
- -symbol-info-function
-@end example
-
-Show which function the symbol lives in.
-
-@subsubheading @value{GDBN} Command
-
-@samp{gdb_get_function} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-line} Command
-@findex -symbol-info-line
-
-@subsubheading Synopsis
-
-@example
- -symbol-info-line
-@end example
-
-Show the core addresses of the code for a source line.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} comamnd is @samp{info line}.
-@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-info-symbol} Command
-@findex -symbol-info-symbol
-
-@subsubheading Synopsis
-
-@example
- -symbol-info-symbol @var{addr}
-@end example
-
-Describe what symbol is at location @var{addr}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{info symbol}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-list-functions} Command
-@findex -symbol-list-functions
-
-@subsubheading Synopsis
-
-@example
- -symbol-list-functions
-@end example
-
-List the functions in the executable.
-
-@subsubheading @value{GDBN} Command
-
-@samp{info functions} in @value{GDBN}, @samp{gdb_listfunc} and
-@samp{gdb_search} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-list-types} Command
-@findex -symbol-list-types
-
-@subsubheading Synopsis
-
-@example
- -symbol-list-types
-@end example
-
-List all the type names.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding commands are @samp{info types} in @value{GDBN},
-@samp{gdb_search} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-list-variables} Command
-@findex -symbol-list-variables
-
-@subsubheading Synopsis
-
-@example
- -symbol-list-variables
-@end example
-
-List all the global and static variable names.
-
-@subsubheading @value{GDBN} Command
-
-@samp{info variables} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-locate} Command
-@findex -symbol-locate
-
-@subsubheading Synopsis
-
-@example
- -symbol-locate
-@end example
-
-@subsubheading @value{GDBN} Command
-
-@samp{gdb_loc} in @code{gdbtk}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-symbol-type} Command
-@findex -symbol-type
-
-@subsubheading Synopsis
-
-@example
- -symbol-type @var{variable}
-@end example
-
-Show type of @var{variable}.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{ptype}, @code{gdbtk} has
-@samp{gdb_obj_variable}.
-
-@subsubheading Example
-N.A.
-
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Target Manipulation
-@section @sc{gdb/mi} Target Manipulation Commands
-
-
-@subheading The @code{-target-attach} Command
-@findex -target-attach
-
-@subsubheading Synopsis
-
-@example
- -target-attach @var{pid} | @var{file}
-@end example
-
-Attach to a process @var{pid} or a file @var{file} outside of @value{GDBN}.
-
-@subsubheading @value{GDBN} command
-
-The corresponding @value{GDBN} command is @samp{attach}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-compare-sections} Command
-@findex -target-compare-sections
-
-@subsubheading Synopsis
-
-@example
- -target-compare-sections [ @var{section} ]
-@end example
-
-Compare data of section @var{section} on target to the exec file.
-Without the argument, all sections are compared.
-
-@subsubheading @value{GDBN} Command
-
-The @value{GDBN} equivalent is @samp{compare-sections}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-detach} Command
-@findex -target-detach
-
-@subsubheading Synopsis
-
-@example
- -target-detach
-@end example
-
-Disconnect from the remote target. There's no output.
-
-@subsubheading @value{GDBN} command
-
-The corresponding @value{GDBN} command is @samp{detach}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--target-detach
-^done
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-target-download} Command
-@findex -target-download
-
-@subsubheading Synopsis
-
-@example
- -target-download
-@end example
-
-Loads the executable onto the remote target.
-It prints out an update message every half second, which includes the fields:
-
-@table @samp
-@item section
-The name of the section.
-@item section-sent
-The size of what has been sent so far for that section.
-@item section-size
-The size of the section.
-@item total-sent
-The total size of what was sent so far (the current and the previous sections).
-@item total-size
-The size of the overall executable to download.
-@end table
-
-@noindent
-Each message is sent as status record (@pxref{GDB/MI Output Syntax, ,
-@sc{gdb/mi} Output Syntax}).
-
-In addition, it prints the name and size of the sections, as they are
-downloaded. These messages include the following fields:
-
-@table @samp
-@item section
-The name of the section.
-@item section-size
-The size of the section.
-@item total-size
-The size of the overall executable to download.
-@end table
-
-@noindent
-At the end, a summary is printed.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{load}.
-
-@subsubheading Example
-
-Note: each status message appears on a single line. Here the messages
-have been broken down so that they can fit onto a page.
-
-@smallexample
-(@value{GDBP})
--target-download
-+download,@{section=".text",section-size="6668",total-size="9880"@}
-+download,@{section=".text",section-sent="512",section-size="6668",
-total-sent="512",total-size="9880"@}
-+download,@{section=".text",section-sent="1024",section-size="6668",
-total-sent="1024",total-size="9880"@}
-+download,@{section=".text",section-sent="1536",section-size="6668",
-total-sent="1536",total-size="9880"@}
-+download,@{section=".text",section-sent="2048",section-size="6668",
-total-sent="2048",total-size="9880"@}
-+download,@{section=".text",section-sent="2560",section-size="6668",
-total-sent="2560",total-size="9880"@}
-+download,@{section=".text",section-sent="3072",section-size="6668",
-total-sent="3072",total-size="9880"@}
-+download,@{section=".text",section-sent="3584",section-size="6668",
-total-sent="3584",total-size="9880"@}
-+download,@{section=".text",section-sent="4096",section-size="6668",
-total-sent="4096",total-size="9880"@}
-+download,@{section=".text",section-sent="4608",section-size="6668",
-total-sent="4608",total-size="9880"@}
-+download,@{section=".text",section-sent="5120",section-size="6668",
-total-sent="5120",total-size="9880"@}
-+download,@{section=".text",section-sent="5632",section-size="6668",
-total-sent="5632",total-size="9880"@}
-+download,@{section=".text",section-sent="6144",section-size="6668",
-total-sent="6144",total-size="9880"@}
-+download,@{section=".text",section-sent="6656",section-size="6668",
-total-sent="6656",total-size="9880"@}
-+download,@{section=".init",section-size="28",total-size="9880"@}
-+download,@{section=".fini",section-size="28",total-size="9880"@}
-+download,@{section=".data",section-size="3156",total-size="9880"@}
-+download,@{section=".data",section-sent="512",section-size="3156",
-total-sent="7236",total-size="9880"@}
-+download,@{section=".data",section-sent="1024",section-size="3156",
-total-sent="7748",total-size="9880"@}
-+download,@{section=".data",section-sent="1536",section-size="3156",
-total-sent="8260",total-size="9880"@}
-+download,@{section=".data",section-sent="2048",section-size="3156",
-total-sent="8772",total-size="9880"@}
-+download,@{section=".data",section-sent="2560",section-size="3156",
-total-sent="9284",total-size="9880"@}
-+download,@{section=".data",section-sent="3072",section-size="3156",
-total-sent="9796",total-size="9880"@}
-^done,address="0x10004",load-size="9880",transfer-rate="6586",
-write-rate="429"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-target-exec-status} Command
-@findex -target-exec-status
-
-@subsubheading Synopsis
-
-@example
- -target-exec-status
-@end example
-
-Provide information on the state of the target (whether it is running or
-not, for instance).
-
-@subsubheading @value{GDBN} Command
-
-There's no equivalent @value{GDBN} command.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-list-available-targets} Command
-@findex -target-list-available-targets
-
-@subsubheading Synopsis
-
-@example
- -target-list-available-targets
-@end example
-
-List the possible targets to connect to.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{help target}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-list-current-targets} Command
-@findex -target-list-current-targets
-
-@subsubheading Synopsis
-
-@example
- -target-list-current-targets
-@end example
-
-Describe the current target.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding information is printed by @samp{info file} (among
-other things).
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-list-parameters} Command
-@findex -target-list-parameters
-
-@subsubheading Synopsis
-
-@example
- -target-list-parameters
-@end example
-
-@c ????
-
-@subsubheading @value{GDBN} Command
-
-No equivalent.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-target-select} Command
-@findex -target-select
-
-@subsubheading Synopsis
-
-@example
- -target-select @var{type} @var{parameters @dots{}}
-@end example
-
-Connect @value{GDBN} to the remote target. This command takes two args:
-
-@table @samp
-@item @var{type}
-The type of target, for instance @samp{async}, @samp{remote}, etc.
-@item @var{parameters}
-Device names, host names and the like. @xref{Target Commands, ,
-Commands for managing targets}, for more details.
-@end table
-
-The output is a connection notification, followed by the address at
-which the target program is, in the following form:
-
-@smallexample
-^connected,addr="@var{address}",func="@var{function name}",
- args=[@var{arg list}]
-@end smallexample
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{target}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--target-select async /dev/ttya
-^connected,addr="0xfe00a300",func="??",args=[]
-(@value{GDBP})
-@end smallexample
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Thread Commands
-@section @sc{gdb/mi} Thread Commands
-
-
-@subheading The @code{-thread-info} Command
-@findex -thread-info
-
-@subsubheading Synopsis
-
-@example
- -thread-info
-@end example
-
-@subsubheading @value{GDBN} command
-
-No equivalent.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-thread-list-all-threads} Command
-@findex -thread-list-all-threads
-
-@subsubheading Synopsis
-
-@example
- -thread-list-all-threads
-@end example
-
-@subsubheading @value{GDBN} Command
-
-The equivalent @value{GDBN} command is @samp{info threads}.
-
-@subsubheading Example
-N.A.
-
-
-@subheading The @code{-thread-list-ids} Command
-@findex -thread-list-ids
-
-@subsubheading Synopsis
-
-@example
- -thread-list-ids
-@end example
-
-Produces a list of the currently known @value{GDBN} thread ids. At the
-end of the list it also prints the total number of such threads.
-
-@subsubheading @value{GDBN} Command
-
-Part of @samp{info threads} supplies the same information.
-
-@subsubheading Example
-
-No threads present, besides the main process:
-
-@smallexample
-(@value{GDBP})
--thread-list-ids
-^done,thread-ids=@{@},number-of-threads="0"
-(@value{GDBP})
-@end smallexample
-
-
-Several threads:
-
-@smallexample
-(@value{GDBP})
--thread-list-ids
-^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
-number-of-threads="3"
-(@value{GDBP})
-@end smallexample
-
-
-@subheading The @code{-thread-select} Command
-@findex -thread-select
-
-@subsubheading Synopsis
-
-@example
- -thread-select @var{threadnum}
-@end example
-
-Make @var{threadnum} the current thread. It prints the number of the new
-current thread, and the topmost frame for that thread.
-
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} command is @samp{thread}.
-
-@subsubheading Example
-
-@smallexample
-(@value{GDBP})
--exec-next
-^running
-(@value{GDBP})
-*stopped,reason="end-stepping-range",thread-id="2",line="187",
-file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"
-(@value{GDBP})
--thread-list-ids
-^done,
-thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
-number-of-threads="3"
-(@value{GDBP})
--thread-select 3
-^done,new-thread-id="3",
-frame=@{level="0",func="vprintf",
-args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
-@{name="arg",value="0x2"@}],file="vprintf.c",line="31"@}
-(@value{GDBP})
-@end smallexample
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Tracepoint Commands
-@section @sc{gdb/mi} Tracepoint Commands
-
-The tracepoint commands are not yet implemented.
-
-@c @subheading -trace-actions
-
-@c @subheading -trace-delete
-
-@c @subheading -trace-disable
-
-@c @subheading -trace-dump
-
-@c @subheading -trace-enable
-
-@c @subheading -trace-exists
-
-@c @subheading -trace-find
-
-@c @subheading -trace-frame-number
-
-@c @subheading -trace-info
-
-@c @subheading -trace-insert
-
-@c @subheading -trace-list
-
-@c @subheading -trace-pass-count
-
-@c @subheading -trace-save
-
-@c @subheading -trace-start
-
-@c @subheading -trace-stop
-
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Variable Objects
-@section @sc{gdb/mi} Variable Objects
-
-
-@subheading Motivation for Variable Objects in @sc{gdb/mi}
-
-For the implementation of a variable debugger window (locals, watched
-expressions, etc.), we are proposing the adaptation of the existing code
-used by @code{Insight}.
-
-The two main reasons for that are:
-
-@enumerate 1
-@item
-It has been proven in practice (it is already on its second generation).
-
-@item
-It will shorten development time (needless to say how important it is
-now).
-@end enumerate
-
-The original interface was designed to be used by Tcl code, so it was
-slightly changed so it could be used through @sc{gdb/mi}. This section
-describes the @sc{gdb/mi} operations that will be available and gives some
-hints about their use.
-
-@emph{Note}: In addition to the set of operations described here, we
-expect the @sc{gui} implementation of a variable window to require, at
-least, the following operations:
-
-@itemize @bullet
-@item @code{-gdb-show} @code{output-radix}
-@item @code{-stack-list-arguments}
-@item @code{-stack-list-locals}
-@item @code{-stack-select-frame}
-@end itemize
-
-@subheading Introduction to Variable Objects in @sc{gdb/mi}
-
-@cindex variable objects in @sc{gdb/mi}
-The basic idea behind variable objects is the creation of a named object
-to represent a variable, an expression, a memory location or even a CPU
-register. For each object created, a set of operations is available for
-examining or changing its properties.
-
-Furthermore, complex data types, such as C structures, are represented
-in a tree format. For instance, the @code{struct} type variable is the
-root and the children will represent the struct members. If a child
-is itself of a complex type, it will also have children of its own.
-Appropriate language differences are handled for C, C@t{++} and Java.
-
-When returning the actual values of the objects, this facility allows
-for the individual selection of the display format used in the result
-creation. It can be chosen among: binary, decimal, hexadecimal, octal
-and natural. Natural refers to a default format automatically
-chosen based on the variable type (like decimal for an @code{int}, hex
-for pointers, etc.).
-
-The following is the complete set of @sc{gdb/mi} operations defined to
-access this functionality:
-
-@multitable @columnfractions .4 .6
-@item @strong{Operation}
-@tab @strong{Description}
-
-@item @code{-var-create}
-@tab create a variable object
-@item @code{-var-delete}
-@tab delete the variable object and its children
-@item @code{-var-set-format}
-@tab set the display format of this variable
-@item @code{-var-show-format}
-@tab show the display format of this variable
-@item @code{-var-info-num-children}
-@tab tells how many children this object has
-@item @code{-var-list-children}
-@tab return a list of the object's children
-@item @code{-var-info-type}
-@tab show the type of this variable object
-@item @code{-var-info-expression}
-@tab print what this variable object represents
-@item @code{-var-show-attributes}
-@tab is this variable editable? does it exist here?
-@item @code{-var-evaluate-expression}
-@tab get the value of this variable
-@item @code{-var-assign}
-@tab set the value of this variable
-@item @code{-var-update}
-@tab update the variable and its children
-@end multitable
-
-In the next subsection we describe each operation in detail and suggest
-how it can be used.
-
-@subheading Description And Use of Operations on Variable Objects
-
-@subheading The @code{-var-create} Command
-@findex -var-create
-
-@subsubheading Synopsis
-
-@example
- -var-create @{@var{name} | "-"@}
- @{@var{frame-addr} | "*"@} @var{expression}
-@end example
-
-This operation creates a variable object, which allows the monitoring of
-a variable, the result of an expression, a memory cell or a CPU
-register.
-
-The @var{name} parameter is the string by which the object can be
-referenced. It must be unique. If @samp{-} is specified, the varobj
-system will generate a string ``varNNNNNN'' automatically. It will be
-unique provided that one does not specify @var{name} on that format.
-The command fails if a duplicate name is found.
-
-The frame under which the expression should be evaluated can be
-specified by @var{frame-addr}. A @samp{*} indicates that the current
-frame should be used.
-
-@var{expression} is any expression valid on the current language set (must not
-begin with a @samp{*}), or one of the following:
-
-@itemize @bullet
-@item
-@samp{*@var{addr}}, where @var{addr} is the address of a memory cell
-
-@item
-@samp{*@var{addr}-@var{addr}} --- a memory address range (TBD)
-
-@item
-@samp{$@var{regname}} --- a CPU register name
-@end itemize
-
-@subsubheading Result
-
-This operation returns the name, number of children and the type of the
-object created. Type is returned as a string as the ones generated by
-the @value{GDBN} CLI:
-
-@example
- name="@var{name}",numchild="N",type="@var{type}"
-@end example
-
-
-@subheading The @code{-var-delete} Command
-@findex -var-delete
-
-@subsubheading Synopsis
-
-@example
- -var-delete @var{name}
-@end example
-
-Deletes a previously created variable object and all of its children.
-
-Returns an error if the object @var{name} is not found.
-
-
-@subheading The @code{-var-set-format} Command
-@findex -var-set-format
-
-@subsubheading Synopsis
-
-@example
- -var-set-format @var{name} @var{format-spec}
-@end example
-
-Sets the output format for the value of the object @var{name} to be
-@var{format-spec}.
-
-The syntax for the @var{format-spec} is as follows:
-
-@example
- @var{format-spec} @expansion{}
- @{binary | decimal | hexadecimal | octal | natural@}
-@end example
-
-
-@subheading The @code{-var-show-format} Command
-@findex -var-show-format
-
-@subsubheading Synopsis
-
-@example
- -var-show-format @var{name}
-@end example
-
-Returns the format used to display the value of the object @var{name}.
-
-@example
- @var{format} @expansion{}
- @var{format-spec}
-@end example
-
-
-@subheading The @code{-var-info-num-children} Command
-@findex -var-info-num-children
-
-@subsubheading Synopsis
-
-@example
- -var-info-num-children @var{name}
-@end example
-
-Returns the number of children of a variable object @var{name}:
-
-@example
- numchild=@var{n}
-@end example
-
-
-@subheading The @code{-var-list-children} Command
-@findex -var-list-children
-
-@subsubheading Synopsis
-
-@example
- -var-list-children @var{name}
-@end example
-
-Returns a list of the children of the specified variable object:
-
-@example
- numchild=@var{n},children=[@{name=@var{name},
- numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
-@end example
-
-
-@subheading The @code{-var-info-type} Command
-@findex -var-info-type
-
-@subsubheading Synopsis
-
-@example
- -var-info-type @var{name}
-@end example
-
-Returns the type of the specified variable @var{name}. The type is
-returned as a string in the same format as it is output by the
-@value{GDBN} CLI:
-
-@example
- type=@var{typename}
-@end example
-
-
-@subheading The @code{-var-info-expression} Command
-@findex -var-info-expression
-
-@subsubheading Synopsis
-
-@example
- -var-info-expression @var{name}
-@end example
-
-Returns what is represented by the variable object @var{name}:
-
-@example
- lang=@var{lang-spec},exp=@var{expression}
-@end example
-
-@noindent
-where @var{lang-spec} is @code{@{"C" | "C++" | "Java"@}}.
-
-@subheading The @code{-var-show-attributes} Command
-@findex -var-show-attributes
-
-@subsubheading Synopsis
-
-@example
- -var-show-attributes @var{name}
-@end example
-
-List attributes of the specified variable object @var{name}:
-
-@example
- status=@var{attr} [ ( ,@var{attr} )* ]
-@end example
-
-@noindent
-where @var{attr} is @code{@{ @{ editable | noneditable @} | TBD @}}.
-
-@subheading The @code{-var-evaluate-expression} Command
-@findex -var-evaluate-expression
-
-@subsubheading Synopsis
-
-@example
- -var-evaluate-expression @var{name}
-@end example
-
-Evaluates the expression that is represented by the specified variable
-object and returns its value as a string in the current format specified
-for the object:
-
-@example
- value=@var{value}
-@end example
-
-Note that one must invoke @code{-var-list-children} for a variable
-before the value of a child variable can be evaluated.
-
-@subheading The @code{-var-assign} Command
-@findex -var-assign
-
-@subsubheading Synopsis
-
-@example
- -var-assign @var{name} @var{expression}
-@end example
-
-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
-subsequent @code{-var-update} list.
-
-@subsubheading Example
-
-@example
-(@value{GDBP})
--var-assign var1 3
-^done,value="3"
-(@value{GDBP})
--var-update *
-^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}]
-(@value{GDBP})
-@end example
-
-@subheading The @code{-var-update} Command
-@findex -var-update
-
-@subsubheading Synopsis
-
-@example
- -var-update @{@var{name} | "*"@}
-@end example
-
-Update the value of the variable object @var{name} by evaluating its
-expression after fetching all the new values from memory or registers.
-A @samp{*} causes all existing variable objects to be updated.
diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
new file mode 100644
index 00000000000..eb1d67a6a8d
--- /dev/null
+++ b/gdb/mi/mi-cmd-file.c
@@ -0,0 +1,67 @@
+/* MI Command Set - breakpoint and watchpoint commands.
+ Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Contributed by Cygnus Solutions (a Red Hat company).
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "mi-cmds.h"
+#include "mi-getopt.h"
+#include "ui-out.h"
+#include "symtab.h"
+#include "source.h"
+
+/* Return to the client the absolute path and line number of the
+ current file being executed. */
+
+enum mi_cmd_result
+mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc)
+{
+ struct symtab_and_line st;
+ int optind = 0;
+ char *optarg;
+
+ if ( !mi_valid_noargs("mi_cmd_file_list_exec_source_file", argc, argv) )
+ error ("mi_cmd_file_list_exec_source_file: Usage: No args");
+
+
+ /* Set the default file and line, also get them */
+ set_default_source_symtab_and_line();
+ st = get_current_source_symtab_and_line();
+
+ /* We should always get a symtab.
+ Apparently, filename does not need to be tested for NULL.
+ The documentation in symtab.h suggests it will always be correct */
+ if (!st.symtab)
+ error ("mi_cmd_file_list_exec_source_file: No symtab");
+
+ /* Extract the fullname if it is not known yet */
+ if (st.symtab->fullname == NULL)
+ symtab_to_filename (st.symtab);
+
+ /* We may not be able to open the file (not available). */
+ if (st.symtab->fullname == NULL)
+ error ("mi_cmd_file_list_exec_source_file: File not found");
+
+ /* Print to the user the line, filename and fullname */
+ ui_out_field_int (uiout, "line", st.line);
+ ui_out_field_string (uiout, "file", st.symtab->filename);
+ ui_out_field_string (uiout, "fullname", st.symtab->fullname);
+
+ return MI_CMD_DONE;
+}
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 5a0bf50754e..d6778421339 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -80,6 +80,7 @@ struct mi_cmd mi_cmds[] =
{"file-exec-and-symbols", "file %s", 0},
{"file-exec-file", "exec-file %s", 0},
{"file-list-exec-sections", 0, 0},
+ {"file-list-exec-source-file", 0, 0, mi_cmd_file_list_exec_source_file},
{"file-list-exec-source-files", 0, 0},
{"file-list-shared-libraries", 0, 0},
{"file-list-symbol-files", 0, 0},
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 3eb6153694e..47e1bbf17a7 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -80,6 +80,7 @@ extern mi_cmd_args_ftype mi_cmd_exec_step;
extern mi_cmd_args_ftype mi_cmd_exec_step_instruction;
extern mi_cmd_args_ftype mi_cmd_exec_until;
extern mi_cmd_args_ftype mi_cmd_exec_interrupt;
+extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_file;
extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
extern mi_cmd_argv_ftype mi_cmd_interpreter_exec;
extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
diff --git a/gdb/mi/mi-getopt.c b/gdb/mi/mi-getopt.c
index 59ccdf3efd0..3f2a9021002 100644
--- a/gdb/mi/mi-getopt.c
+++ b/gdb/mi/mi-getopt.c
@@ -74,3 +74,19 @@ mi_getopt (const char *prefix,
}
error ("%s: Unknown option ``%s''", prefix, arg + 1);
}
+
+int
+mi_valid_noargs (const char *prefix, int argc, char **argv)
+{
+ int optind = 0;
+ char *optarg;
+ static struct mi_opt opts[] =
+ {
+ 0
+ };
+
+ if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) == -1)
+ return 1;
+ else
+ return 0;
+}
diff --git a/gdb/mi/mi-getopt.h b/gdb/mi/mi-getopt.h
index 6b31adf029a..17d66fb2654 100644
--- a/gdb/mi/mi-getopt.h
+++ b/gdb/mi/mi-getopt.h
@@ -57,4 +57,24 @@ struct mi_opt
struct mi_opt;
+/* mi_valid_noargs
+
+ Determines if ARGC/ARGV are a valid set of parameters to satisfy
+ an MI function that is not supposed to recieve any arguments.
+
+ An MI function that should not recieve arguments can still be
+ passed parameters after the special option '--' such as below.
+
+ Example: The MI function -exec-run takes no args.
+ However, the client may pass '-exec-run -- -a ...'
+ See PR-783
+
+ PREFIX is passed to mi_getopt for an error message.
+
+ This function Returns 1 if the parameter pair ARGC/ARGV are valid
+ for an MI function that takes no arguments. Otherwise, it returns 0
+ and the appropriate error message is displayed by mi_getopt. */
+
+extern int mi_valid_noargs (const char *prefix, int argc, char **argv);
+
#endif
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 2a63d22e31d..f9424d76946 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5573,6 +5573,10 @@ mips_stab_reg_to_regnum (int num)
return num;
else if (num >= 38 && num < 70)
return num + FP0_REGNUM - 38;
+ else if (num == 70)
+ return HI_REGNUM;
+ else if (num == 71)
+ return LO_REGNUM;
else
{
/* This will hopefully (eventually) provoke a warning. Should
@@ -5591,6 +5595,10 @@ mips_dwarf_dwarf2_ecoff_reg_to_regnum (int num)
return num;
else if (num >= 32 && num < 64)
return num + FP0_REGNUM - 32;
+ else if (num == 64)
+ return HI_REGNUM;
+ else if (num == 65)
+ return LO_REGNUM;
else
{
/* This will hopefully (eventually) provoke a warning. Should
@@ -5806,7 +5814,7 @@ mips_gdbarch_init (struct gdbarch_info info,
switch (mips_abi)
{
case MIPS_ABI_O32:
- set_gdbarch_push_arguments (gdbarch, mips_o32_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mips_o32_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_o32_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_o32_extract_return_value);
tdep->mips_default_saved_regsize = 4;
@@ -5825,7 +5833,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_o32_use_struct_convention);
break;
case MIPS_ABI_O64:
- set_gdbarch_push_arguments (gdbarch, mips_o64_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mips_o64_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_o64_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_o64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5844,7 +5852,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_o32_use_struct_convention);
break;
case MIPS_ABI_EABI32:
- set_gdbarch_push_arguments (gdbarch, mips_eabi_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mips_eabi_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
tdep->mips_default_saved_regsize = 4;
@@ -5863,7 +5871,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_eabi_use_struct_convention);
break;
case MIPS_ABI_EABI64:
- set_gdbarch_push_arguments (gdbarch, mips_eabi_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mips_eabi_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5882,7 +5890,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_eabi_use_struct_convention);
break;
case MIPS_ABI_N32:
- set_gdbarch_push_arguments (gdbarch, mips_n32n64_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mips_n32n64_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5913,7 +5921,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_n32n64_reg_struct_has_addr);
break;
case MIPS_ABI_N64:
- set_gdbarch_push_arguments (gdbarch, mips_n32n64_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mips_n32n64_push_arguments);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -6003,7 +6011,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base. */
set_gdbarch_read_sp (gdbarch, mips_read_sp);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
/* Add/remove bits from an address. The MIPS needs be careful to
ensure that all 32 bit addresses are sign extended to 64 bits. */
@@ -6026,18 +6034,13 @@ mips_gdbarch_init (struct gdbarch_info info,
/* MIPS version of CALL_DUMMY */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
- set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, mips_fix_call_dummy);
set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
- set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_frame_align (gdbarch, mips_frame_align);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 087c9df9f5b..960e83e9488 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1185,25 +1185,21 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_read_fp (gdbarch, generic_target_read_sp);
/* Calling functions in the inferior from GDB. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_words (gdbarch, mn10300_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (mn10300_call_dummy_words));
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_push_arguments (gdbarch, mn10300_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, mn10300_push_arguments);
set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr);
- set_gdbarch_push_return_address (gdbarch, mn10300_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, mn10300_push_return_address);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_use_struct_convention (gdbarch, mn10300_use_struct_convention);
tdep->am33_mode = am33_mode;
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 323cade60a2..c451ed929d1 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -595,12 +595,11 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, ns32k_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_ns32k_call_dummy_words);
set_gdbarch_fix_call_dummy (gdbarch, ns32k_fix_call_dummy);
set_gdbarch_call_dummy_start_offset (gdbarch, 3);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 0);
+ set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 15);
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
@@ -611,6 +610,9 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Misc info */
set_gdbarch_function_start_offset (gdbarch, 0);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 8e52fc0f124..002600de9cb 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -247,9 +247,11 @@ exp1 : exp
/* Expressions, not including the comma operator. */
exp : '*' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_IND); }
+ ;
exp : '&' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_ADDR); }
+ ;
exp : '-' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_NEG); }
@@ -569,6 +571,7 @@ exp : SELECTOR
write_exp_elt_opcode (OP_OBJC_SELECTOR);
write_exp_string ($1);
write_exp_elt_opcode (OP_OBJC_SELECTOR); }
+ ;
exp : SIZEOF '(' type ')' %prec UNARY
{ write_exp_elt_opcode (OP_LONG);
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 911831e4ba8..6fbbaa7fd2d 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -237,7 +237,7 @@ value_nsstring (char *ptr, int len)
/* Objective-C name demangling. */
char *
-objc_demangle (const char *mangled)
+objc_demangle (const char *mangled, int options)
{
char *demangled, *cp;
@@ -700,6 +700,7 @@ const struct language_defn objc_language_defn = {
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
objc_skip_trampoline, /* Language specific skip_trampoline */
+ objc_demangle, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h
index 02688c73c66..0c49bac6382 100644
--- a/gdb/objc-lang.h
+++ b/gdb/objc-lang.h
@@ -41,7 +41,7 @@ extern int c_value_print (struct value *, struct ui_file *,
extern CORE_ADDR lookup_objc_class (char *classname);
extern int lookup_child_selector (char *methodname);
-extern char *objc_demangle (const char *mangled);
+extern char *objc_demangle (const char *mangled, int options);
extern int find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc);
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 40019a47db9..827fa0e22ea 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -462,6 +462,7 @@ const struct language_defn pascal_language_defn =
pascal_val_print, /* Print a value using appropriate syntax */
pascal_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "%", "b", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index b38968d7751..ae87bd7fd43 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1956,28 +1956,13 @@ print_frame_nameless_args (struct frame_info *fi, long start, int num,
for (i = 0; i < num; i++)
{
QUIT;
-#ifdef NAMELESS_ARG_VALUE
- NAMELESS_ARG_VALUE (fi, start, &arg_value);
-#else
argsaddr = get_frame_args_address (fi);
if (!argsaddr)
return;
-
arg_value = read_memory_integer (argsaddr + start, sizeof (int));
-#endif
-
if (!first)
fprintf_filtered (stream, ", ");
-
-#ifdef PRINT_NAMELESS_INTEGER
- PRINT_NAMELESS_INTEGER (stream, arg_value);
-#else
-#ifdef PRINT_TYPELESS_INTEGER
- PRINT_TYPELESS_INTEGER (stream, builtin_type_int, (LONGEST) arg_value);
-#else
fprintf_filtered (stream, "%ld", arg_value);
-#endif /* PRINT_TYPELESS_INTEGER */
-#endif /* PRINT_NAMELESS_INTEGER */
first = 0;
start += sizeof (int);
}
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c66901780ae..70af06f2fab 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1328,16 +1328,16 @@ regcache_collect (int regnum, void *buf)
}
-/* read_pc, write_pc, read_sp, write_sp, read_fp, etc. Special
- handling for registers PC, SP, and FP. */
+/* read_pc, write_pc, read_sp, read_fp, etc. Special handling for
+ registers PC, SP, and FP. */
/* NOTE: cagney/2001-02-18: The functions generic_target_read_pc(),
read_pc_pid(), read_pc(), generic_target_write_pc(),
write_pc_pid(), write_pc(), generic_target_read_sp(), read_sp(),
- generic_target_write_sp(), write_sp(), generic_target_read_fp() and
- read_fp(), will eventually be moved out of the reg-cache into
- either frame.[hc] or to the multi-arch framework. The are not part
- of the raw register cache. */
+ generic_target_write_sp(), generic_target_read_fp() and read_fp(),
+ will eventually be moved out of the reg-cache into either
+ frame.[hc] or to the multi-arch framework. The are not part of the
+ raw register cache. */
/* This routine is getting awfully cluttered with #if's. It's probably
time to turn this into READ_PC and define it in the tm.h file.
@@ -1456,12 +1456,6 @@ generic_target_write_sp (CORE_ADDR val)
"generic_target_write_sp");
}
-void
-write_sp (CORE_ADDR val)
-{
- TARGET_WRITE_SP (val);
-}
-
CORE_ADDR
generic_target_read_fp (void)
{
diff --git a/gdb/remote.h b/gdb/remote.h
index e2171b27efd..4477148f9c8 100644
--- a/gdb/remote.h
+++ b/gdb/remote.h
@@ -54,4 +54,7 @@ extern void remote_cisco_objfile_relocate (bfd_signed_vma text_off,
extern void async_remote_interrupt_twice (void *arg);
+extern void (*target_resume_hook) (void);
+extern void (*target_wait_loop_hook) (void);
+
#endif
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 539905ed977..ef330282782 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2076,10 +2076,10 @@ rs6000_extract_struct_value_address (struct regcache *regcache)
/* FIXME: cagney/2002-09-26: PR gdb/724: When making an inferior
function call GDB knows the address of the struct return value
and hence, should not need to call this function. Unfortunately,
- the current hand_function_call() code only saves the most recent
- struct address leading to occasional calls. The code should
- instead maintain a stack of such addresses (in the dummy frame
- object). */
+ the current call_function_by_hand() code only saves the most
+ recent struct address leading to occasional calls. The code
+ should instead maintain a stack of such addresses (in the dummy
+ frame object). */
/* NOTE: cagney/2002-09-26: Return 0 which indicates that we've
really got no idea where the return value is being stored. While
r3, on function entry, contained the address it will have since
@@ -2876,7 +2876,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
set_gdbarch_num_regs (gdbarch, v->nregs);
set_gdbarch_num_pseudo_regs (gdbarch, v->npregs);
@@ -2900,16 +2900,10 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_char_signed (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
- set_gdbarch_push_return_address (gdbarch, ppc_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_register_convertible (gdbarch, rs6000_register_convertible);
@@ -2924,9 +2918,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
64-bit code. At some point in the future, this matter needs to be
revisited. */
if (sysv_abi && wordsize == 4)
- set_gdbarch_push_arguments (gdbarch, ppc_sysv_abi_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, ppc_sysv_abi_push_arguments);
else
- set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, rs6000_push_arguments);
set_gdbarch_deprecated_store_struct_return (gdbarch, rs6000_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 18b7d108fe7..deff25d4f2d 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1861,17 +1861,9 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
(gdbarch, generic_cannot_extract_struct_value_address);
/* Parameters for inferior function calls. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_push_arguments (gdbarch, s390_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, s390_push_arguments);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_push_return_address (gdbarch, s390_push_return_address);
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (s390_call_dummy_words));
set_gdbarch_call_dummy_words (gdbarch, s390_call_dummy_words);
@@ -1907,6 +1899,9 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
}
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 746e59970cb..99a1fd5ba96 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -251,6 +251,7 @@ const struct language_defn scm_language_defn =
scm_val_print, /* Print a value using appropriate syntax */
scm_value_print, /* Print a top-level value */
NULL, /* Language specific skip_trampoline */
+ NULL, /* Language specific symbol demangler */
{"", "", "", ""}, /* Binary format info */
{"#o%lo", "#o", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 7649c6208bc..804b34a5de5 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -4375,7 +4375,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, sh_push_arguments);
set_gdbarch_deprecated_store_struct_return (gdbarch, sh_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
@@ -4617,7 +4617,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_chain (gdbarch, sh64_frame_chain);
set_gdbarch_deprecated_get_saved_register (gdbarch, sh64_get_saved_register);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh64_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, sh64_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, sh64_push_arguments);
/*set_gdbarch_deprecated_store_struct_return (gdbarch, sh64_store_struct_return);*/
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
@@ -4641,7 +4641,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
set_gdbarch_register_name (gdbarch, sh_register_name);
set_gdbarch_register_virtual_type (gdbarch, sh_register_virtual_type);
@@ -4653,17 +4653,10 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); /*???*/
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_words (gdbarch, sh_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (sh_call_dummy_words));
- set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_push_return_address (gdbarch, sh_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, sh_push_return_address);
set_gdbarch_deprecated_store_return_value (gdbarch, sh_store_return_value);
set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c
index ba5e7eac59a..ca46a9ed1c7 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -518,6 +518,8 @@ static int
do_target_signal_to_host (enum target_signal oursig,
int *oursig_ok)
{
+ int retsig;
+
*oursig_ok = 1;
switch (oursig)
{
@@ -742,36 +744,31 @@ do_target_signal_to_host (enum target_signal oursig,
default:
#if defined (REALTIME_LO)
- if (oursig < REALTIME_LO || oursig >= REALTIME_HI)
- {
- *oursig_ok = 0;
- return 0;
- }
+ retsig = 0;
if (oursig >= TARGET_SIGNAL_REALTIME_33
&& oursig <= TARGET_SIGNAL_REALTIME_63)
{
/* This block of signals is continuous, and
TARGET_SIGNAL_REALTIME_33 is 33 by definition. */
- int retsig =
- (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
- return retsig;
+ retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
}
else if (oursig == TARGET_SIGNAL_REALTIME_32)
{
/* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
TARGET_SIGNAL_REALTIME_33. It is 32 by definition. */
- return 32;
+ retsig = 32;
}
else if (oursig >= TARGET_SIGNAL_REALTIME_64
&& oursig <= TARGET_SIGNAL_REALTIME_127)
{
/* This block of signals is continuous, and
TARGET_SIGNAL_REALTIME_64 is 64 by definition. */
- int retsig =
- (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
- return retsig;
+ retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
}
+
+ if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
+ return retsig;
#endif
*oursig_ok = 0;
diff --git a/gdb/somread.c b/gdb/somread.c
index 85d4f0a537c..654ae067f75 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -37,6 +37,8 @@
/* Various things we might complain about... */
+static int init_import_symbols (struct objfile *objfile);
+
static void som_symfile_init (struct objfile *);
static void som_new_init (struct objfile *);
@@ -466,7 +468,7 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
not defined there. (Variables that are imported are dealt
with as "loc_indirect" vars.)
Return value = number of import symbols read in. */
-int
+static int
init_import_symbols (struct objfile *objfile)
{
unsigned int import_list;
diff --git a/gdb/somsolib.h b/gdb/somsolib.h
index 0840067d997..c2414118843 100644
--- a/gdb/somsolib.h
+++ b/gdb/somsolib.h
@@ -23,6 +23,9 @@
Written by the Center for Software Science at the Univerity of Utah
and by Cygnus Support. */
+#ifndef SOMSOLIB_H
+#define SOMSOLIB_H
+
/* Forward decl's for prototypes */
struct target_ops;
struct objfile;
@@ -164,3 +167,12 @@ extern char *som_solib_address (CORE_ADDR); /* somsolib.c */
/* If ADDR lies in a shared library, return its name. */
#define PC_SOLIB(addr) som_solib_address (addr)
+
+extern CORE_ADDR som_solib_get_solib_by_pc (CORE_ADDR addr);
+
+struct so_list;
+extern CORE_ADDR so_lib_thread_start_addr (struct so_list *so);
+
+extern void no_shared_libraries (char *ignored, int from_tty);
+
+#endif
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index e9daad8de60..0e57aefd9d5 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1040,7 +1040,7 @@ sparc_push_dummy_frame (void)
sp -= DUMMY_STACK_SIZE;
- write_sp (sp);
+ DEPRECATED_DUMMY_WRITE_SP (sp);
write_memory (sp + DUMMY_REG_SAVE_OFFSET, &register_temp[0],
DUMMY_STACK_REG_BUF_SIZE);
@@ -1310,7 +1310,7 @@ sparc_pop_frame (void)
read_memory_integer (fsr[O0_REGNUM + 7],
SPARC_INTREG_SIZE));
- write_sp (get_frame_base (frame));
+ DEPRECATED_DUMMY_WRITE_SP (get_frame_base (frame));
}
else if (fsr[I0_REGNUM])
{
@@ -3137,8 +3137,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* First set settings that are common for all sparc architectures. */
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address);
@@ -3161,7 +3159,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
set_gdbarch_deprecated_pop_frame (gdbarch, sparc_pop_frame);
- set_gdbarch_push_return_address (gdbarch, sparc_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, sparc_push_return_address);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, sparc_push_dummy_frame);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_register_convert_to_raw (gdbarch, sparc_convert_to_raw);
@@ -3246,20 +3244,16 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_words (gdbarch, call_dummy_32);
#else
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
#endif
set_gdbarch_deprecated_call_dummy_stack_adjust (gdbarch, 68);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 68);
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_npc_regnum (gdbarch, SPARC32_NPC_REGNUM);
set_gdbarch_pc_regnum (gdbarch, SPARC32_PC_REGNUM);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_push_arguments (gdbarch, sparc32_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, sparc32_push_arguments);
set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
@@ -3279,7 +3273,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_struct_return (gdbarch, sparc32_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch,
generic_use_struct_convention);
- set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
tdep->y_regnum = SPARC32_Y_REGNUM;
tdep->fp_max_regnum = SPARC_FP0_REGNUM + 32;
tdep->intreg_size = 4;
@@ -3302,10 +3296,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_words (gdbarch, call_dummy_64);
#else
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
#endif
set_gdbarch_deprecated_call_dummy_stack_adjust (gdbarch, 128);
@@ -3315,7 +3305,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_npc_regnum (gdbarch, SPARC64_NPC_REGNUM);
set_gdbarch_pc_regnum (gdbarch, SPARC64_PC_REGNUM);
set_gdbarch_ptr_bit (gdbarch, 8 * TARGET_CHAR_BIT);
- set_gdbarch_push_arguments (gdbarch, sparc64_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, sparc64_push_arguments);
/* NOTE different for at_entry */
set_gdbarch_read_fp (gdbarch, sparc64_read_fp);
set_gdbarch_read_sp (gdbarch, sparc64_read_sp);
@@ -3337,7 +3327,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_struct_return (gdbarch, sparc64_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch,
sparc64_use_struct_convention);
- set_gdbarch_write_sp (gdbarch, sparc64_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, sparc64_write_sp);
tdep->y_regnum = SPARC64_Y_REGNUM;
tdep->fp_max_regnum = SPARC_FP0_REGNUM + 48;
tdep->intreg_size = 8;
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8380b276019..7d7886a2921 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3573,7 +3573,7 @@ symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf)
all sections begin at 0. */
bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL);
- return bfd_simple_get_relocated_section_contents (abfd, sectp, buf);
+ return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL);
}
void
diff --git a/gdb/symtab.h b/gdb/symtab.h
index f2f2d247fc0..79705fec06d 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -402,8 +402,8 @@ enum address_class
/* Value is in register number SYMBOL_VALUE. Just like LOC_REGISTER
except this is an argument. Probably the cleaner way to handle
this would be to separate address_class (which would include
- separate ARG and LOCAL to deal with get_frame_args_address()
- versus get_frame_locals_address()), and an is_argument flag.
+ separate ARG and LOCAL to deal with FRAME_ARGS_ADDRESS versus
+ FRAME_LOCALS_ADDRESS), and an is_argument flag.
For some symbol formats (stabs, for some compilers at least),
the compiler generates two symbols, an argument and a register.
@@ -447,9 +447,9 @@ enum address_class
/* Value is arg at SYMBOL_VALUE offset in stack frame. Differs from
LOC_LOCAL in that symbol is an argument; differs from LOC_ARG in
- that we find it in the frame (get_frame_locals_address()), not in
- the arglist (get_frame_args_address()). Added for i960, which
- passes args in regs then copies to frame. */
+ that we find it in the frame (FRAME_LOCALS_ADDRESS), not in the
+ arglist (FRAME_ARGS_ADDRESS). Added for i960, which passes args
+ in regs then copies to frame. */
LOC_LOCAL_ARG,
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 433708822bf..0cadc56900d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,47 @@
+2003-04-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/callfuncs.exp: Make "print add" messages unique.
+ * gdb.base/ending-run.exp: Put spaces around "breakpoint" to stop
+ matching directories by the name breakpoint.
+ * gdb.base/pointers.exp: Make "ptype pppC" message consistent.
+ Make "continue to marker1" consistent.
+ * gdb.base/call-rt-st.exp: Make "finish out from loop_count"
+ message consistent.
+ * 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>
+
+ * gdb.base/sizeof.c (main): Print the value of '\377'.
+ * gdb.base/sizeof.exp: Check the sign of '\377'.
+
+2003-03-27 Michael Chastain <mec@shout.net>
+
+ * gdb.base/gdb1090.exp: New file.
+ * gdb.base/gdb1090.cc: New file.
+
+2003-03-27 J. Brobecker <brobecker@gnat.com>
+
+ * gdb.gdb/observer.exp: New regression test.
+
+2003-03-27 Michael Chastain <mec@shout.net>
+
+ * gdb.base/list.exp: Remove setup_xfail_format for DWARF 1.
+ * gdb.base/ptype.exp: Likewise.
+
+2003-03-27 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.c++/casts.exp: Fix startup to run also on embedded targets.
+
+2003-03-26 Michael Chastain <mec@shout.net>
+
+ * gdb.base/ptype.exp: Actually use some typedef'd types.
+
2003-03-21 Stephane Carrez <stcarrez@nerim.fr>
* gdb.asm/asm-source.exp: Set asm-arch for m6811 and m6812.
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 115dcb3fa7e..0acd1393a7a 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -128,12 +128,18 @@ 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: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 ".*$gdb_prompt $" { fail "finish out from loop_count"}
- timeout { fail "(timeout)finish out from loop_count"}
+ -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: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 ".*$gdb_prompt $" {
+ fail "finish out from loop_count"
+ }
+ timeout {
+ fail "finish out from loop_count (timeout)"
+ }
}
# Ask GDB to print the value of EXPR, and expect to see the regexp
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 9183fe46b82..7a5f14302d7 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -342,7 +342,8 @@ if ![gdb_test "bt 2" \
# Call function (causing a breakpoint hit in the call dummy) and do a finish,
# make sure we are back at main and still have the same register contents.
-gdb_test "print add(4,5)" "The program being debugged stopped while.*" ""
+gdb_test "print add(4,5)" "The program being debugged stopped while.*" \
+ "call function causing a breakpoint then do a finish"
gdb_test "finish" \
"Value returned is .* = 9" \
"finish from call dummy breakpoint returns correct value"
@@ -360,7 +361,8 @@ if ![gdb_test "bt 2" \
# Call function (causing a breakpoint hit in the call dummy) and do a return
# with a value, make sure we are back at main with the same register contents.
-gdb_test "print add(4,5)" "The program being debugged stopped while.*" ""
+gdb_test "print add(4,5)" "The program being debugged stopped while.*" \
+ "call function causing a breakpoint and then do a return"
if ![gdb_test "return 7" \
"#0 main.*" \
"back at main after return from call dummy breakpoint" \
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index f89e142dd92..3960f0621d7 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -74,7 +74,7 @@ if [target_info exists use_gdb_stub] {
gdb_test "cle" ".*Deleted breakpoints 2 1.*" "clear worked"
send_gdb "i b\n"
gdb_expect {
- -re ".*breakpoint.*breakpoint.*$gdb_prompt $" {
+ -re ".* breakpoint .* breakpoint .*$gdb_prompt $" {
fail "cleared bp at line before routine"
}
-re ".*3.*main.*31.*$gdb_prompt $" {
@@ -120,7 +120,7 @@ gdb_expect {
send_gdb "i b\n"
gdb_expect {
- -re ".*breakpoint.*breakpoint.*$gdb_prompt $" {
+ -re ".* breakpoint .* breakpoint .*$gdb_prompt $" {
fail "all set to continue (didn't clear bps)"
}
-re ".*3.*main.*31.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index dee91520e92..84a15cfacbe 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -164,11 +164,9 @@ proc test_listsize {} {
proc test_list_include_file {} {
global gdb_prompt
- setup_xfail_format "DWARF 1"
setup_xfail_format "COFF"
gdb_test "list list0.h:1" "1\[ \t\]+/\[*\]+ An include file .*10\[ \t\]+bar \\(x\\+\\+\\);" "list line 1 in include file"
- setup_xfail_format "DWARF 1"
setup_xfail_format "COFF"
gdb_test "list list0.h:100" "Line number 95 out of range; .*list0.h has 3\[67\] lines." "list message for lines past EOF"
}
@@ -239,7 +237,6 @@ proc test_list_function {} {
# Ultrix gdb is the second case, still correct.
# SunPRO cc is the third case.
setup_xfail "powerpc-*-*"
- setup_xfail_format "DWARF 1"
gdb_test "list foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
}
@@ -427,7 +424,6 @@ proc test_list_filename_and_function {} {
# SunPRO cc is the third case.
setup_xfail "rs6000-*-*" 1804
setup_xfail "powerpc-*-*" 1804
- setup_xfail_format "DWARF 1"
setup_xfail_format "COFF"
send_gdb "list list0.h:foo\n"
gdb_expect {
@@ -496,7 +492,6 @@ proc test_list_filename_and_function {} {
gdb_test "list foobar.c:main" "No source file named foobar.c.|Location not found" "list filename:function; nonexistant file"
- setup_xfail_format "DWARF 1"
gdb_test "list list0.h:foobar" "Function \"foobar\" not defined.|Location not found" "list filename:function; nonexistant function"
}
diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp
index 5f406ad1533..a10a7f3b4cc 100644
--- a/gdb/testsuite/gdb.base/pointers.exp
+++ b/gdb/testsuite/gdb.base/pointers.exp
@@ -366,23 +366,28 @@ gdb_expect {
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*more_code.*$gdb_prompt $" {
- pass "up from marker1"
- }
- -re ".*$gdb_prompt $" {
- fail "up from marker1"
- }
- timeout { fail "up from marker1 (timeout)" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
+send_gdb "cont\n"
+gdb_expect {
+ -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
+ pass "continue to marker1"
+ send_gdb "up\n"
+ gdb_expect {
+ -re ".*more_code.*$gdb_prompt $" {
+ pass "up from marker1"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "up from marker1"
+ }
+ timeout { fail "up from marker1 (timeout)" }
+ }
+ }
+ -re "$gdb_prompt $" {
+ fail "continue to marker1"
}
+ timeout {
+ fail "continue to marker1 (timeout)"
+ }
+}
send_gdb "print *pUC\n"
@@ -568,7 +573,7 @@ gdb_expect {
send_gdb "ptype pppC\n"
gdb_expect {
- -re "type = char \\*\\*\\*.*$gdb_prompt $" { pass "ptype pppC" }
+ -re "type = char \\*\\*\\*.*$gdb_prompt $" { pass "ptype pppC" }
-re ".*$gdb_prompt $" { fail "ptype pppC" }
timeout { fail "(timeout) ptype pppC" }
}
diff --git a/gdb/testsuite/gdb.base/ptype.c b/gdb/testsuite/gdb.base/ptype.c
index 2c85c7c88fc..397a714692b 100644
--- a/gdb/testsuite/gdb.base/ptype.c
+++ b/gdb/testsuite/gdb.base/ptype.c
@@ -59,6 +59,7 @@ double v_double_array[2];
/* PR 3742 */
typedef char t_char_array[];
+t_char_array *pv_char_array;
/**** pointers *******/
@@ -237,6 +238,8 @@ int (*xptr) (int (*) (), int (*) (void), int);
int (*(*ffptr) (char)) (short);
int (*(*(*fffptr) (char)) (short)) (long);
+func_type v_func_type;
+
/* Here are the sort of stabs we expect to see for the above:
.stabs "func_type:t(0,100)=*(0,101)=g(0,1)(0,102)=*(0,103)=g(0,1)(0,1)(0,14)#(0,14)#",128,0,234,0
diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp
index 6e33d854805..6580b43c427 100644
--- a/gdb/testsuite/gdb.base/ptype.exp
+++ b/gdb/testsuite/gdb.base/ptype.exp
@@ -1,5 +1,5 @@
# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999,
-# 2000, 2002 Free Software Foundation, Inc.
+# 2000, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -137,7 +137,6 @@ if {!$gcc_compiled && !$hp_aCC_compiler} {
# For get_debug_format to do its job, we need to have a current source file.
gdb_test "list main" ""
get_debug_format
-setup_xfail_format "DWARF 1"
gdb_test "whatis v_boolean" "type = (enum |)boolean" \
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)"
@@ -370,7 +369,6 @@ gdb_test "ptype v_int" "type = int.*" "ptype int"
#
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "i*86-*-sysv4*" }
-setup_xfail_format "DWARF 1"
if {$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
gdb_test "ptype t_char_array" "type = (|unsigned )char \\\[0?\\\]"
diff --git a/gdb/testsuite/gdb.base/sizeof.c b/gdb/testsuite/gdb.base/sizeof.c
index 95d379ee9ae..c32231f8566 100644
--- a/gdb/testsuite/gdb.base/sizeof.c
+++ b/gdb/testsuite/gdb.base/sizeof.c
@@ -114,6 +114,7 @@ main ()
printf ("sizeof (long double) == %d\n", sizeof (long double));
/* Signed char? */
+ printf ("valueof ('\\377') == %d\n", '\377');
printf ("valueof ((int) (char) -1) == %d\n", (int) (char) -1);
printf ("valueof ((int) (signed char) -1) == %d\n", (int) (signed char) -1);
printf ("valueof ((int) (unsigned char) -1) == %d\n", (int) (unsigned char) -1);
diff --git a/gdb/testsuite/gdb.base/sizeof.exp b/gdb/testsuite/gdb.base/sizeof.exp
index 7c0390588a0..7fcbe0e37e7 100644
--- a/gdb/testsuite/gdb.base/sizeof.exp
+++ b/gdb/testsuite/gdb.base/sizeof.exp
@@ -154,10 +154,12 @@ proc check_valueof { exp val } {
# Check that GDB and the target agree over the sign of a character.
+set signof_byte [get_valueof "/d" "'\\377'" -1]
set signof_char [get_valueof "/d" "(int) (char) -1" -1]
set signof_signed_char [get_valueof "/d" "(int) (signed char) -1" -1]
set signof_unsigned_char [get_valueof "/d" "(int) (unsigned char) -1" -1]
+check_valueof "'\\\\377'" ${signof_byte}
check_valueof "(int) (char) -1" ${signof_char}
check_valueof "(int) (signed char) -1" ${signof_signed_char}
check_valueof "(int) (unsigned char) -1" ${signof_unsigned_char}
diff --git a/gdb/testsuite/gdb.c++/casts.exp b/gdb/testsuite/gdb.c++/casts.exp
index 859755f66b7..5b6cabe34fa 100644
--- a/gdb/testsuite/gdb.c++/casts.exp
+++ b/gdb/testsuite/gdb.c++/casts.exp
@@ -55,11 +55,16 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \
"Breakpoint.*at.* file .*" \
""
-gdb_test "run" "Breakpoint .* at .*casts.cc.*" ""
+gdb_test "continue" "Breakpoint .* at .*casts.cc.*" ""
# Casting a pointer to a base class to a pointer to a derived class
# should yield the entire derived class. Until August 2002, GDB got
diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp
new file mode 100644
index 00000000000..2ffdcbfc6a9
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/mi-file.exp
@@ -0,0 +1,65 @@
+# 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=mi"
+
+gdb_exit
+if [mi_gdb_start] {
+ continue
+}
+
+set testfile "basics"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+mi_delete_breakpoints
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_load ${binfile}
+
+proc test_tbreak_creation_and_listing {} {
+ global srcfile
+ global srcdir
+ global subdir
+ set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
+
+ # get the path and absolute path to the current executable
+ mi_gdb_test "111-file-list-exec-source-file" \
+ "111\\\^done,line=\"23\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
+ "request path info of current source file (${srcfile})"
+}
+
+test_tbreak_creation_and_listing
+
+mi_gdb_exit
+return 0
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d2b6fbdb8c6..4dfbf76c950 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -541,27 +541,27 @@ proc gdb_test_multiple { command message user_code } {
}
-re "Program exited with code \[0-9\]+.*$gdb_prompt $" {
if ![string match "" $message] then {
- set errmsg "$message: the program exited"
+ set errmsg "$message (the program exited)"
} else {
- set errmsg "$command: the program exited"
+ set errmsg "$command (the program exited)"
}
fail "$errmsg"
set result -1
}
-re "EXIT code \[0-9\r\n\]+Program exited normally.*$gdb_prompt $" {
if ![string match "" $message] then {
- set errmsg "$message: the program exited"
+ set errmsg "$message (the program exited)"
} else {
- set errmsg "$command: the program exited"
+ set errmsg "$command (the program exited)"
}
fail "$errmsg"
set result -1
}
-re "The program is not being run.*$gdb_prompt $" {
if ![string match "" $message] then {
- set errmsg "$message: the program is no longer running"
+ set errmsg "$message (the program is no longer running)"
} else {
- set errmsg "$command: the program is no longer running"
+ set errmsg "$command (the program is no longer running)"
}
fail "$errmsg"
set result -1
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 4b057d49623..59076280ce8 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -549,18 +549,18 @@ proc mi_gdb_test { args } {
}
-re "Program exited with code \[0-9\]+.*$mi_gdb_prompt\[ \]*$" {
if ![string match "" $message] then {
- set errmsg "$message: the program exited"
+ set errmsg "$message (the program exited)"
} else {
- set errmsg "$command: the program exited"
+ set errmsg "$command (the program exited)"
}
fail "$errmsg"
return -1
}
-re "The program is not being run.*$mi_gdb_prompt\[ \]*$" {
if ![string match "" $message] then {
- set errmsg "$message: the program is no longer running"
+ set errmsg "$message (the program is no longer running)"
} else {
- set errmsg "$command: the program is no longer running"
+ set errmsg "$command (the program is no longer running)"
}
fail "$errmsg"
return -1
diff --git a/gdb/thread.c b/gdb/thread.c
index 2c70ee5f955..1b6d872050e 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -255,9 +255,8 @@ in_thread_list (ptid_t ptid)
/* Print a list of thread ids currently known, and the total number of
threads. To be used from within catch_errors. */
-static int
-do_captured_list_thread_ids (struct ui_out *uiout,
- void *arg)
+static int
+do_captured_list_thread_ids (struct ui_out *uiout, void *arg)
{
struct thread_info *tp;
int num = 0;
@@ -291,24 +290,23 @@ gdb_list_thread_ids (struct ui_out *uiout)
/* Load infrun state for the thread PID. */
void
-load_infrun_state (ptid_t ptid,
- CORE_ADDR *prev_pc,
+load_infrun_state (ptid_t ptid,
+ CORE_ADDR *prev_pc,
CORE_ADDR *prev_func_start,
- char **prev_func_name,
+ char **prev_func_name,
int *trap_expected,
struct breakpoint **step_resume_breakpoint,
struct breakpoint **through_sigtramp_breakpoint,
- CORE_ADDR *step_range_start,
+ CORE_ADDR *step_range_start,
CORE_ADDR *step_range_end,
- struct frame_id *step_frame_id,
+ struct frame_id *step_frame_id,
int *handling_longjmp,
- int *another_trap,
+ int *another_trap,
int *stepping_through_solib_after_catch,
bpstat *stepping_through_solib_catchpoints,
int *stepping_through_sigtramp,
- int *current_line,
- struct symtab **current_symtab,
- CORE_ADDR *step_sp)
+ int *current_line,
+ struct symtab **current_symtab, CORE_ADDR *step_sp)
{
struct thread_info *tp;
@@ -329,8 +327,10 @@ load_infrun_state (ptid_t ptid,
*step_frame_id = tp->step_frame_id;
*handling_longjmp = tp->handling_longjmp;
*another_trap = tp->another_trap;
- *stepping_through_solib_after_catch = tp->stepping_through_solib_after_catch;
- *stepping_through_solib_catchpoints = tp->stepping_through_solib_catchpoints;
+ *stepping_through_solib_after_catch =
+ tp->stepping_through_solib_after_catch;
+ *stepping_through_solib_catchpoints =
+ tp->stepping_through_solib_catchpoints;
*stepping_through_sigtramp = tp->stepping_through_sigtramp;
*current_line = tp->current_line;
*current_symtab = tp->current_symtab;
@@ -340,24 +340,23 @@ load_infrun_state (ptid_t ptid,
/* Save infrun state for the thread PID. */
void
-save_infrun_state (ptid_t ptid,
- CORE_ADDR prev_pc,
+save_infrun_state (ptid_t ptid,
+ CORE_ADDR prev_pc,
CORE_ADDR prev_func_start,
- char *prev_func_name,
+ char *prev_func_name,
int trap_expected,
struct breakpoint *step_resume_breakpoint,
struct breakpoint *through_sigtramp_breakpoint,
- CORE_ADDR step_range_start,
+ CORE_ADDR step_range_start,
CORE_ADDR step_range_end,
- const struct frame_id *step_frame_id,
+ const struct frame_id *step_frame_id,
int handling_longjmp,
- int another_trap,
+ int another_trap,
int stepping_through_solib_after_catch,
bpstat stepping_through_solib_catchpoints,
- int stepping_through_sigtramp,
+ int stepping_through_sigtramp,
int current_line,
- struct symtab *current_symtab,
- CORE_ADDR step_sp)
+ struct symtab *current_symtab, CORE_ADDR step_sp)
{
struct thread_info *tp;
@@ -506,7 +505,7 @@ switch_to_thread (ptid_t ptid)
static void
restore_current_thread (ptid_t ptid)
{
- if (! ptid_equal (ptid, inferior_ptid))
+ if (!ptid_equal (ptid, inferior_ptid))
{
switch_to_thread (ptid);
print_stack_frame (get_current_frame (), 0, -1);
@@ -571,14 +570,13 @@ thread_apply_all_command (char *cmd, int from_tty)
switch_to_thread (tp->ptid);
#ifdef HPUXHPPA
printf_filtered ("\nThread %d (%s):\n",
- tp->num,
- target_tid_to_str (inferior_ptid));
+ tp->num, target_tid_to_str (inferior_ptid));
#else
printf_filtered ("\nThread %d (%s):\n", tp->num,
target_pid_to_str (inferior_ptid));
#endif
execute_command (cmd, from_tty);
- strcpy (cmd, saved_cmd); /* Restore exact command used previously */
+ strcpy (cmd, saved_cmd); /* Restore exact command used previously */
}
do_cleanups (saved_cmd_cleanup_chain);
@@ -690,8 +688,7 @@ thread_command (char *tidstr, int from_tty)
}
static int
-do_captured_thread_select (struct ui_out *uiout,
- void *tidstr)
+do_captured_thread_select (struct ui_out *uiout, void *tidstr)
{
int num;
struct thread_info *tp;
@@ -724,8 +721,7 @@ do_captured_thread_select (struct ui_out *uiout,
}
enum gdb_rc
-gdb_thread_select (struct ui_out *uiout,
- char *tidstr)
+gdb_thread_select (struct ui_out *uiout, char *tidstr)
{
return catch_exceptions (uiout, do_captured_thread_select, tidstr,
NULL, RETURN_MASK_ALL);
@@ -744,16 +740,14 @@ _initialize_thread (void)
add_prefix_cmd ("thread", class_run, thread_command,
"Use this command to switch between threads.\n\
-The new thread ID must be currently known.", &thread_cmd_list, "thread ", 1,
- &cmdlist);
+The new thread ID must be currently known.", &thread_cmd_list, "thread ", 1, &cmdlist);
add_prefix_cmd ("apply", class_run, thread_apply_command,
"Apply a command to a list of threads.",
&thread_apply_list, "apply ", 1, &thread_cmd_list);
add_cmd ("all", class_run, thread_apply_all_command,
- "Apply a command to all threads.",
- &thread_apply_list);
+ "Apply a command to all threads.", &thread_apply_list);
if (!xdb_commands)
add_com_alias ("t", "thread", class_run, 1);
diff --git a/gdb/utils.c b/gdb/utils.c
index f7ece88578b..f8ac0fd41a8 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2298,22 +2298,7 @@ fprintf_symbol_filtered (struct ui_file *stream, char *name,
}
else
{
- switch (lang)
- {
- case language_cplus:
- demangled = cplus_demangle (name, arg_mode);
- break;
- case language_java:
- demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
- break;
- case language_objc:
- /* Commented out until ObjC handling is enabled. */
- /*demangled = objc_demangle (name); */
- /*break; */
- default:
- demangled = NULL;
- break;
- }
+ demangled = language_demangle (language_def (lang), name, arg_mode);
fputs_filtered (demangled ? demangled : name, stream);
if (demangled != NULL)
{
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 9bae316adcd..ca627e61654 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1268,20 +1268,14 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Call Dummies
*
* These values and methods are used when gdb calls a target function. */
- set_gdbarch_push_return_address (gdbarch, v850_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, v850_push_return_address);
set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, v850_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, v850_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, v850_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, v850_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, v850_fix_call_dummy);
@@ -1292,6 +1286,9 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}
diff --git a/gdb/valops.c b/gdb/valops.c
index ff24a9f4e7c..a2a2e978bd3 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1079,8 +1079,8 @@ value_push (register CORE_ADDR sp, struct value *arg)
}
CORE_ADDR
-default_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+legacy_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
/* ASSERT ( !struct_return); */
int i;
@@ -1240,8 +1240,8 @@ find_function_addr (struct value *function, struct type **retval_type)
ARGS is modified to contain coerced values. */
-static struct value *
-hand_function_call (struct value *function, int nargs, struct value **args)
+struct value *
+call_function_by_hand (struct value *function, int nargs, struct value **args)
{
register CORE_ADDR sp;
register int i;
@@ -1264,6 +1264,7 @@ hand_function_call (struct value *function, int nargs, struct value **args)
static ULONGEST *dummy;
int sizeof_dummy1;
char *dummy1;
+ CORE_ADDR dummy_addr;
CORE_ADDR old_sp;
struct type *value_type;
unsigned char struct_return;
@@ -1423,26 +1424,34 @@ hand_function_call (struct value *function, int nargs, struct value **args)
real_pc = FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
value_type, using_gcc);
#else
- FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
- value_type, using_gcc);
+ if (FIX_CALL_DUMMY_P ())
+ {
+ /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true? */
+ FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, value_type,
+ using_gcc);
+ }
real_pc = start_sp;
#endif
- if (CALL_DUMMY_LOCATION == ON_STACK)
+ switch (CALL_DUMMY_LOCATION)
{
+ case ON_STACK:
+ dummy_addr = start_sp;
write_memory (start_sp, (char *) dummy1, sizeof_dummy1);
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
- }
-
- if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
- {
+ break;
+ case AT_ENTRY_POINT:
real_pc = funaddr;
+ dummy_addr = CALL_DUMMY_ADDRESS ();
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
/* NOTE: cagney/2002-04-13: The entry point is going to be
modified with a single breakpoint. */
generic_save_call_dummy_addr (CALL_DUMMY_ADDRESS (),
CALL_DUMMY_ADDRESS () + 1);
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
}
#ifdef lint
@@ -1569,9 +1578,8 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
{
int len = TYPE_LENGTH (value_type);
if (STACK_ALIGN_P ())
- /* MVS 11/22/96: I think at least some of this stack_align
- code is really broken. Better to let PUSH_ARGUMENTS adjust
- the stack in a target-defined manner. */
+ /* NOTE: cagney/2003-03-22: Should rely on frame align, rather
+ than stack align to force the alignment of the stack. */
len = STACK_ALIGN (len);
if (INNER_THAN (1, 2))
{
@@ -1605,7 +1613,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
if (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
{
/* MVS 11/22/96: I think at least some of this stack_align code
- is really broken. Better to let PUSH_ARGUMENTS adjust the
+ is really broken. Better to let push_dummy_call() adjust the
stack in a target-defined manner. */
if (STACK_ALIGN_P () && INNER_THAN (1, 2))
{
@@ -1620,9 +1628,24 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
}
}
- sp = PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr);
+ /* Create the dummy stack frame. Pass in the call dummy address as,
+ presumably, the ABI code knows where, in the call dummy, the
+ return address should be pointed. */
+ if (gdbarch_push_dummy_call_p (current_gdbarch))
+ /* When there is no push_dummy_call method, should this code
+ simply error out. That would the implementation of this method
+ for all ABIs (which is probably a good thing). */
+ sp = gdbarch_push_dummy_call (current_gdbarch, current_regcache,
+ dummy_addr, nargs, args, sp, struct_return,
+ struct_addr);
+ else if (DEPRECATED_PUSH_ARGUMENTS_P ())
+ /* Keep old targets working. */
+ sp = DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return,
+ struct_addr);
+ else
+ sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
- if (PUSH_RETURN_ADDRESS_P ())
+ if (DEPRECATED_PUSH_RETURN_ADDRESS_P ())
/* for targets that use no CALL_DUMMY */
/* There are a number of targets now which actually don't write
any CALL_DUMMY instructions into the target, but instead just
@@ -1633,9 +1656,14 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
return-address register as appropriate. Formerly this has been
done in PUSH_ARGUMENTS, but that's overloading its
functionality a bit, so I'm making it explicit to do it here. */
- sp = PUSH_RETURN_ADDRESS (real_pc, sp);
+ sp = DEPRECATED_PUSH_RETURN_ADDRESS (real_pc, sp);
- if (STACK_ALIGN_P () && !INNER_THAN (1, 2))
+ /* NOTE: cagney/2003-03-23: Diable this code when there is a
+ push_dummy_call() method. Since that method will have already
+ handled any alignment issues, the code below is entirely
+ redundant. */
+ if (!gdbarch_push_dummy_call_p (current_gdbarch)
+ && STACK_ALIGN_P () && !INNER_THAN (1, 2))
{
/* If stack grows up, we must leave a hole at the bottom, note
that sp already has been advanced for the arguments! */
@@ -1667,7 +1695,13 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
might fool with it. On SPARC, this write also stores the register
window into the right place in the new stack frame, which otherwise
wouldn't happen. (See store_inferior_registers in sparc-nat.c.) */
- write_sp (sp);
+ /* NOTE: cagney/2003-03-23: Disable this code when there is a
+ push_dummy_call() method. Since that method will have already
+ stored the stack pointer (as part of creating the fake call
+ frame), and none of the code following that code adjusts the
+ stack-pointer value, the below call is entirely redundant. */
+ if (DEPRECATED_DUMMY_WRITE_SP_P ())
+ DEPRECATED_DUMMY_WRITE_SP (sp);
if (SAVE_DUMMY_FRAME_TOS_P ())
SAVE_DUMMY_FRAME_TOS (sp);
@@ -1823,21 +1857,6 @@ the function call).", name);
}
}
-struct value *
-call_function_by_hand (struct value *function, int nargs, struct value **args)
-{
- if (CALL_DUMMY_P)
- {
- return hand_function_call (function, nargs, args);
- }
- else
- {
- error ("Cannot invoke functions on this machine.");
- }
-}
-
-
-
/* Create a value for an array by allocating space in the inferior, copying
the data into that space, and then setting up an array value.
diff --git a/gdb/value.h b/gdb/value.h
index 04be76ad7fb..783191a040e 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -128,9 +128,7 @@ struct value
list. */
struct value *next;
- /* Register number if the value is from a register. Is not kept
- if you take a field of a structure that is stored in a
- register. Shouldn't it be? */
+ /* Register number if the value is from a register. */
short regno;
/* If zero, contents of this value are in the contents field.
If nonzero, contents are in inferior memory at address
@@ -560,9 +558,9 @@ extern struct value *find_function_in_inferior (const char *);
extern struct value *value_allocate_space_in_inferior (int);
-extern CORE_ADDR default_push_arguments (int nargs, struct value ** args,
- CORE_ADDR sp, int struct_return,
- CORE_ADDR struct_addr);
+extern CORE_ADDR legacy_push_arguments (int nargs, struct value ** args,
+ CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr);
extern struct value *value_of_local (const char *name, int complain);
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index d2ac4212872..a39881f062c 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -668,12 +668,9 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_dummy_frame (gdbarch, vax_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, vax_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, vax_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_vax_call_dummy_words);
set_gdbarch_fix_call_dummy (gdbarch, vax_fix_call_dummy);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 7);
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
@@ -686,6 +683,9 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 2);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
diff --git a/gdb/version.in b/gdb/version.in
index dae81b3d271..8ba75cc4155 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-03-26-cvs
+2003-04-03-cvs
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 321d9c3fec5..5d43e015819 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1013,8 +1013,8 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
- set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, x86_64_push_arguments);
+ set_gdbarch_deprecated_push_return_address (gdbarch, x86_64_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, x86_64_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, x86_64_store_struct_return);
set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 5408a08adb2..255912b19fc 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1084,24 +1084,17 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Call Dummies
*
* These values and methods are used when gdb calls a target function. */
- set_gdbarch_push_return_address (gdbarch, xstormy16_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, xstormy16_push_return_address);
set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value);
- set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments);
+ set_gdbarch_deprecated_push_arguments (gdbarch, xstormy16_push_arguments);
set_gdbarch_deprecated_pop_frame (gdbarch, xstormy16_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, xstormy16_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch,
xstormy16_use_struct_convention);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_breakpoint_from_pc (gdbarch, xstormy16_breakpoint_from_pc);
set_gdbarch_char_signed (gdbarch, 0);
@@ -1122,6 +1115,9 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_in_solib_call_trampoline (gdbarch,
xstormy16_in_solib_call_trampoline);
+ /* Should be using push_dummy_call. */
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+
return gdbarch;
}