binutils-gdb/gdb/testsuite/gdb.mi/mi2-var-child.exp

1325 lines
47 KiB
Plaintext
Raw Normal View History

# Copyright 1999-2017 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
#
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
gdb_exit
if [mi_gdb_start] {
continue
}
* gdb.mi/dw2-ref-missing-frame.exp: Use standard_testfile, standard_output_file. * gdb.mi/gdb2549.exp: Use standard_testfile. * gdb.mi/gdb669.exp: Use standard_testfile. * gdb.mi/gdb701.exp: Use standard_testfile. * gdb.mi/gdb792.exp: Use standard_testfile. * gdb.mi/mi-async.exp: Use standard_testfile. * gdb.mi/mi-basics.exp: Use standard_testfile. * gdb.mi/mi-break.exp: Use standard_testfile. * gdb.mi/mi-cli.exp: Use standard_testfile. * gdb.mi/mi-console.exp: Use standard_testfile. * gdb.mi/mi-disassemble.exp: Use standard_testfile. * gdb.mi/mi-eval.exp: Use standard_testfile. * gdb.mi/mi-file-transfer.exp: Use standard_testfile. * gdb.mi/mi-file.exp: Use standard_testfile. * gdb.mi/mi-inheritance-syntax-error.exp: Use standard_testfile. * gdb.mi/mi-logging.exp: Use standard_testfile. * gdb.mi/mi-nonstop-exit.exp: Use standard_testfile. * gdb.mi/mi-nonstop.exp: Use standard_testfile. * gdb.mi/mi-ns-stale-regcache.exp: Use standard_testfile. * gdb.mi/mi-nsintrall.exp: Use standard_testfile. * gdb.mi/mi-nsmoribund.exp: Use standard_testfile. * gdb.mi/mi-nsthrexec.exp: Use standard_testfile. * gdb.mi/mi-pending.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-pthreads.exp: Use standard_testfile. * gdb.mi/mi-read-memory.exp: Use standard_testfile. * gdb.mi/mi-regs.exp: Use standard_testfile. * gdb.mi/mi-return.exp: Use standard_testfile. * gdb.mi/mi-reverse.exp: Use standard_testfile. * gdb.mi/mi-simplerun.exp: Use standard_testfile. * gdb.mi/mi-solib.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-stack.exp: Use standard_testfile. * gdb.mi/mi-stepi.exp: Use standard_testfile. * gdb.mi/mi-stepn.exp: Use standard_testfile. * gdb.mi/mi-syn-frame.exp: Use standard_testfile. * gdb.mi/mi-until.exp: Use standard_testfile. * gdb.mi/mi-var-block.exp: Use standard_testfile. * gdb.mi/mi-var-child-f.exp: Use standard_testfile. * gdb.mi/mi-var-child.exp: Use standard_testfile. * gdb.mi/mi-var-cmd.exp: Use standard_testfile. * gdb.mi/mi-var-cp.exp: Use standard_testfile. * gdb.mi/mi-var-display.exp: Use standard_testfile. * gdb.mi/mi-var-invalidate.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-var-rtti.exp: Use standard_testfile. * gdb.mi/mi-watch-nonstop.exp: Use standard_testfile. * gdb.mi/mi-watch.exp: Use standard_testfile. * gdb.mi/mi2-amd64-entry-value.exp: Use standard_testfile. * gdb.mi/mi2-basics.exp: Use standard_testfile. * gdb.mi/mi2-break.exp: Use standard_testfile. * gdb.mi/mi2-cli.exp: Use standard_testfile. * gdb.mi/mi2-console.exp: Use standard_testfile. * gdb.mi/mi2-disassemble.exp: Use standard_testfile. * gdb.mi/mi2-eval.exp: Use standard_testfile. * gdb.mi/mi2-file.exp: Use standard_testfile. * gdb.mi/mi2-pthreads.exp: Use standard_testfile. * gdb.mi/mi2-read-memory.exp: Use standard_testfile. * gdb.mi/mi2-regs.exp: Use standard_testfile. * gdb.mi/mi2-return.exp: Use standard_testfile. * gdb.mi/mi2-simplerun.exp: Use standard_testfile. * gdb.mi/mi2-stack.exp: Use standard_testfile. * gdb.mi/mi2-stepi.exp: Use standard_testfile. * gdb.mi/mi2-syn-frame.exp: Use standard_testfile. * gdb.mi/mi2-until.exp: Use standard_testfile. * gdb.mi/mi2-var-block.exp: Use standard_testfile. * gdb.mi/mi2-var-child.exp: Use standard_testfile. * gdb.mi/mi2-var-cmd.exp: Use standard_testfile. * gdb.mi/mi2-var-display.exp: Use standard_testfile. * gdb.mi/mi2-watch.exp: Use standard_testfile.
2012-07-10 17:32:52 +02:00
standard_testfile var-cmd.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
Fix more cases of improper test names I noticed more occurrences of improper test names. The rather mechanical, tedious and large patch below addresses, hopefully, most of the leftover cases. As usual, another pair of eyes is welcome to check if missed something or did an invalid substitution. This patch also fixes the prepare_for_testing calls to pass proper test names. gdb/testsuite/ChangeLog: 2016-12-23 Luis Machado <lgustavo@codesourcery.com> Fix test names for the following files: * gdb.ada/exec_changed.exp * gdb.ada/info_types.exp * gdb.arch/aarch64-atomic-inst.exp * gdb.arch/aarch64-fp.exp * gdb.arch/altivec-abi.exp * gdb.arch/altivec-regs.exp * gdb.arch/amd64-byte.exp * gdb.arch/amd64-disp-step.exp * gdb.arch/amd64-dword.exp * gdb.arch/amd64-entry-value-inline.exp * gdb.arch/amd64-entry-value-param.exp * gdb.arch/amd64-entry-value-paramref.exp * gdb.arch/amd64-entry-value.exp * gdb.arch/amd64-i386-address.exp * gdb.arch/amd64-invalid-stack-middle.exp * gdb.arch/amd64-invalid-stack-top.exp * gdb.arch/amd64-optimout-repeat.exp * gdb.arch/amd64-prologue-skip.exp * gdb.arch/amd64-prologue-xmm.exp * gdb.arch/amd64-stap-special-operands.exp * gdb.arch/amd64-stap-wrong-subexp.exp * gdb.arch/amd64-tailcall-cxx.exp * gdb.arch/amd64-tailcall-noret.exp * gdb.arch/amd64-tailcall-ret.exp * gdb.arch/amd64-tailcall-self.exp * gdb.arch/amd64-word.exp * gdb.arch/arm-bl-branch-dest.exp * gdb.arch/arm-disp-step.exp * gdb.arch/arm-neon.exp * gdb.arch/arm-single-step-kernel-helper.exp * gdb.arch/avr-flash-qualifier.exp * gdb.arch/disp-step-insn-reloc.exp * gdb.arch/e500-abi.exp * gdb.arch/e500-regs.exp * gdb.arch/ftrace-insn-reloc.exp * gdb.arch/i386-avx512.exp * gdb.arch/i386-bp_permanent.exp * gdb.arch/i386-byte.exp * gdb.arch/i386-cfi-notcurrent.exp * gdb.arch/i386-disp-step.exp * gdb.arch/i386-dr3-watch.exp * gdb.arch/i386-float.exp * gdb.arch/i386-gnu-cfi.exp * gdb.arch/i386-mpx-map.exp * gdb.arch/i386-mpx-sigsegv.exp * gdb.arch/i386-mpx-simple_segv.exp * gdb.arch/i386-mpx.exp * gdb.arch/i386-permbkpt.exp * gdb.arch/i386-prologue.exp * gdb.arch/i386-signal.exp * gdb.arch/i386-size-overlap.exp * gdb.arch/i386-unwind.exp * gdb.arch/i386-word.exp * gdb.arch/mips-fcr.exp * gdb.arch/powerpc-d128-regs.exp * gdb.arch/powerpc-stackless.exp * gdb.arch/ppc64-atomic-inst.exp * gdb.arch/s390-stackless.exp * gdb.arch/s390-tdbregs.exp * gdb.arch/s390-vregs.exp * gdb.arch/sparc-sysstep.exp * gdb.arch/thumb-bx-pc.exp * gdb.arch/thumb-singlestep.exp * gdb.arch/thumb2-it.exp * gdb.arch/vsx-regs.exp * gdb.asm/asm-source.exp * gdb.base/a2-run.exp * gdb.base/advance.exp * gdb.base/all-bin.exp * gdb.base/anon.exp * gdb.base/args.exp * gdb.base/arithmet.exp * gdb.base/async-shell.exp * gdb.base/async.exp * gdb.base/attach-pie-noexec.exp * gdb.base/attach-twice.exp * gdb.base/auto-load.exp * gdb.base/bang.exp * gdb.base/bitfields.exp * gdb.base/break-always.exp * gdb.base/break-caller-line.exp * gdb.base/break-entry.exp * gdb.base/break-inline.exp * gdb.base/break-on-linker-gcd-function.exp * gdb.base/break-probes.exp * gdb.base/break.exp * gdb.base/breakpoint-shadow.exp * gdb.base/call-ar-st.exp * gdb.base/call-sc.exp * gdb.base/call-signal-resume.exp * gdb.base/call-strs.exp * gdb.base/callfuncs.exp * gdb.base/catch-fork-static.exp * gdb.base/catch-gdb-caused-signals.exp * gdb.base/catch-load.exp * gdb.base/catch-signal-fork.exp * gdb.base/catch-signal.exp * gdb.base/catch-syscall.exp * gdb.base/charset.exp * gdb.base/checkpoint.exp * gdb.base/chng-syms.exp * gdb.base/code-expr.exp * gdb.base/code_elim.exp * gdb.base/commands.exp * gdb.base/completion.exp * gdb.base/complex.exp * gdb.base/cond-expr.exp * gdb.base/condbreak.exp * gdb.base/consecutive.exp * gdb.base/continue-all-already-running.exp * gdb.base/coredump-filter.exp * gdb.base/corefile.exp * gdb.base/dbx.exp * gdb.base/debug-expr.exp * gdb.base/define.exp * gdb.base/del.exp * gdb.base/disabled-location.exp * gdb.base/disasm-end-cu.exp * gdb.base/disasm-optim.exp * gdb.base/display.exp * gdb.base/duplicate-bp.exp * gdb.base/ena-dis-br.exp * gdb.base/ending-run.exp * gdb.base/enumval.exp * gdb.base/environ.exp * gdb.base/eu-strip-infcall.exp * gdb.base/eval-avoid-side-effects.exp * gdb.base/eval-skip.exp * gdb.base/exitsignal.exp * gdb.base/expand-psymtabs.exp * gdb.base/filesym.exp * gdb.base/find-unmapped.exp * gdb.base/finish.exp * gdb.base/float.exp * gdb.base/foll-exec-mode.exp * gdb.base/foll-exec.exp * gdb.base/foll-fork.exp * gdb.base/fortran-sym-case.exp * gdb.base/freebpcmd.exp * gdb.base/func-ptr.exp * gdb.base/func-ptrs.exp * gdb.base/funcargs.exp * gdb.base/gcore-buffer-overflow.exp * gdb.base/gcore-relro-pie.exp * gdb.base/gcore-relro.exp * gdb.base/gcore.exp * gdb.base/gdb1090.exp * gdb.base/gdb11530.exp * gdb.base/gdb11531.exp * gdb.base/gdb1821.exp * gdb.base/gdbindex-stabs.exp * gdb.base/gdbvars.exp * gdb.base/hbreak.exp * gdb.base/hbreak2.exp * gdb.base/included.exp * gdb.base/infcall-input.exp * gdb.base/inferior-died.exp * gdb.base/infnan.exp * gdb.base/info-macros.exp * gdb.base/info-os.exp * gdb.base/info-proc.exp * gdb.base/info-shared.exp * gdb.base/info-target.exp * gdb.base/infoline.exp * gdb.base/interp.exp * gdb.base/interrupt.exp * gdb.base/jit-reader.exp * gdb.base/jit-simple.exp * gdb.base/kill-after-signal.exp * gdb.base/kill-detach-inferiors-cmd.exp * gdb.base/label.exp * gdb.base/langs.exp * gdb.base/ldbl_e308.exp * gdb.base/line-symtabs.exp * gdb.base/linespecs.exp * gdb.base/list.exp * gdb.base/long_long.exp * gdb.base/longest-types.exp * gdb.base/maint.exp * gdb.base/max-value-size.exp * gdb.base/memattr.exp * gdb.base/mips_pro.exp * gdb.base/morestack.exp * gdb.base/moribund-step.exp * gdb.base/multi-forks.exp * gdb.base/nested-addr.exp * gdb.base/nextoverexit.exp * gdb.base/noreturn-finish.exp * gdb.base/noreturn-return.exp * gdb.base/nostdlib.exp * gdb.base/offsets.exp * gdb.base/opaque.exp * gdb.base/pc-fp.exp * gdb.base/permissions.exp * gdb.base/print-symbol-loading.exp * gdb.base/prologue-include.exp * gdb.base/psymtab.exp * gdb.base/ptype.exp * gdb.base/random-signal.exp * gdb.base/randomize.exp * gdb.base/range-stepping.exp * gdb.base/readline-ask.exp * gdb.base/recpar.exp * gdb.base/recurse.exp * gdb.base/relational.exp * gdb.base/restore.exp * gdb.base/return-nodebug.exp * gdb.base/return.exp * gdb.base/run-after-attach.exp * gdb.base/save-bp.exp * gdb.base/scope.exp * gdb.base/sect-cmd.exp * gdb.base/set-lang-auto.exp * gdb.base/set-noassign.exp * gdb.base/setvar.exp * gdb.base/sigall.exp * gdb.base/sigbpt.exp * gdb.base/siginfo-addr.exp * gdb.base/siginfo-infcall.exp * gdb.base/siginfo-obj.exp * gdb.base/siginfo.exp * gdb.base/signals-state-child.exp * gdb.base/signest.exp * gdb.base/sigstep.exp * gdb.base/sizeof.exp * gdb.base/skip.exp * gdb.base/solib-corrupted.exp * gdb.base/solib-nodir.exp * gdb.base/solib-search.exp * gdb.base/stack-checking.exp * gdb.base/stale-infcall.exp * gdb.base/stap-probe.exp * gdb.base/start.exp * gdb.base/step-break.exp * gdb.base/step-bt.exp * gdb.base/step-line.exp * gdb.base/step-over-exit.exp * gdb.base/step-over-syscall.exp * gdb.base/step-resume-infcall.exp * gdb.base/step-test.exp * gdb.base/store.exp * gdb.base/structs3.exp * gdb.base/sym-file.exp * gdb.base/symbol-without-target_section.exp * gdb.base/term.exp * gdb.base/testenv.exp * gdb.base/ui-redirect.exp * gdb.base/until.exp * gdb.base/unwindonsignal.exp * gdb.base/value-double-free.exp * gdb.base/vla-datatypes.exp * gdb.base/vla-ptr.exp * gdb.base/vla-sideeffect.exp * gdb.base/volatile.exp * gdb.base/watch-cond-infcall.exp * gdb.base/watch-cond.exp * gdb.base/watch-non-mem.exp * gdb.base/watch-read.exp * gdb.base/watch-vfork.exp * gdb.base/watchpoint-cond-gone.exp * gdb.base/watchpoint-delete.exp * gdb.base/watchpoint-hw-hit-once.exp * gdb.base/watchpoint-hw.exp * gdb.base/watchpoint-stops-at-right-insn.exp * gdb.base/watchpoints.exp * gdb.base/wchar.exp * gdb.base/whatis-exp.exp * gdb.btrace/buffer-size.exp * gdb.btrace/data.exp * gdb.btrace/delta.exp * gdb.btrace/dlopen.exp * gdb.btrace/enable.exp * gdb.btrace/exception.exp * gdb.btrace/function_call_history.exp * gdb.btrace/gcore.exp * gdb.btrace/instruction_history.exp * gdb.btrace/nohist.exp * gdb.btrace/reconnect.exp * gdb.btrace/record_goto-step.exp * gdb.btrace/record_goto.exp * gdb.btrace/rn-dl-bind.exp * gdb.btrace/segv.exp * gdb.btrace/step.exp * gdb.btrace/stepi.exp * gdb.btrace/tailcall-only.exp * gdb.btrace/tailcall.exp * gdb.btrace/tsx.exp * gdb.btrace/unknown_functions.exp * gdb.btrace/vdso.exp * gdb.compile/compile-ifunc.exp * gdb.compile/compile-ops.exp * gdb.compile/compile-print.exp * gdb.compile/compile-setjmp.exp * gdb.cp/abstract-origin.exp * gdb.cp/ambiguous.exp * gdb.cp/annota2.exp * gdb.cp/annota3.exp * gdb.cp/anon-ns.exp * gdb.cp/anon-struct.exp * gdb.cp/anon-union.exp * gdb.cp/arg-reference.exp * gdb.cp/baseenum.exp * gdb.cp/bool.exp * gdb.cp/breakpoint.exp * gdb.cp/bs15503.exp * gdb.cp/call-c.exp * gdb.cp/casts.exp * gdb.cp/chained-calls.exp * gdb.cp/class2.exp * gdb.cp/classes.exp * gdb.cp/cmpd-minsyms.exp * gdb.cp/converts.exp * gdb.cp/cp-relocate.exp * gdb.cp/cpcompletion.exp * gdb.cp/cpexprs.exp * gdb.cp/cplabel.exp * gdb.cp/cplusfuncs.exp * gdb.cp/cpsizeof.exp * gdb.cp/ctti.exp * gdb.cp/derivation.exp * gdb.cp/destrprint.exp * gdb.cp/dispcxx.exp * gdb.cp/enum-class.exp * gdb.cp/exception.exp * gdb.cp/exceptprint.exp * gdb.cp/expand-psymtabs-cxx.exp * gdb.cp/expand-sals.exp * gdb.cp/extern-c.exp * gdb.cp/filename.exp * gdb.cp/formatted-ref.exp * gdb.cp/fpointer.exp * gdb.cp/gdb1355.exp * gdb.cp/gdb2495.exp * gdb.cp/hang.exp * gdb.cp/impl-this.exp * gdb.cp/infcall-dlopen.exp * gdb.cp/inherit.exp * gdb.cp/iostream.exp * gdb.cp/koenig.exp * gdb.cp/local.exp * gdb.cp/m-data.exp * gdb.cp/m-static.exp * gdb.cp/mb-ctor.exp * gdb.cp/mb-inline.exp * gdb.cp/mb-templates.exp * gdb.cp/member-name.exp * gdb.cp/member-ptr.exp * gdb.cp/meth-typedefs.exp * gdb.cp/method.exp * gdb.cp/method2.exp * gdb.cp/minsym-fallback.exp * gdb.cp/misc.exp * gdb.cp/namelessclass.exp * gdb.cp/namespace-enum.exp * gdb.cp/namespace-nested-import.exp * gdb.cp/namespace.exp * gdb.cp/nextoverthrow.exp * gdb.cp/no-dmgl-verbose.exp * gdb.cp/non-trivial-retval.exp * gdb.cp/noparam.exp * gdb.cp/nsdecl.exp * gdb.cp/nsimport.exp * gdb.cp/nsnested.exp * gdb.cp/nsnoimports.exp * gdb.cp/nsrecurs.exp * gdb.cp/nsstress.exp * gdb.cp/nsusing.exp * gdb.cp/operator.exp * gdb.cp/oranking.exp * gdb.cp/overload-const.exp * gdb.cp/overload.exp * gdb.cp/ovldbreak.exp * gdb.cp/ovsrch.exp * gdb.cp/paren-type.exp * gdb.cp/parse-lang.exp * gdb.cp/pass-by-ref.exp * gdb.cp/pr-1023.exp * gdb.cp/pr-1210.exp * gdb.cp/pr-574.exp * gdb.cp/pr10687.exp * gdb.cp/pr12028.exp * gdb.cp/pr17132.exp * gdb.cp/pr17494.exp * gdb.cp/pr9067.exp * gdb.cp/pr9167.exp * gdb.cp/pr9631.exp * gdb.cp/printmethod.exp * gdb.cp/psmang.exp * gdb.cp/psymtab-parameter.exp * gdb.cp/ptype-cv-cp.exp * gdb.cp/ptype-flags.exp * gdb.cp/re-set-overloaded.exp * gdb.cp/ref-types.exp * gdb.cp/rtti.exp * gdb.cp/scope-err.exp * gdb.cp/shadow.exp * gdb.cp/smartp.exp * gdb.cp/static-method.exp * gdb.cp/static-print-quit.exp * gdb.cp/temargs.exp * gdb.cp/templates.exp * gdb.cp/try_catch.exp * gdb.cp/typedef-operator.exp * gdb.cp/typeid.exp * gdb.cp/userdef.exp * gdb.cp/using-crash.exp * gdb.cp/var-tag.exp * gdb.cp/virtbase.exp * gdb.cp/virtfunc.exp * gdb.cp/virtfunc2.exp * gdb.cp/vla-cxx.exp * gdb.disasm/t01_mov.exp * gdb.disasm/t02_mova.exp * gdb.disasm/t03_add.exp * gdb.disasm/t04_sub.exp * gdb.disasm/t05_cmp.exp * gdb.disasm/t06_ari2.exp * gdb.disasm/t07_ari3.exp * gdb.disasm/t08_or.exp * gdb.disasm/t09_xor.exp * gdb.disasm/t10_and.exp * gdb.disasm/t11_logs.exp * gdb.disasm/t12_bit.exp * gdb.disasm/t13_otr.exp * gdb.dlang/circular.exp * gdb.dwarf2/arr-stride.exp * gdb.dwarf2/arr-subrange.exp * gdb.dwarf2/atomic-type.exp * gdb.dwarf2/bad-regnum.exp * gdb.dwarf2/bitfield-parent-optimized-out.exp * gdb.dwarf2/callframecfa.exp * gdb.dwarf2/clztest.exp * gdb.dwarf2/corrupt.exp * gdb.dwarf2/data-loc.exp * gdb.dwarf2/dup-psym.exp * gdb.dwarf2/dw2-anon-mptr.exp * gdb.dwarf2/dw2-anonymous-func.exp * gdb.dwarf2/dw2-bad-mips-linkage-name.exp * gdb.dwarf2/dw2-bad-unresolved.exp * gdb.dwarf2/dw2-basic.exp * gdb.dwarf2/dw2-canonicalize-type.exp * gdb.dwarf2/dw2-case-insensitive.exp * gdb.dwarf2/dw2-common-block.exp * gdb.dwarf2/dw2-compdir-oldgcc.exp * gdb.dwarf2/dw2-compressed.exp * gdb.dwarf2/dw2-const.exp * gdb.dwarf2/dw2-cp-infcall-ref-static.exp * gdb.dwarf2/dw2-cu-size.exp * gdb.dwarf2/dw2-dup-frame.exp * gdb.dwarf2/dw2-entry-value.exp * gdb.dwarf2/dw2-icycle.exp * gdb.dwarf2/dw2-ifort-parameter.exp * gdb.dwarf2/dw2-inline-break.exp * gdb.dwarf2/dw2-inline-param.exp * gdb.dwarf2/dw2-intercu.exp * gdb.dwarf2/dw2-intermix.exp * gdb.dwarf2/dw2-lexical-block-bare.exp * gdb.dwarf2/dw2-linkage-name-trust.exp * gdb.dwarf2/dw2-minsym-in-cu.exp * gdb.dwarf2/dw2-noloc.exp * gdb.dwarf2/dw2-op-call.exp * gdb.dwarf2/dw2-op-out-param.exp * gdb.dwarf2/dw2-opt-structptr.exp * gdb.dwarf2/dw2-param-error.exp * gdb.dwarf2/dw2-producer.exp * gdb.dwarf2/dw2-ranges-base.exp * gdb.dwarf2/dw2-ref-missing-frame.exp * gdb.dwarf2/dw2-reg-undefined.exp * gdb.dwarf2/dw2-regno-invalid.exp * gdb.dwarf2/dw2-restore.exp * gdb.dwarf2/dw2-restrict.exp * gdb.dwarf2/dw2-single-line-discriminators.exp * gdb.dwarf2/dw2-strp.exp * gdb.dwarf2/dw2-undefined-ret-addr.exp * gdb.dwarf2/dw2-unresolved.exp * gdb.dwarf2/dw2-var-zero-addr.exp * gdb.dwarf2/dw4-sig-types.exp * gdb.dwarf2/dwz.exp * gdb.dwarf2/dynarr-ptr.exp * gdb.dwarf2/enum-type.exp * gdb.dwarf2/gdb-index.exp * gdb.dwarf2/implptr-64bit.exp * gdb.dwarf2/implptr-optimized-out.exp * gdb.dwarf2/implptr.exp * gdb.dwarf2/implref-array.exp * gdb.dwarf2/implref-const.exp * gdb.dwarf2/implref-global.exp * gdb.dwarf2/implref-struct.exp * gdb.dwarf2/mac-fileno.exp * gdb.dwarf2/main-subprogram.exp * gdb.dwarf2/member-ptr-forwardref.exp * gdb.dwarf2/method-ptr.exp * gdb.dwarf2/missing-sig-type.exp * gdb.dwarf2/nonvar-access.exp * gdb.dwarf2/opaque-type-lookup.exp * gdb.dwarf2/pieces-optimized-out.exp * gdb.dwarf2/pieces.exp * gdb.dwarf2/pr10770.exp * gdb.dwarf2/pr13961.exp * gdb.dwarf2/staticvirtual.exp * gdb.dwarf2/subrange.exp * gdb.dwarf2/symtab-producer.exp * gdb.dwarf2/trace-crash.exp * gdb.dwarf2/typeddwarf.exp * gdb.dwarf2/valop.exp * gdb.dwarf2/watch-notconst.exp * gdb.fortran/array-element.exp * gdb.fortran/charset.exp * gdb.fortran/common-block.exp * gdb.fortran/complex.exp * gdb.fortran/derived-type-function.exp * gdb.fortran/derived-type.exp * gdb.fortran/logical.exp * gdb.fortran/module.exp * gdb.fortran/multi-dim.exp * gdb.fortran/nested-funcs.exp * gdb.fortran/print-formatted.exp * gdb.fortran/subarray.exp * gdb.fortran/vla-alloc-assoc.exp * gdb.fortran/vla-datatypes.exp * gdb.fortran/vla-history.exp * gdb.fortran/vla-ptr-info.exp * gdb.fortran/vla-ptype-sub.exp * gdb.fortran/vla-ptype.exp * gdb.fortran/vla-sizeof.exp * gdb.fortran/vla-type.exp * gdb.fortran/vla-value-sub-arbitrary.exp * gdb.fortran/vla-value-sub-finish.exp * gdb.fortran/vla-value-sub.exp * gdb.fortran/vla-value.exp * gdb.fortran/whatis_type.exp * gdb.go/chan.exp * gdb.go/handcall.exp * gdb.go/hello.exp * gdb.go/integers.exp * gdb.go/methods.exp * gdb.go/package.exp * gdb.go/strings.exp * gdb.go/types.exp * gdb.go/unsafe.exp * gdb.guile/scm-arch.exp * gdb.guile/scm-block.exp * gdb.guile/scm-breakpoint.exp * gdb.guile/scm-cmd.exp * gdb.guile/scm-disasm.exp * gdb.guile/scm-equal.exp * gdb.guile/scm-frame-args.exp * gdb.guile/scm-frame-inline.exp * gdb.guile/scm-frame.exp * gdb.guile/scm-iterator.exp * gdb.guile/scm-math.exp * gdb.guile/scm-objfile.exp * gdb.guile/scm-ports.exp * gdb.guile/scm-symbol.exp * gdb.guile/scm-symtab.exp * gdb.guile/scm-value-cc.exp * gdb.guile/types-module.exp * gdb.linespec/break-ask.exp * gdb.linespec/cpexplicit.exp * gdb.linespec/explicit.exp * gdb.linespec/keywords.exp * gdb.linespec/linespec.exp * gdb.linespec/ls-dollar.exp * gdb.linespec/ls-errs.exp * gdb.linespec/skip-two.exp * gdb.linespec/thread.exp * gdb.mi/mi-async.exp * gdb.mi/mi-basics.exp * gdb.mi/mi-break.exp * gdb.mi/mi-catch-load.exp * gdb.mi/mi-cli.exp * gdb.mi/mi-cmd-param-changed.exp * gdb.mi/mi-console.exp * gdb.mi/mi-detach.exp * gdb.mi/mi-disassemble.exp * gdb.mi/mi-eval.exp * gdb.mi/mi-file-transfer.exp * gdb.mi/mi-file.exp * gdb.mi/mi-fill-memory.exp * gdb.mi/mi-inheritance-syntax-error.exp * gdb.mi/mi-linespec-err-cp.exp * gdb.mi/mi-logging.exp * gdb.mi/mi-memory-changed.exp * gdb.mi/mi-read-memory.exp * gdb.mi/mi-record-changed.exp * gdb.mi/mi-reg-undefined.exp * gdb.mi/mi-regs.exp * gdb.mi/mi-return.exp * gdb.mi/mi-reverse.exp * gdb.mi/mi-simplerun.exp * gdb.mi/mi-solib.exp * gdb.mi/mi-stack.exp * gdb.mi/mi-stepi.exp * gdb.mi/mi-syn-frame.exp * gdb.mi/mi-until.exp * gdb.mi/mi-var-block.exp * gdb.mi/mi-var-child.exp * gdb.mi/mi-var-cmd.exp * gdb.mi/mi-var-cp.exp * gdb.mi/mi-var-display.exp * gdb.mi/mi-var-invalidate.exp * gdb.mi/mi-var-list-children-invalid-grandchild.exp * gdb.mi/mi-vla-fortran.exp * gdb.mi/mi-watch.exp * gdb.mi/mi2-var-child.exp * gdb.mi/user-selected-context-sync.exp * gdb.modula2/unbounded-array.exp * gdb.multi/dummy-frame-restore.exp * gdb.multi/multi-arch-exec.exp * gdb.multi/multi-arch.exp * gdb.multi/tids.exp * gdb.multi/watchpoint-multi.exp * gdb.opencl/callfuncs.exp * gdb.opencl/convs_casts.exp * gdb.opencl/datatypes.exp * gdb.opencl/operators.exp * gdb.opencl/vec_comps.exp * gdb.opt/clobbered-registers-O2.exp * gdb.opt/inline-break.exp * gdb.opt/inline-bt.exp * gdb.opt/inline-cmds.exp * gdb.opt/inline-locals.exp * gdb.pascal/case-insensitive-symbols.exp * gdb.pascal/floats.exp * gdb.pascal/gdb11492.exp * gdb.python/lib-types.exp * gdb.python/py-arch.exp * gdb.python/py-as-string.exp * gdb.python/py-bad-printers.exp * gdb.python/py-block.exp * gdb.python/py-breakpoint-create-fail.exp * gdb.python/py-breakpoint.exp * gdb.python/py-caller-is.exp * gdb.python/py-cmd.exp * gdb.python/py-explore-cc.exp * gdb.python/py-explore.exp * gdb.python/py-finish-breakpoint.exp * gdb.python/py-finish-breakpoint2.exp * gdb.python/py-frame-args.exp * gdb.python/py-frame-inline.exp * gdb.python/py-frame.exp * gdb.python/py-framefilter-mi.exp * gdb.python/py-infthread.exp * gdb.python/py-lazy-string.exp * gdb.python/py-linetable.exp * gdb.python/py-mi-events.exp * gdb.python/py-mi-objfile.exp * gdb.python/py-mi.exp * gdb.python/py-objfile.exp * gdb.python/py-pp-integral.exp * gdb.python/py-pp-maint.exp * gdb.python/py-pp-re-notag.exp * gdb.python/py-pp-registration.exp * gdb.python/py-recurse-unwind.exp * gdb.python/py-strfns.exp * gdb.python/py-symbol.exp * gdb.python/py-symtab.exp * gdb.python/py-sync-interp.exp * gdb.python/py-typeprint.exp * gdb.python/py-unwind-maint.exp * gdb.python/py-unwind.exp * gdb.python/py-value-cc.exp * gdb.python/py-xmethods.exp * gdb.reverse/amd64-tailcall-reverse.exp * gdb.reverse/break-precsave.exp * gdb.reverse/break-reverse.exp * gdb.reverse/consecutive-precsave.exp * gdb.reverse/consecutive-reverse.exp * gdb.reverse/finish-precsave.exp * gdb.reverse/finish-reverse-bkpt.exp * gdb.reverse/finish-reverse.exp * gdb.reverse/fstatat-reverse.exp * gdb.reverse/getresuid-reverse.exp * gdb.reverse/i386-precsave.exp * gdb.reverse/i386-reverse.exp * gdb.reverse/i386-sse-reverse.exp * gdb.reverse/i387-env-reverse.exp * gdb.reverse/i387-stack-reverse.exp * gdb.reverse/insn-reverse.exp * gdb.reverse/machinestate-precsave.exp * gdb.reverse/machinestate.exp * gdb.reverse/next-reverse-bkpt-over-sr.exp * gdb.reverse/pipe-reverse.exp * gdb.reverse/readv-reverse.exp * gdb.reverse/recvmsg-reverse.exp * gdb.reverse/rerun-prec.exp * gdb.reverse/s390-mvcle.exp * gdb.reverse/step-precsave.exp * gdb.reverse/step-reverse.exp * gdb.reverse/time-reverse.exp * gdb.reverse/until-precsave.exp * gdb.reverse/until-reverse.exp * gdb.reverse/waitpid-reverse.exp * gdb.reverse/watch-precsave.exp * gdb.reverse/watch-reverse.exp * gdb.rust/generics.exp * gdb.rust/methods.exp * gdb.rust/modules.exp * gdb.rust/simple.exp * gdb.server/connect-with-no-symbol-file.exp * gdb.server/ext-attach.exp * gdb.server/ext-restart.exp * gdb.server/ext-wrapper.exp * gdb.server/file-transfer.exp * gdb.server/server-exec-info.exp * gdb.server/server-kill.exp * gdb.server/server-mon.exp * gdb.server/wrapper.exp * gdb.stabs/exclfwd.exp * gdb.stabs/gdb11479.exp * gdb.threads/clone-new-thread-event.exp * gdb.threads/corethreads.exp * gdb.threads/current-lwp-dead.exp * gdb.threads/dlopen-libpthread.exp * gdb.threads/gcore-thread.exp * gdb.threads/sigstep-threads.exp * gdb.threads/watchpoint-fork.exp * gdb.trace/actions-changed.exp * gdb.trace/backtrace.exp * gdb.trace/change-loc.exp * gdb.trace/circ.exp * gdb.trace/collection.exp * gdb.trace/disconnected-tracing.exp * gdb.trace/ftrace.exp * gdb.trace/mi-trace-frame-collected.exp * gdb.trace/mi-trace-unavailable.exp * gdb.trace/mi-traceframe-changed.exp * gdb.trace/mi-tsv-changed.exp * gdb.trace/no-attach-trace.exp * gdb.trace/passc-dyn.exp * gdb.trace/qtro.exp * gdb.trace/range-stepping.exp * gdb.trace/read-memory.exp * gdb.trace/save-trace.exp * gdb.trace/signal.exp * gdb.trace/status-stop.exp * gdb.trace/tfile.exp * gdb.trace/trace-break.exp * gdb.trace/trace-buffer-size.exp * gdb.trace/trace-condition.exp * gdb.trace/tracefile-pseudo-reg.exp * gdb.trace/tstatus.exp * gdb.trace/unavailable.exp * gdb.trace/while-dyn.exp * gdb.trace/while-stepping.exp
2016-12-23 17:52:18 +01:00
untested "failed to compile"
* gdb.arch/altivec-abi.exp: Replace gdb_suppress_entire_file with untested followed by return combination. * gdb.arch/altivec-regs.exp: Likewise. * gdb.arch/e500-abi.exp: Likewise. * gdb.arch/e500-regs.exp: Likewise. * gdb.arch/gdb1291.exp: Likewise. * gdb.arch/gdb1431.exp: Likewise. * gdb.arch/gdb1558.exp: Likewise. * gdb.arch/i386-prologue.exp: Likewise. * gdb.arch/i386-unwind.exp: Likewise. * gdb.asm/asm-source.exp: Likewise. * gdb.base/a2-run.exp: Likewise. * gdb.base/advance.exp: Likewise. * gdb.base/all-bin.exp: Likewise. * gdb.base/annota1.exp: Likewise. * gdb.base/annota3.exp: Likewise. * gdb.base/args.exp: Likewise. * gdb.base/arithmet.exp: Likewise. * gdb.base/assign.exp: Likewise. * gdb.base/async.exp: Likewise. * gdb.base/attach.exp: Likewise. * gdb.base/bang.exp: Likewise. * gdb.base/bigcore.exp: Likewise. * gdb.base/bitfields.exp: Likewise. * gdb.base/bitfields2.exp: Likewise. * gdb.base/break.exp: Likewise. * gdb.base/call-sc.exp: Likewise. * gdb.base/call-strs.exp: Likewise. * gdb.base/callfuncs.exp: Likewise. * gdb.base/checkpoint.exp: Likewise. * gdb.base/chng-syms.exp: Likewise. * gdb.base/code-expr.exp: Likewise. * gdb.base/commands.exp: Likewise. * gdb.base/completion.exp: Likewise. * gdb.base/cond-expr.exp: Likewise. * gdb.base/condbreak.exp: Likewise. * gdb.base/consecutive.exp: Likewise. * gdb.base/constvars.exp: Likewise. * gdb.base/corefile.exp: Likewise. * gdb.base/cvexpr.exp: Likewise. * gdb.base/dbx.exp: Likewise. * gdb.base/define.exp: Likewise. * gdb.base/detach.exp: Likewise. * gdb.base/display.exp: Likewise. * gdb.base/dump.exp: Likewise. * gdb.base/ena-dis-br.exp: Likewise. * gdb.base/ending-run.exp: Likewise. * gdb.base/environ.exp: Likewise. * gdb.base/eval-skip.exp: Likewise. * gdb.base/exprs.exp: Likewise. * gdb.base/fileio.exp: Likewise. * gdb.base/finish.exp: Likewise. * gdb.base/float.exp: Likewise. * gdb.base/foll-exec.exp: Likewise. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise. * gdb.base/freebpcmd.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/gcore.exp: Likewise. * gdb.base/gdb1090.exp: Likewise. * gdb.base/gdb1250.exp: Likewise. * gdb.base/huge.exp: Likewise. * gdb.base/info-proc.exp: Likewise. * gdb.base/interrupt.exp: Likewise. * gdb.base/jump.exp: Likewise. * gdb.base/langs.exp: Likewise. * gdb.base/lineinc.exp: Likewise. * gdb.base/list.exp: Likewise. * gdb.base/logical.exp: Likewise. * gdb.base/long_long.exp: Likewise. * gdb.base/macscp.exp: Likewise. * gdb.base/maint.exp: Likewise. * gdb.base/mips_pro.exp: Likewise. * gdb.base/miscexprs.exp: Likewise. * gdb.base/multi-forks.exp: Likewise. * gdb.base/opaque.exp: Likewise. * gdb.base/overlays.exp: Likewise. * gdb.base/pc-fp.exp: Likewise. * gdb.base/pointers.exp: Likewise. * gdb.base/printcmds.exp: Likewise. * gdb.base/psymtab.exp: Likewise. * gdb.base/ptype.exp: Likewise. * gdb.base/recurse.exp: Likewise. * gdb.base/relational.exp: Likewise. * gdb.base/relocate.exp: Likewise. * gdb.base/remote.exp: Likewise. * gdb.base/reread.exp: Likewise. * gdb.base/restore.exp: Likewise. * gdb.base/return.exp: Likewise. * gdb.base/return2.exp: Likewise. * gdb.base/scope.exp: Likewise. * gdb.base/sect-cmd.exp: Likewise. * gdb.base/sep.exp: Likewise. * gdb.base/sepdebug.exp: Likewise. * gdb.base/setshow.exp: Likewise. * gdb.base/setvar.exp: Likewise. * gdb.base/sigall.exp: Likewise. * gdb.base/sigbpt.exp: Likewise. * gdb.base/signals.exp: Likewise. * gdb.base/signull.exp: Likewise. * gdb.base/sizeof.exp: Likewise. * gdb.base/solib.exp: Likewise. * gdb.base/step-line.exp: Likewise. * gdb.base/step-test.exp: Likewise. * gdb.base/structs.exp: Likewise. * gdb.base/structs2.exp: Likewise. * gdb.base/term.exp: Likewise. * gdb.base/twice.exp: Likewise. * gdb.base/until.exp: Likewise. * gdb.base/varargs.exp: Likewise. * gdb.base/volatile.exp: Likewise. * gdb.base/watchpoint.exp: Likewise. * gdb.base/whatis-exp.exp: Likewise. * gdb.base/whatis.exp: Likewise. * gdb.cp/ambiguous.exp: Likewise. * gdb.cp/annota2.exp: Likewise. * gdb.cp/annota3.exp: Likewise. * gdb.cp/bool.exp: Likewise. * gdb.cp/breakpoint.exp: Likewise. * gdb.cp/casts.exp: Likewise. * gdb.cp/class2.exp: Likewise. * gdb.cp/classes.exp: Likewise. * gdb.cp/cplusfuncs.exp: Likewise. * gdb.cp/ctti.exp: Likewise. * gdb.cp/derivation.exp: Likewise. * gdb.cp/exception.exp: Likewise. * gdb.cp/gdb1355.exp: Likewise. * gdb.cp/hang.exp: Likewise. * gdb.cp/inherit.exp: Likewise. * gdb.cp/local.exp: Likewise. * gdb.cp/m-data.exp: Likewise. * gdb.cp/m-static.exp: Likewise. * gdb.cp/member-ptr.exp: Likewise. * gdb.cp/method.exp: Likewise. * gdb.cp/misc.exp: Likewise. * gdb.cp/namespace.exp: Likewise. * gdb.cp/overload.exp: Likewise. * gdb.cp/ovldbreak.exp: Likewise. * gdb.cp/pr-1023.exp: Likewise. * gdb.cp/pr-1210.exp: Likewise. * gdb.cp/pr-574.exp: Likewise. * gdb.cp/printmethod.exp: Likewise. * gdb.cp/psmang.exp: Likewise. * gdb.cp/ref-params.exp: Likewise. * gdb.cp/ref-types.exp: Likewise. * gdb.cp/rtti.exp: Likewise. * gdb.cp/templates.exp: Likewise. * gdb.cp/try_catch.exp: Likewise. * gdb.cp/userdef.exp: Likewise. * gdb.cp/virtfunc.exp: Likewise. * gdb.disasm/am33.exp: Likewise. * gdb.disasm/h8300s.exp: Likewise. * gdb.disasm/mn10300.exp: Likewise. * gdb.disasm/sh3.exp: Likewise. * gdb.disasm/t01_mov.exp: Likewise. * gdb.disasm/t02_mova.exp: Likewise. * gdb.disasm/t03_add.exp: Likewise. * gdb.disasm/t04_sub.exp: Likewise. * gdb.disasm/t05_cmp.exp: Likewise. * gdb.disasm/t06_ari2.exp: Likewise. * gdb.disasm/t07_ari3.exp: Likewise. * gdb.disasm/t08_or.exp: Likewise. * gdb.disasm/t09_xor.exp: Likewise. * gdb.disasm/t10_and.exp: Likewise. * gdb.disasm/t11_logs.exp: Likewise. * gdb.disasm/t12_bit.exp: Likewise. * gdb.disasm/t13_otr.exp: Likewise. * gdb.hp/gdb.aCC/optimize.exp: Likewise. * gdb.hp/gdb.aCC/watch-cmd.exp: Likewise. * gdb.hp/gdb.base-hp/callfwmall.exp: Likewise. * gdb.hp/gdb.base-hp/dollar.exp: Likewise. * gdb.hp/gdb.base-hp/hwwatchbus.exp: Likewise. * gdb.hp/gdb.base-hp/pxdb.exp: Likewise. * gdb.hp/gdb.base-hp/reg-pa64.exp: Likewise. * gdb.hp/gdb.base-hp/reg.exp: Likewise. * gdb.hp/gdb.base-hp/sized-enum.exp: Likewise. * gdb.hp/gdb.compat/xdb1.exp: Likewise. * gdb.hp/gdb.compat/xdb3.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg01.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg02.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg03.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg04.exp: Likewise. * gdb.mi/gdb701.exp: Likewise. * gdb.mi/gdb792.exp: Likewise. * gdb.mi/mi-basics.exp: Likewise. * gdb.mi/mi-break.exp: Likewise. * gdb.mi/mi-cli.exp: Likewise. * gdb.mi/mi-console.exp: Likewise. * gdb.mi/mi-disassemble.exp: Likewise. * gdb.mi/mi-eval.exp: Likewise. * gdb.mi/mi-file.exp: Likewise. * gdb.mi/mi-read-memory.exp: Likewise. * gdb.mi/mi-regs.exp: Likewise. * gdb.mi/mi-return.exp: Likewise. * gdb.mi/mi-simplerun.exp: Likewise. * gdb.mi/mi-stack.exp: Likewise. * gdb.mi/mi-stepi.exp: Likewise. * gdb.mi/mi-syn-frame.exp: Likewise. * gdb.mi/mi-until.exp: Likewise. * gdb.mi/mi-var-block.exp: Likewise. * gdb.mi/mi-var-child.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi-watch.exp: Likewise. * gdb.mi/mi2-basics.exp: Likewise. * gdb.mi/mi2-break.exp: Likewise. * gdb.mi/mi2-cli.exp: Likewise. * gdb.mi/mi2-console.exp: Likewise. * gdb.mi/mi2-disassemble.exp: Likewise. * gdb.mi/mi2-eval.exp: Likewise. * gdb.mi/mi2-file.exp: Likewise. * gdb.mi/mi2-read-memory.exp: Likewise. * gdb.mi/mi2-regs.exp: Likewise. * gdb.mi/mi2-return.exp: Likewise. * gdb.mi/mi2-simplerun.exp: Likewise. * gdb.mi/mi2-stack.exp: Likewise. * gdb.mi/mi2-stepi.exp: Likewise. * gdb.mi/mi2-syn-frame.exp: Likewise. * gdb.mi/mi2-until.exp: Likewise. * gdb.mi/mi2-var-block.exp: Likewise. * gdb.mi/mi2-var-child.exp: Likewise. * gdb.mi/mi2-var-cmd.exp: Likewise. * gdb.mi/mi2-var-display.exp: Likewise. * gdb.mi/mi2-watch.exp: Likewise. * gdb.stabs/exclfwd.exp: Likewise. * gdb.stabs/weird.exp: Likewise. * gdb.threads/gcore-thread.exp: Likewise. * gdb.trace/actions.exp: Likewise. * gdb.trace/backtrace.exp: Likewise. * gdb.trace/circ.exp: Likewise. * gdb.trace/collection.exp: Likewise. * gdb.trace/deltrace.exp: Likewise. * gdb.trace/infotrace.exp: Likewise. * gdb.trace/limits.exp: Likewise. * gdb.trace/packetlen.exp: Likewise. * gdb.trace/passc-dyn.exp: Likewise. * gdb.trace/passcount.exp: Likewise. * gdb.trace/report.exp: Likewise. * gdb.trace/save-trace.exp: Likewise. * gdb.trace/tfind.exp: Likewise. * gdb.trace/tracecmd.exp: Likewise. * gdb.trace/while-dyn.exp: Likewise. * gdb.trace/while-stepping.exp: Likewise.
2006-08-10 07:27:22 +02:00
return -1
}
mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
mi_runto do_children_tests
set line_dlt_first_real [gdb_get_line_number "weird = &struct_declarations;"]
mi_continue_to_line $line_dlt_first_real "step to real start of do_children_test"
##### #####
# #
# children tests #
# #
##### #####
# Test: c_variable-4.2
# Desc: create variable "struct_declarations"
mi_create_varobj "struct_declarations" "struct_declarations" \
"create local variable struct_declarations"
# Test: c_variable-4.3
# Desc: children of struct_declarations
# STABS doesn't give us argument types for the func ptr structs, but
# Dwarf 2 does.
mi_list_varobj_children "struct_declarations" {
{struct_declarations.integer integer 0 int}
{struct_declarations.character character 0 char}
{struct_declarations.char_ptr char_ptr 1 "char \\*"}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{struct_declarations.long_int long_int 0 "long"}
{struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{struct_declarations.long_array long_array 10 "long \\[10\\]"}
{struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"}
{struct_declarations.func_ptr_struct func_ptr_struct 0 \
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
"struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"}
{struct_declarations.func_ptr_ptr func_ptr_ptr 0 \
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"}
{struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"}
{struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"}
} "get children of struct_declarations"
#gdbtk_test c_variable-4.3 {children of struct_declarations} {
# get_children struct_declarations
#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
# Test: c_variable-4.4
# Desc: number of children of struct_declarations
mi_gdb_test "-var-info-num-children struct_declarations" \
"\\^done,numchild=\"11\"" \
"get number of children of struct_declarations"
# Test: c_variable-4.5
# Desc: children of struct_declarations.integer
mi_list_varobj_children "struct_declarations.integer" {} \
"get children of struct_declarations.integer"
# Test: c_variable-4.6
# Desc: number of children of struct_declarations.integer
mi_gdb_test "-var-info-num-children struct_declarations.integer" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.integer"
# Test: c_variable-4.7
# Desc: children of struct_declarations.character
mi_list_varobj_children "struct_declarations.character" {} \
"get children of struct_declarations.character"
# Test: c_variable-4.8
# Desc: number of children of struct_declarations.character
mi_gdb_test "-var-info-num-children struct_declarations.character" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.character"
# Test: c_variable-4.9
# Desc: children of struct_declarations.char_ptr
mi_list_varobj_children "struct_declarations.char_ptr" {
{{struct_declarations.char_ptr.\*char_ptr} {\*char_ptr} 0 char}
} "get children of struct_declarations.char_ptr"
# Test: c_variable-4.10
# Desc: number of children of struct_declarations.char_ptr
mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of struct_declarations.char_ptr"
# Test: c_variable-4.11
# Desc: children of struct_declarations.long_int
mi_list_varobj_children "struct_declarations.long_int" {} \
"get children of struct_declarations.long_int"
# Test: c_variable-4.12
# Desc: number of children of struct_declarations.long_int
mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.long_int"
# Test: c_variable-4.13
# Desc: children of int_ptr_ptr
mi_list_varobj_children "struct_declarations.int_ptr_ptr" {
{{struct_declarations.int_ptr_ptr.\*int_ptr_ptr} {\*int_ptr_ptr} 1 {int \*}}
} "get children of struct_declarations.int_ptr_ptr"
#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
# get_children struct_declarations.int_ptr_ptr
#} {*int_ptr_ptr}
# Test: c_variable-4.14
# Desc: number of children of int_ptr_ptr
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of struct_declarations.int_ptr_ptr"
# Test: c_variable-4.15
# Desc: children of struct_declarations.long_array
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
mi_list_array_varobj_children "struct_declarations.long_array" 10 "long" \
"get children of struct_declarations.long_array"
# Test: c_variable-4.16
# Desc: number of children of struct_declarations.long_array
mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
"\\^done,numchild=\"10\"" \
"get number of children of struct_declarations.long_array"
# Test: c_variable-4.17
# Desc: children of struct_declarations.func_ptr
mi_list_varobj_children "struct_declarations.func_ptr" {} \
"get children of struct_declarations.func_ptr"
# Test: c_variable-4.18
# Desc: number of children of struct_declarations.func_ptr
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.func_ptr"
# Test: c_variable-4.19
# Desc: children of struct_declarations.func_ptr_struct
mi_list_varobj_children "struct_declarations.func_ptr_struct" {} \
"get children of struct_declarations.func_ptr_struct"
# Test: c_variable-4.20
# Desc: number of children of struct_declarations.func_ptr_struct
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.func_ptr_struct"
# Test: c_variable-4.21
# Desc: children of struct_declarations.func_ptr_ptr
mi_list_varobj_children "struct_declarations.func_ptr_ptr" {} \
"get children of struct_declarations.func_ptr_ptr"
# Test: c_variable-4.22
# Desc: number of children of struct_declarations.func_ptr_ptr
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.func_ptr_ptr"
# Test: c_variable-4.23
# Desc: children of struct_declarations.u1
mi_list_varobj_children "struct_declarations.u1" {
{struct_declarations.u1.a a 0 int}
{struct_declarations.u1.b b 1 {char \*}}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{struct_declarations.u1.c c 0 {long}}
{struct_declarations.u1.d d 0 {enum foo}}
} "get children of struct_declarations.u1"
# Test: c_variable-4.24
# Desc: number of children of struct_declarations.u1
mi_gdb_test "-var-info-num-children struct_declarations.u1" \
"\\^done,numchild=\"4\"" \
"get number of children of struct_declarations.u1"
# Test: c_variable-4.25
# Desc: children of struct_declarations.s2
mi_list_varobj_children "struct_declarations.s2" {
{struct_declarations.s2.u2 u2 3 {union \{\.\.\.\}}}
{struct_declarations.s2.g g 0 int}
{struct_declarations.s2.h h 0 char}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{struct_declarations.s2.i i 10 {long \[10\]}}
} "get children of struct_declarations.s2"
#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
# get_children struct_declarations.s2
#} {u2 g h i}
# Test: c_variable-4.26
# Desc: number of children of struct_declarations.s2
mi_gdb_test "-var-info-num-children struct_declarations.s2" \
"\\^done,numchild=\"4\"" \
"get number of children of struct_declarations.s2"
for {set i 1} {$i <= 9} {incr i} {
mi_list_varobj_children "struct_declarations.long_array.$i" {} \
"get children of struct_declarations.long_array.$i"
mi_gdb_test "-var-info-num-children struct_declarations.long_array.$i" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.long_array.$i"
}
# Test: c_variable-4.45
# Desc: children of struct_declarations.u1.a
mi_list_varobj_children "struct_declarations.u1.a" {} \
"get children of struct_declarations.u1.a"
# Test: c_variable-4.46
# Desc: number of children of struct_declarations.u1.a
mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.u1.a"
# Test: c_variable-4.47
# Desc: children of struct_declarations.u1.b
mi_list_varobj_children "struct_declarations.u1.b" {
{{struct_declarations.u1.b.\*b} {\*b} 0 char}
} "get children of struct_declarations.u1.b"
# Test: c_variable-4.48
# Desc: number of children of struct_declarations.u1.b
mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
"\\^done,numchild=\"1\"" \
"get number of children of struct_declarations.u1.b"
# Test: c_variable-4.49
# Desc: children of struct_declarations.u1.c
mi_list_varobj_children "struct_declarations.u1.c" {} \
"get children of struct_declarations.u1.c"
# Test: c_variable-4.50
# Desc: number of children of struct_declarations.u1.c
mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.u1.c"
# Test: c_variable-4.51
# Desc: children of struct_declarations.u1.d
mi_list_varobj_children "struct_declarations.u1.d" {} \
"get children of struct_declarations.u1.d"
# Test: c_variable-4.52
# Desc: number of children of struct_declarations.u1.d
mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.u1.d"
# Test: c_variable-4.53
# Desc: children of struct_declarations.s2.u2
mi_list_varobj_children "struct_declarations.s2.u2" {
{"struct_declarations.s2.u2.u1s1" "u1s1" 4 {struct \{\.\.\.\}}}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{struct_declarations.s2.u2.f f 0 "long"}
{struct_declarations.s2.u2.u1s2 u1s2 2 {struct \{\.\.\.\}}}
} "get children of struct_declarations.s2.u2"
# Test: c_variable-4.54
# Desc: number of children of struct_declarations.s2.u2
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
"\\^done,numchild=\"3\"" \
"get number of children of struct_declarations.s2.u2"
# Test: c_variable-4.55
# Desc: children of struct_declarations.s2.g
mi_list_varobj_children struct_declarations.s2.g {} \
"get children of struct_declarations.s2.g"
# Test: c_variable-4.56
# Desc: number of children of struct_declarations.s2.g
mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.g"
# Test: c_variable-4.57
# Desc: children of struct_declarations.s2.h
mi_list_varobj_children struct_declarations.s2.h {} \
"get children of struct_declarations.s2.h"
# Test: c_variable-4.58
# Desc: number of children of struct_declarations.s2.h
mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.h"
# Test: c_variable-4.59
# Desc: children of struct_declarations.s2.i
set t {}
for {set i 0} {$i < 10} {incr i} {
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
lappend t [list struct_declarations.s2.i.$i $i 0 "long"]
}
mi_list_varobj_children struct_declarations.s2.i $t \
"get children of struct_declarations.s2.i"
# Test: c_variable-4.60
# Desc: number of children of struct_declarations.s2.i
mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
"\\^done,numchild=\"10\"" \
"get number of children of struct_declarations.s2.i"
# Test: c_variable-4.61
# Desc: children of struct_declarations.s2.u2.u1s1
mi_list_varobj_children struct_declarations.s2.u2.u1s1 {
{struct_declarations.s2.u2.u1s1.d d 0 int}
{struct_declarations.s2.u2.u1s1.e e 10 {char \[10\]}}
{struct_declarations.s2.u2.u1s1.func func 0 {int \*\(\*\)\((void)?\)}}
{struct_declarations.s2.u2.u1s1.foo foo 0 efoo}
} "get children of struct_declarations.s2.u2.u1s1"
# Test: c_variable-4.62
# Desc: number of children of struct_declarations.s2.u2.u1s1
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
"\\^done,numchild=\"4\"" \
"get number of children of struct_declarations.s2.u2.u1s1"
# Test: c_variable-4.63
# Desc: children of struct_declarations.s2.u2.f
mi_list_varobj_children struct_declarations.s2.u2.f {} \
"get children of struct_declarations.s2.u2.f"
# Test: c_variable-4.64
# Desc: number of children of struct_declarations.s2.u2.f
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.u2.f"
# Test: c_variable-4.65
# Desc: children of struct_declarations.s2.u2.u1s2
mi_list_varobj_children struct_declarations.s2.u2.u1s2 {
{struct_declarations.s2.u2.u1s2.array_ptr array_ptr 2 {char \[2\]}}
{struct_declarations.s2.u2.u1s2.func func 0 {int \(\*\)\((int, char \*)?\)}}
} "get children of struct_declarations.s2.u2.u1s2"
# Test: c_variable-4.66
# Desc: number of children of struct_declarations.s2.u2.u1s2
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
"\\^done,numchild=\"2\"" \
"get number of children of struct_declarations.s2.u2.u1s2"
# Test: c_variable-4.67
# Desc: children of struct_declarations.s2.u2.u1s1.d
mi_list_varobj_children struct_declarations.s2.u2.u1s1.d {} \
"get children of struct_declarations.s2.u2.u1s1.d"
# Test: c_variable-4.68
# Desc: number of children of struct_declarations.s2.u2.u1s1.d
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.u2.u1s1.d"
# Test: c_variable-4.69
# Desc: children of struct_declarations.s2.u2.u1s1.e
set t {}
for {set i 0} {$i < 10} {incr i} {
lappend t [list struct_declarations.s2.u2.u1s1.e.$i $i 0 char]
}
mi_list_varobj_children struct_declarations.s2.u2.u1s1.e $t \
"get children of struct_declarations.s2.u2.u1s1.e"
# Test: c_variable-4.70
# Desc: number of children of struct_declarations.s2.u2.u1s1.e
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
"\\^done,numchild=\"10\"" \
"get number of children of struct_declarations.s2.u2.u1s1.e"
# Test: c_variable-4.71
# Desc: children of struct_declarations.s2.u2.u1s1.func
mi_list_varobj_children struct_declarations.s2.u2.u1s1.func {} \
"get children of struct_declarations.s2.u2.u1s1.func"
# Test: c_variable-4.72
# Desc: number of children of struct_declarations.s2.u2.u1s1.func
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.u2.u1s1.func"
# Test: c_variable-4.73
# Desc: children of struct_declarations.s2.u2.u1s1.foo
mi_list_varobj_children struct_declarations.s2.u2.u1s1.foo {} \
"get children of struct_declarations.s2.u2.u1s1.foo"
# Test: c_variable-4.74
# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.u2.u1s1.foo"
# Test: c_variable-4.75
# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
mi_list_varobj_children struct_declarations.s2.u2.u1s2.array_ptr {
{struct_declarations.s2.u2.u1s2.array_ptr.0 0 0 char}
{struct_declarations.s2.u2.u1s2.array_ptr.1 1 0 char}
} "get children of struct_declarations.s2.u2.u1s2.array_ptr"
# Test: c_variable-4.76
# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \
"\\^done,numchild=\"2\"" \
"get number of children of struct_declarations.s2.u2.u1s2.array_ptr"
# Test: c_variable-4.77
# Desc: children of struct_declarations.s2.u2.u1s2.func
mi_list_varobj_children struct_declarations.s2.u2.u1s2.func {} \
"get children of struct_declarations.s2.u2.u1s2.func"
# Test: c_variable-4.78
# Desc: number of children of struct_declarations.s2.u2.u1s2.func
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
"\\^done,numchild=\"0\"" \
"get number of children of struct_declarations.s2.u2.u1s2.func"
# Test: c_variable-4.79
# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
mi_list_varobj_children "struct_declarations.int_ptr_ptr.*int_ptr_ptr" {
{{struct_declarations.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} \
{\*\*int_ptr_ptr} 0 int}
} "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
# Test: c_variable-4.80
# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
# Step to "struct_declarations.integer = 123;"
set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]
mi_step_to do_children_tests {} {.*var-cmd.c} \
$line_dct_123 "step to line \$line_dct_123"
# Test: c_variable-4.81
# Desc: create local variable "weird"
mi_create_varobj weird weird "create local variable weird"
# Test: c_variable-4.82
# Desc: children of weird
mi_list_varobj_children "weird" {
{weird.integer integer 0 int}
{weird.character character 0 char}
{weird.char_ptr char_ptr 1 "char \\*"}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{weird.long_int long_int 0 "long"}
{weird.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{weird.long_array long_array 10 "long \\[10\\]"}
{weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"}
{weird.func_ptr_struct func_ptr_struct 0 \
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
"struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"}
{weird.func_ptr_ptr func_ptr_ptr 0 \
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"}
{weird.u1 u1 4 "union \\{\\.\\.\\.\\}"}
{weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"}
} "get children of weird"
# Test: c_variable-4.83
# Desc: number of children of weird
mi_gdb_test "-var-info-num-children weird" \
"\\^done,numchild=\"11\"" \
"get number of children of weird"
# Test: c_variable-4.84
# Desc: children of weird->long_array
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
mi_list_array_varobj_children weird.long_array 10 "long" \
"get children of weird.long_array"
#gdbtk_test c_variable-4.84 {children of weird->long_array} {
# get_children weird.long_array
#} {0 1 2 3 4 5 6 7 8 9}
# Test: c_variable-4.85
# Desc: number of children of weird.long_array
mi_gdb_test "-var-info-num-children weird.long_array" \
"\\^done,numchild=\"10\"" \
"get number of children of weird.long_array"
# Test: c_variable-4.86
# Desc: children of weird.int_ptr_ptr
mi_list_varobj_children weird.int_ptr_ptr {
{{weird.int_ptr_ptr.\*int_ptr_ptr} {\*int_ptr_ptr} 1 {int \*}}
} "get children of weird.int_ptr_ptr"
#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
# get_children weird.int_ptr_ptr
#} {*int_ptr_ptr}
# Test: c_variable-4.87
# Desc: number of children of weird.int_ptr_ptr
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of weird.int_ptr_ptr"
# Test: c_variable-4.88
# Desc: children of *weird->int_ptr_ptr
mi_list_varobj_children "weird.int_ptr_ptr.*int_ptr_ptr" {
{{weird.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} {\*\*int_ptr_ptr} 0 "int"}
} "get children of weird.int_ptr_ptr.*int_ptr_ptr"
#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
# get_children weird.int_ptr_ptr.*int_ptr_ptr
#} {**int_ptr_ptr}
# Test: c_variable-4.89
# Desc: number of children *weird->int_ptr_ptr
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of weird.int_ptr_ptr.*int_ptr_ptr"
# Test: c_variable-4.90
# Desc: create weird->int_ptr_ptr
mi_create_varobj "weird->int_ptr_ptr" "weird->int_ptr_ptr" \
"create local variable weird->int_ptr_ptr"
# Test: c_variable-4.91
# Desc: children of weird->int_ptr_ptr
mi_list_varobj_children "weird->int_ptr_ptr" {
{{weird->int_ptr_ptr.\*weird->int_ptr_ptr} {\*weird->int_ptr_ptr} 1 {int \*}}
} "get children of weird->int_ptr_ptr"
# Test: c_variable-4.92
# Desc: number of children of (weird->int_ptr_ptr)
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of weird->int_ptr_ptr"
# Test: c_variable-4.93
# Desc: children of *(weird->int_ptr_ptr)
mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr" {
{{weird->int_ptr_ptr.\*weird->int_ptr_ptr.\*\*weird->int_ptr_ptr} \
{\*\*weird->int_ptr_ptr} 0 int}
} "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
# Test: c_variable-4.94
# Desc: number of children of *(weird->int_ptr_ptr)
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
# Test: c_variable-4.95
# Desc: children of *(*(weird->int_ptr_ptr))
mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" {} \
"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
# Test: c_variable-4.96
# Desc: number of children of *(*(weird->int_ptr_ptr))
mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" {} \
"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
# Test: c_variable-4.97
# Desc: is weird editable
mi_gdb_test "-var-show-attributes weird" \
"\\^done,attr=\"editable\"" \
"is weird editable"
# Test: c_variable-4.98
# Desc: is weird->int_ptr_ptr editable
mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
"\\^done,attr=\"editable\"" \
"is weird->int_ptr_ptr editable"
# Test: c_variable-4.99
# Desc: is *(weird->int_ptr_ptr) editable
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
"\\^done,attr=\"editable\"" \
"is weird.int_ptr_ptr.*int_ptr_ptr editable"
# Test: c_variable-4.100
# Desc: is *(*(weird->int_ptr_ptr)) editable
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
"\\^done,attr=\"editable\"" \
"is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"
# Test: c_variable-4.101
# Desc: is weird->u1 editable
mi_gdb_test "-var-show-attributes weird.u1" \
"\\^done,attr=\"noneditable\"" \
"is weird.u1 editable"
# Test: c_variable-4.102
# Desc: is weird->s2 editable
mi_gdb_test "-var-show-attributes weird.s2" \
"\\^done,attr=\"noneditable\"" \
"is weird.s2 editable"
# Test: c_variable-4.103
# Desc: is struct_declarations.u1.a editable
mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
"\\^done,attr=\"editable\"" \
"is struct_declarations.u1.a editable"
# Test: c_variable-4.104
# Desc: is struct_declarations.u1.b editable
mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
"\\^done,attr=\"editable\"" \
"is struct_declarations.u1.b editable"
# Test: c_variable-4.105
# Desc: is struct_declarations.u1.c editable
mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
"\\^done,attr=\"editable\"" \
"is struct_declarations.u1.c editable"
# Test: c_variable-4.106
# Desc: is struct_declarations.long_array editable
mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
"\\^done,attr=\"noneditable\"" \
"is struct_declarations.long_array editable"
# Test: c_variable-4.107
# Desc: is struct_declarations.long_array[0] editable
mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
"\\^done,attr=\"editable\"" \
"is struct_declarations.long_array.0 editable"
# Test: c_variable-4.108
# Desc: is struct_declarations editable
mi_gdb_test "-var-show-attributes struct_declarations" \
"\\^done,attr=\"noneditable\"" \
"is struct_declarations editable"
mi_gdb_test "-var-delete weird" \
"\\^done,ndeleted=\"24\"" \
"delete var weird"
##### #####
# #
# children and update tests #
# #
##### #####
# Test: c_variable-5.1
# Desc: check that nothing changed
mi_varobj_update * {} "update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_123 + 1] "step \$line_dct_123 + 1"
# Test: c_variable-5.2
# Desc: check that integer changed
mi_varobj_update * {struct_declarations.integer} \
"update all vars struct_declarations.integer"
# Step over:
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_123 + 4] {} "step \$line_dct_123 + 4"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
mi_varobj_update * {struct_declarations.char_ptr
struct_declarations.char_ptr.\\*char_ptr} \
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_123 + 5] "step \$line_dct_123 + 5"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
mi_varobj_update * {weird->int_ptr_ptr
weird->int_ptr_ptr.\\*weird->int_ptr_ptr
weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr
struct_declarations.int_ptr_ptr
struct_declarations.int_ptr_ptr.\\*int_ptr_ptr
struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr} \
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_123 + 6] "step \$line_dct_123 + 6"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
mi_varobj_update * {struct_declarations.long_array.0} \
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_123 + 7] "step \$line_dct_123 + 7"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
mi_varobj_update * {struct_declarations.long_array.1} \
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_123 + 8] "step \$line_dct_123 + 8"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
mi_varobj_update * {struct_declarations.long_array.2} \
"update all vars struct_declarations.long_array.2 changed"
# Step over:
# struct_declarations.long_array[3] = 4567;
# weird->long_array[4] = 5678;
# struct_declarations.long_array[5] = 6789;
# weird->long_array[6] = 7890;
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
set line_dct_nothing [gdb_get_line_number "weird->func_ptr = nothing;"]
mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
$line_dct_nothing {} "step \$line_dct_nothing"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
mi_varobj_update * {struct_declarations.long_array.3
struct_declarations.long_array.4
struct_declarations.long_array.5
struct_declarations.long_array.6
struct_declarations.long_array.7
struct_declarations.long_array.8
struct_declarations.long_array.9} \
"update all vars struct_declarations.long_array.3-9 changed"
# Step over "weird->func_ptr = nothing;"
Fix fail in mi-var-child.exp and mi-var-display.exp Hi, I see the following fails on arm-none-eabi target, -var-list-children --simple-values struct_declarations ^M ^done,numchild="11",children=[...,child={name="struct_declarations.func_ptr_struct",exp="func_ptr_struct",numchild="0",value="0x0 <_ftext>",type="struct _struct_decl (*)(int, char *, long)",thread-id="1"},child={name="struct_declarations.func_ptr_ptr",exp="func_ptr_ptr",numchild="0",value="0x0 <_ftext>",type="struct _struct_decl *(*)(int, char *, long)",thread-id="1"},... (gdb) ^M FAIL: gdb.mi/mi-var-child.exp: listing of children, simple types: names, type and values, complex types: names and types -var-set-format weird.func_ptr_ptr natural^M ^done,format="natural",value="0x0 <_ftext>"^M (gdb) ^M FAIL: gdb.mi/mi-var-display.exp: set format variable weird.func_ptr_ptr in natural In the test, "0x0" is expected, but "0x0 <_ftext>" is in the output. Function pointers point to address zero, and tests assume there is no symbol on address zero. However, on my arm-none-eabi target, there is a code symbol _ftext on address zero, and test fails. Note that "set print symbol off" doesn't take effect for function pointer. int (*f) (void); f = main; (gdb) p f $1 = (int (*)(void)) 0x8048400 <main> (gdb) set print symbol off (gdb) p f $2 = (int (*)(void)) 0x8048400 <main> In order to erase the difference, we can assign some function address explicitly to function pointer, so the test behaves in a unique way. In this patch, we assign nothing1 and nothing2 to function pointers func_ptr_struct and func_ptr_ptr respectively, and update test as the source file is changed. gdb/testsuite: 2014-10-14 Yao Qi <yao@codesourcery.com> * gdb.mi/mi-var-child.c (nothing1): New function. (nothing2): New function. (do_children_tests): Set function pointers by nothing1 and nothing2. * gdb.mi/mi-var-child.exp: Step over new added statements. Update test to match the new output. * gdb.mi/var-cmd.c (nothing1): New function. (nothing2): New function. (do_children_tests): Set function pointers by nothing1 and nothing2. * gdb.mi/mi-var-display.exp: Update test to match output. Step to the line specified by $line_dct_nothing. Increase the number of lines to step.
2014-08-30 15:30:36 +02:00
mi_step_to do_children_tests {} ".*${srcfile}" \
[expr $line_dct_nothing + 1] "step \$line_dct_nothing + 1"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
mi_varobj_update * {struct_declarations.func_ptr} \
"update all vars struct_declarations.func_ptr changed"
# Delete all variables
mi_gdb_test "-var-delete struct_declarations" \
"\\^done,ndeleted=\"65\"" \
"delete var struct_declarations"
mi_gdb_test "-var-delete weird->int_ptr_ptr" \
"\\^done,ndeleted=\"3\"" \
"delete var weird->int_ptr_ptr"
# Step over all lines:
# ...
# psnp = &snp0;
set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
Fix fail in mi-var-child.exp and mi-var-display.exp Hi, I see the following fails on arm-none-eabi target, -var-list-children --simple-values struct_declarations ^M ^done,numchild="11",children=[...,child={name="struct_declarations.func_ptr_struct",exp="func_ptr_struct",numchild="0",value="0x0 <_ftext>",type="struct _struct_decl (*)(int, char *, long)",thread-id="1"},child={name="struct_declarations.func_ptr_ptr",exp="func_ptr_ptr",numchild="0",value="0x0 <_ftext>",type="struct _struct_decl *(*)(int, char *, long)",thread-id="1"},... (gdb) ^M FAIL: gdb.mi/mi-var-child.exp: listing of children, simple types: names, type and values, complex types: names and types -var-set-format weird.func_ptr_ptr natural^M ^done,format="natural",value="0x0 <_ftext>"^M (gdb) ^M FAIL: gdb.mi/mi-var-display.exp: set format variable weird.func_ptr_ptr in natural In the test, "0x0" is expected, but "0x0 <_ftext>" is in the output. Function pointers point to address zero, and tests assume there is no symbol on address zero. However, on my arm-none-eabi target, there is a code symbol _ftext on address zero, and test fails. Note that "set print symbol off" doesn't take effect for function pointer. int (*f) (void); f = main; (gdb) p f $1 = (int (*)(void)) 0x8048400 <main> (gdb) set print symbol off (gdb) p f $2 = (int (*)(void)) 0x8048400 <main> In order to erase the difference, we can assign some function address explicitly to function pointer, so the test behaves in a unique way. In this patch, we assign nothing1 and nothing2 to function pointers func_ptr_struct and func_ptr_ptr respectively, and update test as the source file is changed. gdb/testsuite: 2014-10-14 Yao Qi <yao@codesourcery.com> * gdb.mi/mi-var-child.c (nothing1): New function. (nothing2): New function. (do_children_tests): Set function pointers by nothing1 and nothing2. * gdb.mi/mi-var-child.exp: Step over new added statements. Update test to match the new output. * gdb.mi/var-cmd.c (nothing1): New function. (nothing2): New function. (do_children_tests): Set function pointers by nothing1 and nothing2. * gdb.mi/mi-var-display.exp: Update test to match output. Step to the line specified by $line_dct_nothing. Increase the number of lines to step.
2014-08-30 15:30:36 +02:00
mi_execute_to "exec-step 45" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
mi_create_varobj "psnp->char_ptr" "psnp->char_ptr" \
"create local variable psnp->char_ptr"
# Test: c_variable-5.11
# Desc: children of psnp->char_ptr
mi_list_varobj_children "psnp->char_ptr" {
{{psnp->char_ptr.\*psnp->char_ptr} {\*psnp->char_ptr} 1 {char \*\*\*}}
} "get children of psnp->char_ptr"
# Test: c_variable-5.12
# Desc: number of children of psnp->char_ptr
mi_gdb_test "-var-info-num-children psnp->char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->char_ptr"
# Test: c_variable-5.13
# Desc: children of *(psnp->char_ptr)
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr" {
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr} \
{\*\*psnp->char_ptr} 1 {char \*\*}}
} "get children of psnp->char_ptr.*psnp->char_ptr"
# Test: c_variable-5.14
# Desc: number of children of *(psnp->char_ptr)
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->char_ptr.*psnp->char_ptr"
# Test: c_variable-5.15
# Desc: children of *(*(psnp->char_ptr))
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" {
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr} \
{\*\*\*psnp->char_ptr} 1 {char \*}}
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
# Test: c_variable-5.15B
# Desc: children of *(*(*(psnp->char_ptr)))
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
{\*\*\*\*psnp->char_ptr} 0 char}
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
# Test: c_variable-5.16
# Desc: number of children of *(*(psnp->char_ptr))
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
# Test: c_variable-5.17
# Desc: children of *(*(*(psnp->char_ptr)))
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" {
{{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \
{\*\*\*\*psnp->char_ptr} 0 char}
} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
# Test: c_variable-5.18
# Desc: number of children of *(*(*(psnp->char_ptr)))
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
# Test: c_variable-5.17B
# Desc: children of *(*(*(*(psnp->char_ptr))))
mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" {} \
"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
# Test: c_variable-5.18B
# Desc: number of children of *(*(*(*(psnp->char_ptr))))
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
"\\^done,numchild=\"0\"" \
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
# Test: c_variable-5.19
# Desc: create psnp->long_ptr
mi_create_varobj "psnp->long_ptr" "psnp->long_ptr" \
"create local variable psnp->long_ptr"
# Test: c_variable-5.20
# Desc: children of psnp->long_ptr
mi_list_varobj_children "psnp->long_ptr" {
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{{psnp->long_ptr.\*psnp->long_ptr} {\*psnp->long_ptr} 1 {long \*\*\*}}
} "get children of psnp->long_ptr"
# Test: c_variable-5.21
# Desc: number of children of psnp->long_ptr
mi_gdb_test "-var-info-num-children psnp->long_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->long_ptr"
# Test: c_variable-5.22
# Desc: children of *(psnp->long_ptr)
mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr" {
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr} {\*\*psnp->long_ptr} 1 {long \*\*}}
} "get children of psnp->long_ptr.*psnp->long_ptr"
# Test: c_variable-5.23
# Desc: number of children of *(psnp->long_ptr)
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->long_ptr.*psnp->long_ptr"
# Test: c_variable-5.24
# Desc: children of *(*(psnp->long_ptr))
mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" {
{{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr} \
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{\*\*\*psnp->long_ptr} 1 {long \*}}
} "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
# Test: c_variable-5.25
# Desc: number of children of *(*(psnp->long_ptr))
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
# Test: c_variable-5.26
# Desc: children of *(*(*(psnp->long_ptr)))
mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" {
{{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr.\*\*\*\*psnp->long_ptr}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{\*\*\*\*psnp->long_ptr} 0 {long}}
} "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
# Test: c_variable-5.27
# Desc: number of children of *(*(*(psnp->long_ptr)))
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
# Test: c_variable-5.28
# Desc: children of *(*(*(*(psnp->long_ptr))))
mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" {} \
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
# Test: c_variable-5.29
# Desc: number of children of *(*(*(*(psnp->long_ptr))))
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
"\\^done,numchild=\"0\"" \
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
# Test: c_variable-5.30
# Desc: create psnp->ptrs
mi_create_varobj "psnp->ptrs" "psnp->ptrs" \
"create local variable psnp->ptrs"
# Test: c_variable-5.31
# Desc: children of psnp->ptrs
mi_list_varobj_children "psnp->ptrs" {
{psnp->ptrs.0 0 4 {struct _struct_n_pointer \*}}
{psnp->ptrs.1 1 4 {struct _struct_n_pointer \*}}
{psnp->ptrs.2 2 4 {struct _struct_n_pointer \*}}
} "get children of psnp->ptrs"
# Test: c_variable-5.32
# Desc: number of children of psnp->ptrs
mi_gdb_test "-var-info-num-children psnp->ptrs" \
"\\^done,numchild=\"3\"" \
"get number of children of psnp->ptrs"
# Test: c_variable-5.33
# Desc: children of psnp->ptrs[0]
mi_list_varobj_children "psnp->ptrs.0" {
{psnp->ptrs.0.char_ptr char_ptr 1 {char \*\*\*\*}}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{psnp->ptrs.0.long_ptr long_ptr 1 {long \*\*\*\*}}
{psnp->ptrs.0.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}}
{psnp->ptrs.0.next next 4 {struct _struct_n_pointer \*}}
} "get children of psnp->ptrs.0"
# Test: c_variable-5.34
# Desc: number of children of psnp->ptrs[0]
mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
"\\^done,numchild=\"4\"" \
"get number of children of psnp->ptrs.0"
# Test: c_variable-5.35
# Desc: children of psnp->ptrs[0]->next
mi_list_varobj_children "psnp->ptrs.0.next" {
{psnp->ptrs.0.next.char_ptr char_ptr 1 {char \*\*\*\*}}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{psnp->ptrs.0.next.long_ptr long_ptr 1 {long \*\*\*\*}}
{psnp->ptrs.0.next.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}}
{psnp->ptrs.0.next.next next 4 {struct _struct_n_pointer \*}}
} "get children of psnp->ptrs.0.next"
#} {char_ptr long_ptr ptrs next}
# Test: c_variable-5.36
# Desc: number of children of psnp->ptrs[0]->next
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
"\\^done,numchild=\"4\"" \
"get number of children of psnp->ptrs.0.next"
# Test: c_variable-5.37
# Desc: children of psnp->ptrs[0]->next->char_ptr
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr" {
{{psnp->ptrs.0.next.char_ptr.\*char_ptr} {\*char_ptr} 1 {char \*\*\*}}
} "get children of psnp->ptrs.0.next.char_ptr"
#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
# get_children psnp->ptrs.0.next.char_ptr
#} {*char_ptr}
# Test: c_variable-5.38
# Desc: number of children of psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->ptrs.0.next.char_ptr"
# Test: c_variable-5.39
# Desc: children of *psnp->ptrs[0]->next->char_ptr
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr" {
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr} {\*\*char_ptr} 1 {char \*\*}}
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
# Test: c_variable-5.40
# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"
# Test: c_variable-5.41
# Desc: children of **psnp->ptrs[0]->next->char_ptr
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" {
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr} \
{\*\*\*char_ptr} 1 {char \*}}
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
# Test: c_variable-5.41B
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
{\*\*\*\*char_ptr} 0 char}
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
# Test: c_variable-5.42
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
# Test: c_variable-5.43
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" {
{{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \
{\*\*\*\*char_ptr} 0 char}
} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
# Test: c_variable-5.44
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
"\\^done,numchild=\"1\"" \
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
# Test: c_variable-5.43B
# Desc: children of ****psnp->ptrs[0]->next->char_ptr
mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
# Test: c_variable-5.44B
# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
"\\^done,numchild=\"0\"" \
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
# Test: c_variable-5.45
# Desc: children of psnp->ptrs[0]->next->next
mi_list_varobj_children "psnp->ptrs.0.next.next" {
{psnp->ptrs.0.next.next.char_ptr char_ptr 1 {char \*\*\*\*}}
* c-typeprint.c (find_typedef_for_canonicalize, print_name_maybe_canonical): New functions. (c_print_type): Look up type name. (cp_type_print_derivation_info): Add flags argument. Use print_name_maybe_canonical. (cp_type_print_method_args): Add wrapping. (c_type_print_varspec_prefix): Use print_name_maybe_canonical. (c_type_print_template_args): New function. (c_type_print_base): Change wrapping. Use print_name_maybe_canonical. <TYPE_CODE_STRUCT>: Possibly create a typedef hash, and do type name lookups. * gdbtypes.c (types_equal): No longer static. * gdbtypes.h (types_equal): Declare. * typeprint.c (type_print_raw_options, default_ptype_flags): Update. (struct typedef_hash_table): New. (hash_typedef_field, eq_typedef_field, recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, do_free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash_element, copy_typedef_hash, find_typedef_in_hash): New functions. * typeprint.h (struct type_print_options) <local_typedefs>: New field. (recursively_update_typedef_hash, add_template_parameters, create_typedef_hash, free_typedef_hash, make_cleanup_free_typedef_hash, copy_typedef_hash, find_typedef_in_hash): Declare. testsuite * gdb.base/call-sc.exp: Use "ptype/r". * gdb.base/volatile.exp: Don't expect "int". * gdb.cp/ptype-flags.cc: New file. * gdb.cp/ptype-flags.exp: New file. * gdb.cp/templates.exp: Use ptype/r. (test_ptype_of_templates, test_template_typedef): Likewise. * lib/cp-support.exp (cp_test_ptype_class): Add in_ptype_arg argument. Handle template names and template parameters. * gdb.mi/mi-var-cmd.exp: Accept "long". * gdb.mi/mi-var-child.exp: Accept "long". * gdb.mi/mi-var-display.exp: Accept "long". * gdb.mi/mi2-var-child.exp: Accept "long".
2012-11-12 18:37:38 +01:00
{psnp->ptrs.0.next.next.long_ptr long_ptr 1 {long \*\*\*\*}}
{psnp->ptrs.0.next.next.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}}
{psnp->ptrs.0.next.next.next next 4 {struct _struct_n_pointer \*}}
} "get children of psnp->ptrs.0.next.next"
# Test: c_variable-5.46
# Desc: children of psnp->ptrs[0]->next->next->ptrs
mi_list_varobj_children "psnp->ptrs.0.next.next.ptrs" {
{psnp->ptrs.0.next.next.ptrs.0 0 4 {struct _struct_n_pointer \*}}
{psnp->ptrs.0.next.next.ptrs.1 1 4 {struct _struct_n_pointer \*}}
{psnp->ptrs.0.next.next.ptrs.2 2 4 {struct _struct_n_pointer \*}}
} "get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 2] "step \$line_dct_snp0 + 2"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
mi_varobj_update * {psnp->ptrs.0.char_ptr
psnp->char_ptr
psnp->char_ptr.\\*psnp->char_ptr psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr
psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr
psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr } \
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 3] "step \$line_dct_snp0 + 3"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
mi_varobj_update * {psnp->ptrs.0.next.char_ptr
psnp->ptrs.0.next.char_ptr.\\*char_ptr
psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr
psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr
psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr} \
"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
# Step over "snp2.char_ptr = &a3;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 4] "step \$line_dct_snp0 + 4"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
mi_varobj_update * {psnp->ptrs.0.next.next.char_ptr} \
"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
# Step over "snp0.long_ptr = &y3;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 5] "step \$line_dct_snp0 + 5"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
mi_varobj_update * {psnp->ptrs.0.long_ptr psnp->long_ptr
psnp->long_ptr.\\*psnp->long_ptr
psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr
psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr
psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr} \
"update all vars psnp->long_ptr (and 0.long_ptr) changed"
# Step over "snp1.long_ptr = &x3;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 6] "step \$line_dct_snp0 + 6"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
# Why does this have a FIXME?
setup_xfail *-*-*
mi_gdb_test "-var-update *" \
gdb * varobj.h (varobj_update_result_t) <new>: New field. (varobj_get_child_range, varobj_set_child_range): Declare. (varobj_list_children): Update. (varobj_enable_pretty_printing, varobj_has_more) (varobj_pretty_printed_p): Declare. * varobj.c (pretty_printing): New global. (varobj_enable_pretty_printing): New function. (struct varobj_root) <from, to, constructor, child_iter, saved_item>: New fields. (varobj_create): Don't call install_default_visualizer. (instantiate_pretty_printer): Don't use value_copy. (varobj_has_more): New function. (restrict_range): New function. (install_dynamic_child): Likewise. (dynamic_varobj_has_child_method): Likewise. (update_dynamic_varobj_children): Remove 'new_and_unchanged' argument; add 'new', 'unchanged', 'from', and 'to' arguments. Rewrite. (varobj_get_num_children): Call update_dynamic_varobj_children. (varobj_list_children): Add 'from' and 'to' arguments. Ignore result of update_dynamic_varobj_children. Don't call install_default_visualizer. Restrict result range. (varobj_add_child): Don't call install_default_visualizer. (varobj_pretty_printed_p): New function. (install_visualizer): Rewrite. Move earlier in file. (install_default_visualizer): Likewise. (construct_visualizer): New function. (install_new_value_visualizer): Likewise. (install_new_value): Don't call release_value. Special case pretty-printed objects. Use value_incref. Rearrange "changed" logic. (varobj_get_child_range): New function. (varobj_set_child_range): Likewise. (varobj_set_visualizer): Rewrite. (varobj_update): Rewrite pretty-printing logic. (new_variable): Initialize new fields. (free_variable): Destroy new fields. (value_of_root): Copy 'from' and 'to'. (my_value_of_variable): Handle pretty-printers. (value_get_print_value): Rework pretty-printing logic. (cplus_describe_child): Don't use release_value. * mi/mi-cmds.h (mi_cmd_enable_pretty_printing) (mi_cmd_var_set_update_range): Declare. * mi/mi-cmds.c (mi_cmds): Add enable-pretty-printing and var-set-update-range. * mi/mi-cmd-var.c (print_varobj): Update. Emit "dynamic" attribute. (mi_cmd_var_create): Emit "has_more" attribute. (mi_cmd_var_set_format): Plug memory leak. (mi_print_value_p): Replace 'type' argument with 'var'. Handle pretty-printed varobjs. (mi_cmd_var_list_children): Accept 'from' and 'to' arguments. Emit "has_more" attribute. (mi_cmd_var_evaluate_expression): Plug memory leak. (mi_cmd_var_assign): Likewise. (varobj_update_one): Likewise. Emit "dynamic", "has_more", and "new_children" attributes. (mi_cmd_enable_pretty_printing): New function. (mi_cmd_var_set_update_range): Likewise. gdb/doc * gdb.texinfo (GDB/MI Variable Objects): Document -enable-pretty-printing, -var-set-update-range, dynamic varobjs. Expand -var-update documentation. gdb/testsuite * lib/mi-support.exp (mi_create_varobj): Update. (mi_create_floating_varobj): Likewise. (mi_create_dynamic_varobj): New proc. (mi_varobj_update): Update. (mi_varobj_update_with_type_change): Likewise. (mi_varobj_update_kv_helper): New proc. (mi_varobj_update_dynamic_helper): Rewrite. (mi_varobj_update_dynamic): New proc. (mi_list_varobj_children): Update. (mi_list_varobj_children_range): Add 'from' and 'to' arguments. * gdb.python/python-prettyprint.py (pp_outer): New class. (pp_nullstr): Likewise. (lookup_function): Register new printers. * gdb.python/python-prettyprint.c (struct substruct): New type. (struct outerstruct): Likewise. (substruct_test): New function. (struct nullstr): New type. (string_1, string_2): New globals. (main): Add new tests. * gdb.python/python-mi.exp: Added regression tests. * gdb.mi/mi2-var-display.exp: Update. * gdb.mi/mi2-var-cmd.exp: Update. * gdb.mi/mi2-var-child.exp: Update. * gdb.mi/mi2-var-block.exp: Update. * gdb.mi/mi-var-invalidate.exp: Update. * gdb.mi/mi-var-display.exp: Update. * gdb.mi/mi-var-cmd.exp: Update. * gdb.mi/mi-var-child.exp: Update. * gdb.mi/mi-var-block.exp: Update. * gdb.mi/mi-break.exp: Update. * gdb.mi/gdb701.exp: Update.
2009-09-15 20:51:26 +02:00
"FIXME\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\\\]" \
"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
clear_xfail *-*-*
# This command produces this error message:
# &"warning: varobj_list: assertion failed - mycount <> 0\n"
#
# Step over "snp2.long_ptr = &z3;"
mi_step_to do_children_tests {} {.*var-cmd.c} \
[expr $line_dct_snp0 + 7] "step \$line_dct_snp0 + 7"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
mi_varobj_update * {psnp->ptrs.0.next.next.long_ptr} \
"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
# Anonymous type tests
proc verify_everything {variable_name} {
# Test -var-list-children
mi_varobj_tree_test_children_callback $variable_name
# Bring the variable named by VARIABLE_NAME into the current scope
# in VAROBJ.
upvar #0 $variable_name varobj
# Test -var-info-path-expression
mi_gdb_test "-var-info-path-expression $varobj(obj_name)" \
"\\^done,path_expr=\"[string_to_regexp $varobj(path_expr)]\"" \
"path expression for $varobj(obj_name)"
# Test -var-info-expression
mi_gdb_test "-var-info-expression $varobj(obj_name)" \
"\\^done,lang=\"C\",exp=\"[string_to_regexp $varobj(display_name)]\"" \
"expression for $varobj(obj_name)"
}
set lineno [gdb_get_line_number "anonymous type tests breakpoint"]
mi_create_breakpoint \
Introduce some new MI test suite cleanups for breakpoint and breakpoint table handling. This is a patch in five parts (all committed here in one commit). ----- 1/5: parse_args parse_args is a very useful utility function which allows you to do getopt-y kinds of things in Tcl. Example: proc myproc {foo args} { parse_args {{bar} {baz "abc"} {qux}} # ... } myproc ABC -bar -baz DEF peanut butter will define the following variables in myproc: foo (=ABC), bar (=1), baz (=DEF), and qux (=0) args will be the list {peanut butter} ----- 2/5: mi_build_kv_pairs build_kv_pairs simply does what it says: given the input list and an option join string, it combines list elements into kv-pairs for MI handling. It knows how to handle tuples and other special MI types. Example: mi_build_kv_pairs {a b c d e f g \[.*\]} returns a=\"b\",c=\"d\",e=\"f\",g=\[.*\] ----- 3/5: mi_make_breakpoint This function builds breakpoint regexps, such as "bkpt={number=\".*\", [snip]}". Note that ONLY the options given to mi_make_breakpoint/mi_create_breakpoint will actually be tested. So if -number is omitted, the regexp will allow anything [number=\".*\"] Examples: mi_make_breakpoint -number 3 mi_create_breakpoint "myfile.c:21" -file myfile.c -line 21 ----- 4/5: mi_make_breakpoint_table This function builds MI breakpoint table regexps. Example: set bps {} lappend bps [mi_make_breakpoint -number 1 -func "main" \ -file ".*/myfile.c" -line 42 lappend bps [mi_make_breakpoint -number 2 -func "marker" \ -file ".*myfile.c" -line 21 gdb_test "-break-info" "\\^done,[mi_make_breakpoint_table $bps]" \ "breakpoint list" ----- 5/5: Update all callers Self-explanatory testsuite/ChangeLog 2014-04-23 Keith Seitz <keiths@redhat.com> * lib/mi-support.exp (mi_list_breakpoints): Delete. (mi_make_breakpoint_table): New procedure. (mi_create_breakpoint): Use mi_make_breakpoint and return the result. (mi_make_breakpoint): New procedure. (mi_build_kv_pairs): New procedure. * gdb.mi/mi-break.exp: Remove unused globals, update mi_create_breakpoint usage, and use mi_make_breakpoint_table. All callers updated. * gdb.mi/mi-dprintf.exp: Use variable to track command number. Update all callers of mi_create_breakpoint and use mi_make_breakpoint_table. Remove any unused global variables. * gdb.mi/mi-nonstop.exp: Likewise. * gdb.mi/mi-nsintrall.exp: Likewise. * gdb.mi/mi-nsmoribund.exp: Likewise. * gdb.mi/mi-nsthrexec.exp: Likewise. * gdb.mi/mi-reverse.exp: Likewise. * gdb.mi/mi-simplerun.exp: Likewise. * gdb.mi/mi-stepn.exp: Likewise. * gdb.mi/mi-syn-frame.exp: Likewise. * gdb.mi/mi-until.exp: Likewise. * gdb.mi/mi-var-cp.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi2-amd64-entry-value.exp: Likewise. * gdb.mi/mi2-var-child.exp: Likewise. * gdb.mi/mi-vla-c99.exp: Likewise. * lib/mi-support.exp: Likewise. From Ian Lance Taylor <iant@cygnus.com>: * lib/gdb.exp (parse_args): New procedure.
2014-04-23 21:17:31 +02:00
"$srcfile:$lineno" "break in do_anonymous_type_tests" \
-disp keep -func do_anonymous_type_tests \
-file ".*var-cmd.c" -line $lineno
Improve MI -var-info-path-expression for nested struct/union case. https://sourceware.org/ml/gdb-patches/2014-05/msg00383.html The MI command -var-info-path-expression currently does not handle non-anonymous structs / unions nested within other structs / unions, it will skip parts of the expression. Consider this example: ## START EXAMPLE ## $ cat ex.c #include <string.h> int main () { struct s1 { int a; }; struct ss { struct s1 x; }; struct ss an_ss; memset (&an_ss, 0, sizeof (an_ss)); return 0; } $ gcc -g -o ex.x ex.c $ gdb ex.x (gdb) break 18 Breakpoint 1 at 0x80483ba: file ex.c, line 18. (gdb) run Starting program: /home/user/ex.x Breakpoint 1, main () at ex.c:18 18 return 0; (gdb) interpreter-exec mi "-var-create an_ss * an_ss" (gdb) interpreter-exec mi "-var-list-children an_ss" ^done,numchild="1",children=[child={name="an_ss.x",exp="x",numchild="1",type="struct s1",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x" ^done,numchild="1",children=[child={name="an_ss.x.a",exp="a",numchild="0",type="int",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x.a" ^done,numchild="0",has_more="0" (gdb) interpreter-exec mi "-var-info-path-expression an_ss.x.a" ^done,path_expr="(an_ss).a" (gdb) print (an_ss).a There is no member named a. ## END EXAMPLE ## Notice that the path expression returned is wrong, and as a result the print command fails. This patch adds a new method to the varobj_ops structure called is_path_expr_parent, to allow language specific control over finding the parent varobj, the current logic becomes the C/C++ version and is extended to handle the nested cases. No other language currently uses this code, so all other languages just get a default method. With this patch, the above example now finishes like this: ## START EXAMPLE ## $ gdb ex.x (gdb) break 18 Breakpoint 1 at 0x80483ba: file ex.c, line 18. (gdb) run Starting program: /home/user/ex.x Breakpoint 1, main () at ex.c:18 18 return 0; (gdb) interpreter-exec mi "-var-list-children an_ss" ^done,numchild="1",children=[child={name="an_ss.x",exp="x",numchild="1",type="struct s1",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x" ^done,numchild="1",children=[child={name="an_ss.x.a",exp="a",numchild="0",type="int",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x.a" ^done,numchild="0",has_more="0" (gdb) interpreter-exec mi "-var-info-path-expression an_ss.x.a" ^done,path_expr="((an_ss).x).a" (gdb) print ((an_ss).x).a $1 = 0 ## END EXAMPLE ## Notice that the path expression is now correct, and the print is a success. gdb/ChangeLog: * ada-varobj.c (ada_varobj_ops): Fill in is_path_expr_parent field. * c-varobj.c (c_is_path_expr_parent): New function, moved core from varobj.c, with additional checks. (c_varobj_ops): Fill in is_path_expr_parent field. (cplus_varobj_ops): Fill in is_path_expr_parent field. * jv-varobj.c (java_varobj_ops): Fill in is_path_expr_parent field. * varobj.c (is_path_expr_parent): Call is_path_expr_parent varobj ops method. (varobj_default_is_path_expr_parent): New function. * varobj.h (lang_varobj_ops): Add is_path_expr_parent field. (varobj_default_is_path_expr_parent): Declare new function. gdb/testsuite/ChangeLog: * gdb.mi/var-cmd.c (do_nested_struct_union_tests): New function setting up test structures. (main): Call new test function. * gdb.mi/mi2-var-child.exp: Create additional breakpoint in new test function, continue into test function and walk test structures.
2014-07-07 20:22:36 +02:00
set lineno [gdb_get_line_number "nested struct union tests breakpoint"]
mi_create_breakpoint \
"$srcfile:$lineno" "break in do_nested_struct_union_tests" \
-disp keep -func do_nested_struct_union_tests \
-file ".*var-cmd.c" -line $lineno
mi_execute_to "exec-continue" "breakpoint-hit" "do_anonymous_type_tests" ""\
".*" ".*" {"" "disp=\"keep\""} \
"continue to do_anonymous_type_tests breakpoint"
# Run the varobj tree on variable "ptr".
set tree {
{struct anonymous **} ptr {
{struct anonymous *} {*ptr} {
int a {}
anonymous struct {
int b {}
{char *} c {
char {*c} {}
}
anonymous union {
int d {}
{void *} e {}
char f {}
anonymous struct {
char g {}
{const char **} h {
{const char *} {*h} {
{const char} {**h} {}
}
}
{simpleton ***} simple {
{simpleton **} {*simple} {
{simpleton *} {**simple} {
int integer {}
{unsigned int} unsigned_integer {}
char character {}
{signed char} signed_character {}
{char *} char_ptr {
char {*char_ptr} {}
}
{int [10]} array_of_10 {
int 0 {}
int 1 {}
int 2 {}
int 3 {}
int 4 {}
int 5 {}
int 6 {}
int 7 {}
int 8 {}
int 9 {}
}
}
}
}
}
}
}
}
}
}
mi_walk_varobj_tree c $tree verify_everything
set tree {
{struct {...}} v {
int x {}
anonymous struct {
int a {}
}
anonymous struct {
int b {}
}
}
}
mi_walk_varobj_tree c $tree verify_everything
Improve MI -var-info-path-expression for nested struct/union case. https://sourceware.org/ml/gdb-patches/2014-05/msg00383.html The MI command -var-info-path-expression currently does not handle non-anonymous structs / unions nested within other structs / unions, it will skip parts of the expression. Consider this example: ## START EXAMPLE ## $ cat ex.c #include <string.h> int main () { struct s1 { int a; }; struct ss { struct s1 x; }; struct ss an_ss; memset (&an_ss, 0, sizeof (an_ss)); return 0; } $ gcc -g -o ex.x ex.c $ gdb ex.x (gdb) break 18 Breakpoint 1 at 0x80483ba: file ex.c, line 18. (gdb) run Starting program: /home/user/ex.x Breakpoint 1, main () at ex.c:18 18 return 0; (gdb) interpreter-exec mi "-var-create an_ss * an_ss" (gdb) interpreter-exec mi "-var-list-children an_ss" ^done,numchild="1",children=[child={name="an_ss.x",exp="x",numchild="1",type="struct s1",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x" ^done,numchild="1",children=[child={name="an_ss.x.a",exp="a",numchild="0",type="int",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x.a" ^done,numchild="0",has_more="0" (gdb) interpreter-exec mi "-var-info-path-expression an_ss.x.a" ^done,path_expr="(an_ss).a" (gdb) print (an_ss).a There is no member named a. ## END EXAMPLE ## Notice that the path expression returned is wrong, and as a result the print command fails. This patch adds a new method to the varobj_ops structure called is_path_expr_parent, to allow language specific control over finding the parent varobj, the current logic becomes the C/C++ version and is extended to handle the nested cases. No other language currently uses this code, so all other languages just get a default method. With this patch, the above example now finishes like this: ## START EXAMPLE ## $ gdb ex.x (gdb) break 18 Breakpoint 1 at 0x80483ba: file ex.c, line 18. (gdb) run Starting program: /home/user/ex.x Breakpoint 1, main () at ex.c:18 18 return 0; (gdb) interpreter-exec mi "-var-list-children an_ss" ^done,numchild="1",children=[child={name="an_ss.x",exp="x",numchild="1",type="struct s1",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x" ^done,numchild="1",children=[child={name="an_ss.x.a",exp="a",numchild="0",type="int",thread-id="1"}],has_more="0" (gdb) interpreter-exec mi "-var-list-children an_ss.x.a" ^done,numchild="0",has_more="0" (gdb) interpreter-exec mi "-var-info-path-expression an_ss.x.a" ^done,path_expr="((an_ss).x).a" (gdb) print ((an_ss).x).a $1 = 0 ## END EXAMPLE ## Notice that the path expression is now correct, and the print is a success. gdb/ChangeLog: * ada-varobj.c (ada_varobj_ops): Fill in is_path_expr_parent field. * c-varobj.c (c_is_path_expr_parent): New function, moved core from varobj.c, with additional checks. (c_varobj_ops): Fill in is_path_expr_parent field. (cplus_varobj_ops): Fill in is_path_expr_parent field. * jv-varobj.c (java_varobj_ops): Fill in is_path_expr_parent field. * varobj.c (is_path_expr_parent): Call is_path_expr_parent varobj ops method. (varobj_default_is_path_expr_parent): New function. * varobj.h (lang_varobj_ops): Add is_path_expr_parent field. (varobj_default_is_path_expr_parent): Declare new function. gdb/testsuite/ChangeLog: * gdb.mi/var-cmd.c (do_nested_struct_union_tests): New function setting up test structures. (main): Call new test function. * gdb.mi/mi2-var-child.exp: Create additional breakpoint in new test function, continue into test function and walk test structures.
2014-07-07 20:22:36 +02:00
mi_send_resuming_command "exec-continue" \
"continuing execution to enter do_nested_struct_union_tests"
mi_expect_stop "breakpoint-hit" "do_nested_struct_union_tests" ".*" ".*" ".*" \
{.* disp="keep"} "Run till MI stops in do_nested_struct_union_tests"
set struct_ss_tree {
{struct s_a} a1 {
int a {}
}
{struct s_b} b1 {
int b {}
}
{union u_ab} u1 {
{struct s_a} a {
int a {}
}
{struct s_b} b {
int b {}
}
}
anonymous union {
{struct s_a} a2 {
int a {}
}
{struct s_b} b2 {
int b {}
}
}
{union {...}} u2 {
{struct s_a} a3 {
int a {}
}
{struct s_b} b3 {
int b {}
}
}
}
set tree "
{struct ss} var {
$struct_ss_tree
}
"
mi_walk_varobj_tree c $tree verify_everything
set tree {
{struct {...}} var2 {
{td_u_ab} ab {
{td_s_a} a {
int a {}
}
{td_s_b} b {
int b {}
}
}
}
}
mi_walk_varobj_tree c $tree verify_everything
set tree "
{struct ss *} ss_ptr {
$struct_ss_tree
}
"
mi_walk_varobj_tree c $tree verify_everything
mi_gdb_exit
return 0