# Copyright (C) 1999 2000 Cygnus Solutions
|
# Copyright (C) 1999 2000 Cygnus Solutions
|
#
|
#
|
# This Program Is Free software; you can redistribute it and/or modify
|
# This Program Is Free software; you can redistribute it and/or modify
|
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
# (at your option) any later version.
|
# (at your option) any later version.
|
#
|
#
|
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
#
|
#
|
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
# Please email any bugs, comments, and/or additions to this file to:
|
# Please email any bugs, comments, and/or additions to this file to:
|
# bug-gdb@prep.ai.mit.edu
|
# bug-gdb@prep.ai.mit.edu
|
|
|
# Test essential Machine interface (MI) operations
|
# Test essential Machine interface (MI) operations
|
#
|
#
|
# Verify that, using the MI, we can create, update, delete variables.
|
# Verify that, using the MI, we can create, update, delete variables.
|
#
|
#
|
|
|
|
|
load_lib mi-support.exp
|
load_lib mi-support.exp
|
|
|
gdb_exit
|
gdb_exit
|
if [mi_gdb_start] {
|
if [mi_gdb_start] {
|
continue
|
continue
|
}
|
}
|
|
|
set testfile "var-cmd"
|
set testfile "var-cmd"
|
set srcfile ${testfile}.c
|
set srcfile ${testfile}.c
|
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
|
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
}
|
}
|
|
|
mi_delete_breakpoints
|
mi_delete_breakpoints
|
mi_gdb_reinitialize_dir $srcdir/$subdir
|
mi_gdb_reinitialize_dir $srcdir/$subdir
|
mi_gdb_load ${binfile}
|
mi_gdb_load ${binfile}
|
|
|
mi_gdb_test "200-break-insert do_children_tests" \
|
mi_gdb_test "200-break-insert do_children_tests" \
|
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"190\",times=\"0\"\}" \
|
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"190\",times=\"0\"\}" \
|
"break-insert operation"
|
"break-insert operation"
|
|
|
mi_run_cmd
|
mi_run_cmd
|
# The running part has been checked already by mi_run_cmd
|
# The running part has been checked already by mi_run_cmd
|
gdb_expect {
|
gdb_expect {
|
-re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"190\"\}\r\n$mi_gdb_prompt$" {
|
-re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"190\"\}\r\n$mi_gdb_prompt$" {
|
pass "run to do_children_tests"
|
pass "run to do_children_tests"
|
}
|
}
|
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
|
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
|
timeout {fail "run to do_children_tests (timeout 2)"}
|
timeout {fail "run to do_children_tests (timeout 2)"}
|
}
|
}
|
|
|
##### #####
|
##### #####
|
# #
|
# #
|
# children tests #
|
# children tests #
|
# #
|
# #
|
##### #####
|
##### #####
|
|
|
|
|
# Test: c_variable-4.2
|
# Test: c_variable-4.2
|
# Desc: create variable "struct_declarations"
|
# Desc: create variable "struct_declarations"
|
mi_gdb_test "-var-create struct_declarations * struct_declarations" \
|
mi_gdb_test "-var-create struct_declarations * struct_declarations" \
|
"\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \
|
"\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \
|
"create local variable struct_declarations"
|
"create local variable struct_declarations"
|
|
|
# Test: c_variable-4.3
|
# Test: c_variable-4.3
|
# Desc: children of struct_declarations
|
# Desc: children of struct_declarations
|
mi_gdb_test "-var-list-children struct_declarations" \
|
mi_gdb_test "-var-list-children struct_declarations" \
|
"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
|
"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
|
"get children of struct_declarations"
|
"get children of struct_declarations"
|
|
|
#gdbtk_test c_variable-4.3 {children of struct_declarations} {
|
#gdbtk_test c_variable-4.3 {children of struct_declarations} {
|
# get_children 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}
|
#} {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
|
# Test: c_variable-4.4
|
# Desc: number of children of struct_declarations
|
# Desc: number of children of struct_declarations
|
mi_gdb_test "-var-info-num-children struct_declarations" \
|
mi_gdb_test "-var-info-num-children struct_declarations" \
|
"\\^done,numchild=\"11\"" \
|
"\\^done,numchild=\"11\"" \
|
"get number of children of struct_declarations"
|
"get number of children of struct_declarations"
|
|
|
# Test: c_variable-4.5
|
# Test: c_variable-4.5
|
# Desc: children of struct_declarations.integer
|
# Desc: children of struct_declarations.integer
|
mi_gdb_test "-var-list-children struct_declarations.integer" \
|
mi_gdb_test "-var-list-children struct_declarations.integer" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.integer"
|
"get children of struct_declarations.integer"
|
|
|
# Test: c_variable-4.6
|
# Test: c_variable-4.6
|
# Desc: number of children of struct_declarations.integer
|
# Desc: number of children of struct_declarations.integer
|
mi_gdb_test "-var-info-num-children struct_declarations.integer" \
|
mi_gdb_test "-var-info-num-children struct_declarations.integer" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.integer"
|
"get number of children of struct_declarations.integer"
|
|
|
# Test: c_variable-4.7
|
# Test: c_variable-4.7
|
# Desc: children of struct_declarations.character
|
# Desc: children of struct_declarations.character
|
mi_gdb_test "-var-list-children struct_declarations.character" \
|
mi_gdb_test "-var-list-children struct_declarations.character" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.character"
|
"get children of struct_declarations.character"
|
|
|
# Test: c_variable-4.8
|
# Test: c_variable-4.8
|
# Desc: number of children of struct_declarations.character
|
# Desc: number of children of struct_declarations.character
|
mi_gdb_test "-var-info-num-children struct_declarations.character" \
|
mi_gdb_test "-var-info-num-children struct_declarations.character" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.character"
|
"get number of children of struct_declarations.character"
|
|
|
# Test: c_variable-4.9
|
# Test: c_variable-4.9
|
# Desc: children of struct_declarations.char_ptr
|
# Desc: children of struct_declarations.char_ptr
|
mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
|
mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.char_ptr"
|
"get children of struct_declarations.char_ptr"
|
|
|
# Test: c_variable-4.10
|
# Test: c_variable-4.10
|
# Desc: number of children of struct_declarations.char_ptr
|
# Desc: number of children of struct_declarations.char_ptr
|
mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
|
mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.char_ptr"
|
"get number of children of struct_declarations.char_ptr"
|
|
|
# Test: c_variable-4.11
|
# Test: c_variable-4.11
|
# Desc: children of struct_declarations.long_int
|
# Desc: children of struct_declarations.long_int
|
mi_gdb_test "-var-list-children struct_declarations.long_int" \
|
mi_gdb_test "-var-list-children struct_declarations.long_int" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_int"
|
"get children of struct_declarations.long_int"
|
|
|
# Test: c_variable-4.12
|
# Test: c_variable-4.12
|
# Desc: number of children of struct_declarations.long_int
|
# Desc: number of children of struct_declarations.long_int
|
mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_int"
|
"get number of children of struct_declarations.long_int"
|
|
|
# Test: c_variable-4.13
|
# Test: c_variable-4.13
|
# Desc: children of int_ptr_ptr
|
# Desc: children of int_ptr_ptr
|
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \
|
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
|
"get children of struct_declarations.int_ptr_ptr"
|
"get children of struct_declarations.int_ptr_ptr"
|
|
|
#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
|
#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
|
# get_children struct_declarations.int_ptr_ptr
|
# get_children struct_declarations.int_ptr_ptr
|
#} {*int_ptr_ptr}
|
#} {*int_ptr_ptr}
|
|
|
# Test: c_variable-4.14
|
# Test: c_variable-4.14
|
# Desc: number of children of int_ptr_ptr
|
# Desc: number of children of int_ptr_ptr
|
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of struct_declarations.int_ptr_ptr"
|
"get number of children of struct_declarations.int_ptr_ptr"
|
|
|
|
|
# Test: c_variable-4.15
|
# Test: c_variable-4.15
|
# Desc: children of struct_declarations.long_array
|
# Desc: children of struct_declarations.long_array
|
mi_gdb_test "-var-list-children struct_declarations.long_array" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
|
"get children of struct_declarations.long_array"
|
"get children of struct_declarations.long_array"
|
|
|
# Test: c_variable-4.16
|
# Test: c_variable-4.16
|
# Desc: number of children of struct_declarations.long_array
|
# Desc: number of children of struct_declarations.long_array
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
|
"\\^done,numchild=\"10\"" \
|
"\\^done,numchild=\"10\"" \
|
"get number of children of struct_declarations.long_array"
|
"get number of children of struct_declarations.long_array"
|
|
|
# Test: c_variable-4.17
|
# Test: c_variable-4.17
|
# Desc: children of struct_declarations.func_ptr
|
# Desc: children of struct_declarations.func_ptr
|
mi_gdb_test "-var-list-children struct_declarations.func_ptr" \
|
mi_gdb_test "-var-list-children struct_declarations.func_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.func_ptr"
|
"get children of struct_declarations.func_ptr"
|
|
|
|
|
# Test: c_variable-4.18
|
# Test: c_variable-4.18
|
# Desc: number of children of struct_declarations.func_ptr
|
# Desc: number of children of struct_declarations.func_ptr
|
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
|
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.func_ptr"
|
"get number of children of struct_declarations.func_ptr"
|
|
|
|
|
# Test: c_variable-4.19
|
# Test: c_variable-4.19
|
# Desc: children of struct_declarations.func_ptr_struct
|
# Desc: children of struct_declarations.func_ptr_struct
|
mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \
|
mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.func_ptr_struct"
|
"get children of struct_declarations.func_ptr_struct"
|
|
|
# Test: c_variable-4.20
|
# Test: c_variable-4.20
|
# Desc: number of children of struct_declarations.func_ptr_struct
|
# Desc: number of children of struct_declarations.func_ptr_struct
|
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
|
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.func_ptr_struct"
|
"get number of children of struct_declarations.func_ptr_struct"
|
|
|
|
|
# Test: c_variable-4.21
|
# Test: c_variable-4.21
|
# Desc: children of struct_declarations.func_ptr_ptr
|
# Desc: children of struct_declarations.func_ptr_ptr
|
mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \
|
mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.func_ptr_ptr"
|
"get children of struct_declarations.func_ptr_ptr"
|
|
|
# Test: c_variable-4.22
|
# Test: c_variable-4.22
|
# Desc: number of children of struct_declarations.func_ptr_ptr
|
# Desc: number of children of struct_declarations.func_ptr_ptr
|
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.func_ptr_ptr"
|
"get number of children of struct_declarations.func_ptr_ptr"
|
|
|
|
|
# Test: c_variable-4.23
|
# Test: c_variable-4.23
|
# Desc: children of struct_declarations.u1
|
# Desc: children of struct_declarations.u1
|
mi_gdb_test "-var-list-children struct_declarations.u1" \
|
mi_gdb_test "-var-list-children struct_declarations.u1" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
|
"get children of struct_declarations.u1"
|
"get children of struct_declarations.u1"
|
|
|
# Test: c_variable-4.24
|
# Test: c_variable-4.24
|
# Desc: number of children of struct_declarations.u1
|
# Desc: number of children of struct_declarations.u1
|
mi_gdb_test "-var-info-num-children struct_declarations.u1" \
|
mi_gdb_test "-var-info-num-children struct_declarations.u1" \
|
"\\^done,numchild=\"4\"" \
|
"\\^done,numchild=\"4\"" \
|
"get number of children of struct_declarations.u1"
|
"get number of children of struct_declarations.u1"
|
|
|
# Test: c_variable-4.25
|
# Test: c_variable-4.25
|
# Desc: children of struct_declarations.s2
|
# Desc: children of struct_declarations.s2
|
mi_gdb_test "-var-list-children struct_declarations.s2" \
|
mi_gdb_test "-var-list-children struct_declarations.s2" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\}" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\}" \
|
"get children of struct_declarations.s2"
|
"get children of struct_declarations.s2"
|
#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
|
#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
|
# get_children struct_declarations.s2
|
# get_children struct_declarations.s2
|
#} {u2 g h i}
|
#} {u2 g h i}
|
|
|
# Test: c_variable-4.26
|
# Test: c_variable-4.26
|
# Desc: number of children of struct_declarations.s2
|
# Desc: number of children of struct_declarations.s2
|
mi_gdb_test "-var-info-num-children struct_declarations.s2" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2" \
|
"\\^done,numchild=\"4\"" \
|
"\\^done,numchild=\"4\"" \
|
"get number of children of struct_declarations.s2"
|
"get number of children of struct_declarations.s2"
|
|
|
|
|
# Test: c_variable-4.27
|
# Test: c_variable-4.27
|
# Desc: children of struct_declarations.long_array.1
|
# Desc: children of struct_declarations.long_array.1
|
mi_gdb_test "-var-list-children struct_declarations.long_array.1" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.1" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.1"
|
"get children of struct_declarations.long_array.1"
|
|
|
# Test: c_variable-4.28
|
# Test: c_variable-4.28
|
# Desc: number of children of struct_declarations.long_array.1
|
# Desc: number of children of struct_declarations.long_array.1
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.1"
|
"get number of children of struct_declarations.long_array.1"
|
|
|
# Test: c_variable-4.29
|
# Test: c_variable-4.29
|
# Desc: children of struct_declarations.long_array.2
|
# Desc: children of struct_declarations.long_array.2
|
mi_gdb_test "-var-list-children struct_declarations.long_array.2" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.2" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.2"
|
"get children of struct_declarations.long_array.2"
|
|
|
# Test: c_variable-4.30
|
# Test: c_variable-4.30
|
# Desc: number of children of struct_declarations.long_array.2
|
# Desc: number of children of struct_declarations.long_array.2
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.2"
|
"get number of children of struct_declarations.long_array.2"
|
|
|
# Test: c_variable-4.31
|
# Test: c_variable-4.31
|
# Desc: children of struct_declarations.long_array.3
|
# Desc: children of struct_declarations.long_array.3
|
mi_gdb_test "-var-list-children struct_declarations.long_array.3" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.3" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.3"
|
"get children of struct_declarations.long_array.3"
|
|
|
# Test: c_variable-4.32
|
# Test: c_variable-4.32
|
# Desc: number of children of struct_declarations.long_array.3
|
# Desc: number of children of struct_declarations.long_array.3
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.3"
|
"get number of children of struct_declarations.long_array.3"
|
|
|
# Test: c_variable-4.33
|
# Test: c_variable-4.33
|
# Desc: children of struct_declarations.long_array.4
|
# Desc: children of struct_declarations.long_array.4
|
mi_gdb_test "-var-list-children struct_declarations.long_array.4" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.4" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.4"
|
"get children of struct_declarations.long_array.4"
|
|
|
# Test: c_variable-4.34
|
# Test: c_variable-4.34
|
# Desc: number of children of struct_declarations.long_array.4
|
# Desc: number of children of struct_declarations.long_array.4
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.4"
|
"get number of children of struct_declarations.long_array.4"
|
|
|
# Test: c_variable-4.35
|
# Test: c_variable-4.35
|
# Desc: children of struct_declarations.long_array.5
|
# Desc: children of struct_declarations.long_array.5
|
mi_gdb_test "-var-list-children struct_declarations.long_array.5" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.5" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.5"
|
"get children of struct_declarations.long_array.5"
|
|
|
# Test: c_variable-4.36
|
# Test: c_variable-4.36
|
# Desc: number of children of struct_declarations.long_array.5
|
# Desc: number of children of struct_declarations.long_array.5
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.5"
|
"get number of children of struct_declarations.long_array.5"
|
|
|
# Test: c_variable-4.37
|
# Test: c_variable-4.37
|
# Desc: children of struct_declarations.long_array.6
|
# Desc: children of struct_declarations.long_array.6
|
mi_gdb_test "-var-list-children struct_declarations.long_array.6" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.6" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.6"
|
"get children of struct_declarations.long_array.6"
|
|
|
# Test: c_variable-4.38
|
# Test: c_variable-4.38
|
# Desc: number of children of struct_declarations.long_array.6
|
# Desc: number of children of struct_declarations.long_array.6
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.6"
|
"get number of children of struct_declarations.long_array.6"
|
|
|
# Test: c_variable-4.39
|
# Test: c_variable-4.39
|
# Desc: children of struct_declarations.long_array.7
|
# Desc: children of struct_declarations.long_array.7
|
mi_gdb_test "-var-list-children struct_declarations.long_array.7" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.7" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.7"
|
"get children of struct_declarations.long_array.7"
|
|
|
# Test: c_variable-4.40
|
# Test: c_variable-4.40
|
# Desc: number of children of struct_declarations.long_array.7
|
# Desc: number of children of struct_declarations.long_array.7
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.7"
|
"get number of children of struct_declarations.long_array.7"
|
|
|
# Test: c_variable-4.41
|
# Test: c_variable-4.41
|
# Desc: children of struct_declarations.long_array.8
|
# Desc: children of struct_declarations.long_array.8
|
mi_gdb_test "-var-list-children struct_declarations.long_array.8" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.8" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.8"
|
"get children of struct_declarations.long_array.8"
|
|
|
# Test: c_variable-4.42
|
# Test: c_variable-4.42
|
# Desc: number of children of struct_declarations.long_array.8
|
# Desc: number of children of struct_declarations.long_array.8
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.8"
|
"get number of children of struct_declarations.long_array.8"
|
|
|
|
|
# Test: c_variable-4.43
|
# Test: c_variable-4.43
|
# Desc: children of struct_declarations.long_array.9
|
# Desc: children of struct_declarations.long_array.9
|
mi_gdb_test "-var-list-children struct_declarations.long_array.9" \
|
mi_gdb_test "-var-list-children struct_declarations.long_array.9" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.long_array.9"
|
"get children of struct_declarations.long_array.9"
|
|
|
# Test: c_variable-4.44
|
# Test: c_variable-4.44
|
# Desc: number of children of struct_declarations.long_array.9
|
# Desc: number of children of struct_declarations.long_array.9
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \
|
mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.long_array.9"
|
"get number of children of struct_declarations.long_array.9"
|
|
|
# Test: c_variable-4.45
|
# Test: c_variable-4.45
|
# Desc: children of struct_declarations.u1.a
|
# Desc: children of struct_declarations.u1.a
|
mi_gdb_test "-var-list-children struct_declarations.u1.a" \
|
mi_gdb_test "-var-list-children struct_declarations.u1.a" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.u1.a"
|
"get children of struct_declarations.u1.a"
|
|
|
# Test: c_variable-4.46
|
# Test: c_variable-4.46
|
# Desc: number of children of struct_declarations.u1.a
|
# Desc: number of children of struct_declarations.u1.a
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.u1.a"
|
"get number of children of struct_declarations.u1.a"
|
|
|
# Test: c_variable-4.47
|
# Test: c_variable-4.47
|
# Desc: children of struct_declarations.u1.b
|
# Desc: children of struct_declarations.u1.b
|
mi_gdb_test "-var-list-children struct_declarations.u1.b" \
|
mi_gdb_test "-var-list-children struct_declarations.u1.b" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.u1.b"
|
"get children of struct_declarations.u1.b"
|
|
|
# Test: c_variable-4.48
|
# Test: c_variable-4.48
|
# Desc: number of children of struct_declarations.u1.b
|
# Desc: number of children of struct_declarations.u1.b
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.u1.b"
|
"get number of children of struct_declarations.u1.b"
|
|
|
# Test: c_variable-4.49
|
# Test: c_variable-4.49
|
# Desc: children of struct_declarations.u1.c
|
# Desc: children of struct_declarations.u1.c
|
mi_gdb_test "-var-list-children struct_declarations.u1.c" \
|
mi_gdb_test "-var-list-children struct_declarations.u1.c" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.u1.c"
|
"get children of struct_declarations.u1.c"
|
|
|
# Test: c_variable-4.50
|
# Test: c_variable-4.50
|
# Desc: number of children of struct_declarations.u1.c
|
# Desc: number of children of struct_declarations.u1.c
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.u1.c"
|
"get number of children of struct_declarations.u1.c"
|
|
|
# Test: c_variable-4.51
|
# Test: c_variable-4.51
|
# Desc: children of struct_declarations.u1.d
|
# Desc: children of struct_declarations.u1.d
|
mi_gdb_test "-var-list-children struct_declarations.u1.d" \
|
mi_gdb_test "-var-list-children struct_declarations.u1.d" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.u1.d"
|
"get children of struct_declarations.u1.d"
|
|
|
|
|
# Test: c_variable-4.52
|
# Test: c_variable-4.52
|
# Desc: number of children of struct_declarations.u1.d
|
# Desc: number of children of struct_declarations.u1.d
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
|
mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.u1.d"
|
"get number of children of struct_declarations.u1.d"
|
|
|
|
|
# Test: c_variable-4.53
|
# Test: c_variable-4.53
|
# Desc: children of struct_declarations.s2.u2
|
# Desc: children of struct_declarations.s2.u2
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2" \
|
"\\^done,numchild=\"3\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
|
"\\^done,numchild=\"3\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
|
"get children of struct_declarations.s2.u2"
|
"get children of struct_declarations.s2.u2"
|
|
|
# Test: c_variable-4.54
|
# Test: c_variable-4.54
|
# Desc: number of children of struct_declarations.s2.u2
|
# Desc: number of children of struct_declarations.s2.u2
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
|
"\\^done,numchild=\"3\"" \
|
"\\^done,numchild=\"3\"" \
|
"get number of children of struct_declarations.s2.u2"
|
"get number of children of struct_declarations.s2.u2"
|
|
|
# Test: c_variable-4.55
|
# Test: c_variable-4.55
|
# Desc: children of struct_declarations.s2.g
|
# Desc: children of struct_declarations.s2.g
|
mi_gdb_test "-var-list-children struct_declarations.s2.g" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.g" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.g"
|
"get children of struct_declarations.s2.g"
|
|
|
# Test: c_variable-4.56
|
# Test: c_variable-4.56
|
# Desc: number of children of struct_declarations.s2.g
|
# Desc: number of children of struct_declarations.s2.g
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.g"
|
"get number of children of struct_declarations.s2.g"
|
|
|
|
|
# Test: c_variable-4.57
|
# Test: c_variable-4.57
|
# Desc: children of struct_declarations.s2.h
|
# Desc: children of struct_declarations.s2.h
|
mi_gdb_test "-var-list-children struct_declarations.s2.h" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.h" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.h"
|
"get children of struct_declarations.s2.h"
|
|
|
# Test: c_variable-4.58
|
# Test: c_variable-4.58
|
# Desc: number of children of struct_declarations.s2.h
|
# Desc: number of children of struct_declarations.s2.h
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.h"
|
"get number of children of struct_declarations.s2.h"
|
|
|
|
|
# Test: c_variable-4.59
|
# Test: c_variable-4.59
|
# Desc: children of struct_declarations.s2.i
|
# Desc: children of struct_declarations.s2.i
|
mi_gdb_test "-var-list-children struct_declarations.s2.i" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.i" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
|
"get children of struct_declarations.s2.i"
|
"get children of struct_declarations.s2.i"
|
|
|
# Test: c_variable-4.60
|
# Test: c_variable-4.60
|
# Desc: number of children of struct_declarations.s2.i
|
# Desc: number of children of struct_declarations.s2.i
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
|
"\\^done,numchild=\"10\"" \
|
"\\^done,numchild=\"10\"" \
|
"get number of children of struct_declarations.s2.i"
|
"get number of children of struct_declarations.s2.i"
|
|
|
# Test: c_variable-4.61
|
# Test: c_variable-4.61
|
# Desc: children of struct_declarations.s2.u2.u1s1
|
# Desc: children of struct_declarations.s2.u2.u1s1
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
|
"get children of struct_declarations.s2.u2.u1s1"
|
"get children of struct_declarations.s2.u2.u1s1"
|
|
|
# Test: c_variable-4.62
|
# Test: c_variable-4.62
|
# Desc: number of children of struct_declarations.s2.u2.u1s1
|
# Desc: number of children of struct_declarations.s2.u2.u1s1
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
|
"\\^done,numchild=\"4\"" \
|
"\\^done,numchild=\"4\"" \
|
"get number of children of struct_declarations.s2.u2.u1s1"
|
"get number of children of struct_declarations.s2.u2.u1s1"
|
|
|
# Test: c_variable-4.63
|
# Test: c_variable-4.63
|
# Desc: children of struct_declarations.s2.u2.f
|
# Desc: children of struct_declarations.s2.u2.f
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.u2.f"
|
"get children of struct_declarations.s2.u2.f"
|
|
|
# Test: c_variable-4.64
|
# Test: c_variable-4.64
|
# Desc: number of children of struct_declarations.s2.u2.f
|
# Desc: number of children of struct_declarations.s2.u2.f
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.u2.f"
|
"get number of children of struct_declarations.s2.u2.f"
|
|
|
# Test: c_variable-4.65
|
# Test: c_variable-4.65
|
# Desc: children of struct_declarations.s2.u2.u1s2
|
# Desc: children of struct_declarations.s2.u2.u1s2
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \
|
"\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\(\\)\"\}\}" \
|
"\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\(\\)\"\}\}" \
|
"get children of struct_declarations.s2.u2.u1s2"
|
"get children of struct_declarations.s2.u2.u1s2"
|
|
|
# Test: c_variable-4.66
|
# Test: c_variable-4.66
|
# Desc: number of children of struct_declarations.s2.u2.u1s2
|
# Desc: number of children of struct_declarations.s2.u2.u1s2
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
|
"\\^done,numchild=\"2\"" \
|
"\\^done,numchild=\"2\"" \
|
"get number of children of struct_declarations.s2.u2.u1s2"
|
"get number of children of struct_declarations.s2.u2.u1s2"
|
|
|
# Test: c_variable-4.67
|
# Test: c_variable-4.67
|
# Desc: children of struct_declarations.s2.u2.u1s1.d
|
# Desc: children of struct_declarations.s2.u2.u1s1.d
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.u2.u1s1.d"
|
"get children of struct_declarations.s2.u2.u1s1.d"
|
|
|
# Test: c_variable-4.68
|
# Test: c_variable-4.68
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.d
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.d
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.u2.u1s1.d"
|
"get number of children of struct_declarations.s2.u2.u1s1.d"
|
|
|
# Test: c_variable-4.69
|
# Test: c_variable-4.69
|
# Desc: children of struct_declarations.s2.u2.u1s1.e
|
# Desc: children of struct_declarations.s2.u2.u1s1.e
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\}" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\}" \
|
"get children of struct_declarations.s2.u2.u1s1.e"
|
"get children of struct_declarations.s2.u2.u1s1.e"
|
|
|
# Test: c_variable-4.70
|
# Test: c_variable-4.70
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.e
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.e
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
|
"\\^done,numchild=\"10\"" \
|
"\\^done,numchild=\"10\"" \
|
"get number of children of struct_declarations.s2.u2.u1s1.e"
|
"get number of children of struct_declarations.s2.u2.u1s1.e"
|
|
|
|
|
# Test: c_variable-4.71
|
# Test: c_variable-4.71
|
# Desc: children of struct_declarations.s2.u2.u1s1.func
|
# Desc: children of struct_declarations.s2.u2.u1s1.func
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.u2.u1s1.func"
|
"get children of struct_declarations.s2.u2.u1s1.func"
|
|
|
# Test: c_variable-4.72
|
# Test: c_variable-4.72
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.func
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.func
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.u2.u1s1.func"
|
"get number of children of struct_declarations.s2.u2.u1s1.func"
|
|
|
|
|
# Test: c_variable-4.73
|
# Test: c_variable-4.73
|
# Desc: children of struct_declarations.s2.u2.u1s1.foo
|
# Desc: children of struct_declarations.s2.u2.u1s1.foo
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.u2.u1s1.foo"
|
"get children of struct_declarations.s2.u2.u1s1.foo"
|
|
|
# Test: c_variable-4.74
|
# Test: c_variable-4.74
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
|
# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.u2.u1s1.foo"
|
"get number of children of struct_declarations.s2.u2.u1s1.foo"
|
|
|
|
|
# Test: c_variable-4.75
|
# Test: c_variable-4.75
|
# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
|
# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \
|
"\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\}" \
|
"\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\}" \
|
"get children of struct_declarations.s2.u2.u1s2.array_ptr"
|
"get children of struct_declarations.s2.u2.u1s2.array_ptr"
|
|
|
# Test: c_variable-4.76
|
# Test: c_variable-4.76
|
# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
|
# 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" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \
|
"\\^done,numchild=\"2\"" \
|
"\\^done,numchild=\"2\"" \
|
"get number of children of struct_declarations.s2.u2.u1s2.array_ptr"
|
"get number of children of struct_declarations.s2.u2.u1s2.array_ptr"
|
|
|
# Test: c_variable-4.77
|
# Test: c_variable-4.77
|
# Desc: children of struct_declarations.s2.u2.u1s2.func
|
# Desc: children of struct_declarations.s2.u2.u1s2.func
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \
|
mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of struct_declarations.s2.u2.u1s2.func"
|
"get children of struct_declarations.s2.u2.u1s2.func"
|
|
|
# Test: c_variable-4.78
|
# Test: c_variable-4.78
|
# Desc: number of children of struct_declarations.s2.u2.u1s2.func
|
# Desc: number of children of struct_declarations.s2.u2.u1s2.func
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
|
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of struct_declarations.s2.u2.u1s2.func"
|
"get number of children of struct_declarations.s2.u2.u1s2.func"
|
|
|
# Test: c_variable-4.79
|
# Test: c_variable-4.79
|
# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
|
# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
|
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
|
mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
|
"get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
|
"get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
|
#} {**int_ptr_ptr}
|
#} {**int_ptr_ptr}
|
|
|
# Test: c_variable-4.80
|
# Test: c_variable-4.80
|
# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
|
# 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" \
|
mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
|
"get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
|
|
|
|
|
# Step to "struct_declarations.integer = 123;"
|
# Step to "struct_declarations.integer = 123;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"192\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"192\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
|
|
# Test: c_variable-4.81
|
# Test: c_variable-4.81
|
# Desc: create local variable "weird"
|
# Desc: create local variable "weird"
|
mi_gdb_test "-var-create weird * weird" \
|
mi_gdb_test "-var-create weird * weird" \
|
"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
|
"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
|
"create local variable weird"
|
"create local variable weird"
|
|
|
# Test: c_variable-4.82
|
# Test: c_variable-4.82
|
# Desc: children of weird
|
# Desc: children of weird
|
mi_gdb_test "-var-list-children weird" \
|
mi_gdb_test "-var-list-children weird" \
|
"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
|
"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
|
"get children of weird"
|
"get children of weird"
|
|
|
# Test: c_variable-4.83
|
# Test: c_variable-4.83
|
# Desc: number of children of weird
|
# Desc: number of children of weird
|
mi_gdb_test "-var-info-num-children weird" \
|
mi_gdb_test "-var-info-num-children weird" \
|
"\\^done,numchild=\"11\"" \
|
"\\^done,numchild=\"11\"" \
|
"get number of children of weird"
|
"get number of children of weird"
|
|
|
|
|
# Test: c_variable-4.84
|
# Test: c_variable-4.84
|
# Desc: children of weird->long_array
|
# Desc: children of weird->long_array
|
mi_gdb_test "-var-list-children weird.long_array" \
|
mi_gdb_test "-var-list-children weird.long_array" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
|
"\\^done,numchild=\"10\",children=\{child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
|
"get children of weird.long_array"
|
"get children of weird.long_array"
|
#gdbtk_test c_variable-4.84 {children of weird->long_array} {
|
#gdbtk_test c_variable-4.84 {children of weird->long_array} {
|
# get_children weird.long_array
|
# get_children weird.long_array
|
#} {0 1 2 3 4 5 6 7 8 9}
|
#} {0 1 2 3 4 5 6 7 8 9}
|
|
|
# Test: c_variable-4.85
|
# Test: c_variable-4.85
|
# Desc: number of children of weird.long_array
|
# Desc: number of children of weird.long_array
|
mi_gdb_test "-var-info-num-children weird.long_array" \
|
mi_gdb_test "-var-info-num-children weird.long_array" \
|
"\\^done,numchild=\"10\"" \
|
"\\^done,numchild=\"10\"" \
|
"get number of children of weird.long_array"
|
"get number of children of weird.long_array"
|
|
|
# Test: c_variable-4.86
|
# Test: c_variable-4.86
|
# Desc: children of weird.int_ptr_ptr
|
# Desc: children of weird.int_ptr_ptr
|
mi_gdb_test "-var-list-children weird.int_ptr_ptr" \
|
mi_gdb_test "-var-list-children weird.int_ptr_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
|
"get children of weird.int_ptr_ptr"
|
"get children of weird.int_ptr_ptr"
|
#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
|
#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
|
# get_children weird.int_ptr_ptr
|
# get_children weird.int_ptr_ptr
|
#} {*int_ptr_ptr}
|
#} {*int_ptr_ptr}
|
|
|
# Test: c_variable-4.87
|
# Test: c_variable-4.87
|
# Desc: number of children of weird.int_ptr_ptr
|
# Desc: number of children of weird.int_ptr_ptr
|
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of weird.int_ptr_ptr"
|
"get number of children of weird.int_ptr_ptr"
|
|
|
# Test: c_variable-4.88
|
# Test: c_variable-4.88
|
# Desc: children of *weird->int_ptr_ptr
|
# Desc: children of *weird->int_ptr_ptr
|
mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \
|
mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
|
"get children of weird.int_ptr_ptr.*int_ptr_ptr"
|
"get children of weird.int_ptr_ptr.*int_ptr_ptr"
|
#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
|
#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
|
# get_children weird.int_ptr_ptr.*int_ptr_ptr
|
# get_children weird.int_ptr_ptr.*int_ptr_ptr
|
#} {**int_ptr_ptr}
|
#} {**int_ptr_ptr}
|
|
|
# Test: c_variable-4.89
|
# Test: c_variable-4.89
|
# Desc: number of children *weird->int_ptr_ptr
|
# Desc: number of children *weird->int_ptr_ptr
|
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of weird.int_ptr_ptr.*int_ptr_ptr"
|
"get number of children of weird.int_ptr_ptr.*int_ptr_ptr"
|
|
|
# Test: c_variable-4.90
|
# Test: c_variable-4.90
|
# Desc: create weird->int_ptr_ptr
|
# Desc: create weird->int_ptr_ptr
|
mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
|
mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
|
"\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \
|
"\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \
|
"create local variable weird->int_ptr_ptr"
|
"create local variable weird->int_ptr_ptr"
|
|
|
# Test: c_variable-4.91
|
# Test: c_variable-4.91
|
# Desc: children of weird->int_ptr_ptr
|
# Desc: children of weird->int_ptr_ptr
|
mi_gdb_test "-var-list-children weird->int_ptr_ptr" \
|
mi_gdb_test "-var-list-children weird->int_ptr_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
|
"get children of weird->int_ptr_ptr"
|
"get children of weird->int_ptr_ptr"
|
|
|
|
|
# Test: c_variable-4.92
|
# Test: c_variable-4.92
|
# Desc: number of children of (weird->int_ptr_ptr)
|
# Desc: number of children of (weird->int_ptr_ptr)
|
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of weird->int_ptr_ptr"
|
"get number of children of weird->int_ptr_ptr"
|
|
|
# Test: c_variable-4.93
|
# Test: c_variable-4.93
|
# Desc: children of *(weird->int_ptr_ptr)
|
# Desc: children of *(weird->int_ptr_ptr)
|
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
|
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
|
"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
|
"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
|
|
|
# Test: c_variable-4.94
|
# Test: c_variable-4.94
|
# Desc: number of children of *(weird->int_ptr_ptr)
|
# Desc: number of children of *(weird->int_ptr_ptr)
|
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
|
"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
|
|
|
# Test: c_variable-4.95
|
# Test: c_variable-4.95
|
# Desc: children of *(*(weird->int_ptr_ptr))
|
# Desc: children of *(*(weird->int_ptr_ptr))
|
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
|
mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of 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
|
# Test: c_variable-4.96
|
# Desc: number of children of *(*(weird->int_ptr_ptr))
|
# Desc: number of children of *(*(weird->int_ptr_ptr))
|
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
|
mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of 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
|
# Test: c_variable-4.97
|
# Desc: is weird editable
|
# Desc: is weird editable
|
mi_gdb_test "-var-show-attributes weird" \
|
mi_gdb_test "-var-show-attributes weird" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is weird editable"
|
"is weird editable"
|
|
|
# Test: c_variable-4.98
|
# Test: c_variable-4.98
|
# Desc: is weird->int_ptr_ptr editable
|
# Desc: is weird->int_ptr_ptr editable
|
mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
|
mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is weird->int_ptr_ptr editable"
|
"is weird->int_ptr_ptr editable"
|
|
|
# Test: c_variable-4.99
|
# Test: c_variable-4.99
|
# Desc: is *(weird->int_ptr_ptr) editable
|
# Desc: is *(weird->int_ptr_ptr) editable
|
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
|
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is weird.int_ptr_ptr.*int_ptr_ptr editable"
|
"is weird.int_ptr_ptr.*int_ptr_ptr editable"
|
|
|
# Test: c_variable-4.100
|
# Test: c_variable-4.100
|
# Desc: is *(*(weird->int_ptr_ptr)) editable
|
# Desc: is *(*(weird->int_ptr_ptr)) editable
|
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
|
mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"
|
"is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"
|
|
|
# Test: c_variable-4.101
|
# Test: c_variable-4.101
|
# Desc: is weird->u1 editable
|
# Desc: is weird->u1 editable
|
mi_gdb_test "-var-show-attributes weird.u1" \
|
mi_gdb_test "-var-show-attributes weird.u1" \
|
"\\^done,attr=\"noneditable\"" \
|
"\\^done,attr=\"noneditable\"" \
|
"is weird.u1 editable"
|
"is weird.u1 editable"
|
|
|
# Test: c_variable-4.102
|
# Test: c_variable-4.102
|
# Desc: is weird->s2 editable
|
# Desc: is weird->s2 editable
|
mi_gdb_test "-var-show-attributes weird.s2" \
|
mi_gdb_test "-var-show-attributes weird.s2" \
|
"\\^done,attr=\"noneditable\"" \
|
"\\^done,attr=\"noneditable\"" \
|
"is weird.s2 editable"
|
"is weird.s2 editable"
|
|
|
# Test: c_variable-4.103
|
# Test: c_variable-4.103
|
# Desc: is struct_declarations.u1.a editable
|
# Desc: is struct_declarations.u1.a editable
|
mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
|
mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is struct_declarations.u1.a editable"
|
"is struct_declarations.u1.a editable"
|
|
|
# Test: c_variable-4.104
|
# Test: c_variable-4.104
|
# Desc: is struct_declarations.u1.b editable
|
# Desc: is struct_declarations.u1.b editable
|
mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
|
mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is struct_declarations.u1.b editable"
|
"is struct_declarations.u1.b editable"
|
|
|
# Test: c_variable-4.105
|
# Test: c_variable-4.105
|
# Desc: is struct_declarations.u1.c editable
|
# Desc: is struct_declarations.u1.c editable
|
mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
|
mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is struct_declarations.u1.c editable"
|
"is struct_declarations.u1.c editable"
|
|
|
# Test: c_variable-4.106
|
# Test: c_variable-4.106
|
# Desc: is struct_declarations.long_array editable
|
# Desc: is struct_declarations.long_array editable
|
mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
|
mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
|
"\\^done,attr=\"noneditable\"" \
|
"\\^done,attr=\"noneditable\"" \
|
"is struct_declarations.long_array editable"
|
"is struct_declarations.long_array editable"
|
|
|
# Test: c_variable-4.107
|
# Test: c_variable-4.107
|
# Desc: is struct_declarations.long_array[0] editable
|
# Desc: is struct_declarations.long_array[0] editable
|
mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
|
mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
|
"\\^done,attr=\"editable\"" \
|
"\\^done,attr=\"editable\"" \
|
"is struct_declarations.long_array.0 editable"
|
"is struct_declarations.long_array.0 editable"
|
|
|
# Test: c_variable-4.108
|
# Test: c_variable-4.108
|
# Desc: is struct_declarations editable
|
# Desc: is struct_declarations editable
|
mi_gdb_test "-var-show-attributes struct_declarations" \
|
mi_gdb_test "-var-show-attributes struct_declarations" \
|
"\\^done,attr=\"noneditable\"" \
|
"\\^done,attr=\"noneditable\"" \
|
"is struct_declarations editable"
|
"is struct_declarations editable"
|
|
|
mi_gdb_test "-var-delete weird" \
|
mi_gdb_test "-var-delete weird" \
|
"\\^done,ndeleted=\"24\"" \
|
"\\^done,ndeleted=\"24\"" \
|
"delete var weird"
|
"delete var weird"
|
|
|
##### #####
|
##### #####
|
# #
|
# #
|
# children and update tests #
|
# children and update tests #
|
# #
|
# #
|
##### #####
|
##### #####
|
|
|
# Test: c_variable-5.1
|
# Test: c_variable-5.1
|
# Desc: check that nothing changed
|
# Desc: check that nothing changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{\}" \
|
"\\^done,changelist=\{\}" \
|
"update all vars. None changed"
|
"update all vars. None changed"
|
|
|
# Step over "struct_declarations.integer = 123;"
|
# Step over "struct_declarations.integer = 123;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"193\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"193\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.2
|
# Test: c_variable-5.2
|
# Desc: check that integer changed
|
# Desc: check that integer changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.integer"
|
"update all vars struct_declarations.integer"
|
|
|
# Step over:
|
# Step over:
|
# weird->char_ptr = "hello";
|
# weird->char_ptr = "hello";
|
# bar = 2121;
|
# bar = 2121;
|
# foo = &bar;
|
# foo = &bar;
|
|
|
send_gdb "-exec-step 3\n"
|
send_gdb "-exec-step 3\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"196\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"196\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.3
|
# Test: c_variable-5.3
|
# Desc: check that char_ptr changed
|
# Desc: check that char_ptr changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.char_ptr"
|
"update all vars struct_declarations.char_ptr"
|
|
|
# Step over "struct_declarations.int_ptr_ptr = &foo;"
|
# Step over "struct_declarations.int_ptr_ptr = &foo;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"197\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"197\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.4
|
# Test: c_variable-5.4
|
# Desc: check that int_ptr_ptr and children changed
|
# Desc: check that int_ptr_ptr and children changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars int_ptr_ptr and children changed"
|
"update all vars int_ptr_ptr and children changed"
|
|
|
# Step over "weird->long_array[0] = 1234;"
|
# Step over "weird->long_array[0] = 1234;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"198\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"198\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.5
|
# Test: c_variable-5.5
|
# Desc: check that long_array[0] changed
|
# Desc: check that long_array[0] changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.long_array.0 changed"
|
"update all vars struct_declarations.long_array.0 changed"
|
|
|
# Step over "struct_declarations.long_array[1] = 2345;"
|
# Step over "struct_declarations.long_array[1] = 2345;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"199\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"199\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.6
|
# Test: c_variable-5.6
|
# Desc: check that long_array[1] changed
|
# Desc: check that long_array[1] changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.long_array.1 changed"
|
"update all vars struct_declarations.long_array.1 changed"
|
|
|
# Step over "weird->long_array[2] = 3456;"
|
# Step over "weird->long_array[2] = 3456;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"200\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"200\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.7
|
# Test: c_variable-5.7
|
# Desc: check that long_array[2] changed
|
# Desc: check that long_array[2] changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.long_array.2 changed"
|
"update all vars struct_declarations.long_array.2 changed"
|
|
|
# Step over:
|
# Step over:
|
# struct_declarations.long_array[3] = 4567;
|
# struct_declarations.long_array[3] = 4567;
|
# weird->long_array[4] = 5678;
|
# weird->long_array[4] = 5678;
|
# struct_declarations.long_array[5] = 6789;
|
# struct_declarations.long_array[5] = 6789;
|
# weird->long_array[6] = 7890;
|
# weird->long_array[6] = 7890;
|
# struct_declarations.long_array[7] = 8901;
|
# struct_declarations.long_array[7] = 8901;
|
# weird->long_array[8] = 9012;
|
# weird->long_array[8] = 9012;
|
# struct_declarations.long_array[9] = 1234;
|
# struct_declarations.long_array[9] = 1234;
|
send_gdb "-exec-step 7\n"
|
send_gdb "-exec-step 7\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"208\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"208\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.8
|
# Test: c_variable-5.8
|
# Desc: check that long_array[3-9] changed
|
# Desc: check that long_array[3-9] changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.long_array.3-9 changed"
|
"update all vars struct_declarations.long_array.3-9 changed"
|
|
|
|
|
# Step over "weird->func_ptr = nothing;"
|
# Step over "weird->func_ptr = nothing;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"211\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"211\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.9
|
# Test: c_variable-5.9
|
# Desc: check that func_ptr changed
|
# Desc: check that func_ptr changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars struct_declarations.func_ptr changed"
|
"update all vars struct_declarations.func_ptr changed"
|
|
|
# Delete all variables
|
# Delete all variables
|
mi_gdb_test "-var-delete struct_declarations" \
|
mi_gdb_test "-var-delete struct_declarations" \
|
"\\^done,ndeleted=\"63\"" \
|
"\\^done,ndeleted=\"63\"" \
|
"delete var struct_declarations"
|
"delete var struct_declarations"
|
|
|
mi_gdb_test "-var-delete weird->int_ptr_ptr" \
|
mi_gdb_test "-var-delete weird->int_ptr_ptr" \
|
"\\^done,ndeleted=\"3\"" \
|
"\\^done,ndeleted=\"3\"" \
|
"delete var weird->int_ptr_ptr"
|
"delete var weird->int_ptr_ptr"
|
|
|
# Step over all lines:
|
# Step over all lines:
|
# ...
|
# ...
|
# psnp = &snp0;
|
# psnp = &snp0;
|
send_gdb "-exec-step 43\n"
|
send_gdb "-exec-step 43\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"254\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"254\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.10
|
# Test: c_variable-5.10
|
# Desc: create psnp->char_ptr
|
# Desc: create psnp->char_ptr
|
mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \
|
mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \
|
"\\^done,name=\"psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"" \
|
"\\^done,name=\"psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"" \
|
"create local variable psnp->char_ptr"
|
"create local variable psnp->char_ptr"
|
|
|
# Test: c_variable-5.11
|
# Test: c_variable-5.11
|
# Desc: children of psnp->char_ptr
|
# Desc: children of psnp->char_ptr
|
mi_gdb_test "-var-list-children psnp->char_ptr" \
|
mi_gdb_test "-var-list-children psnp->char_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
|
"get children of psnp->char_ptr"
|
"get children of psnp->char_ptr"
|
|
|
# Test: c_variable-5.12
|
# Test: c_variable-5.12
|
# Desc: number of children of psnp->char_ptr
|
# Desc: number of children of psnp->char_ptr
|
mi_gdb_test "-var-info-num-children psnp->char_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->char_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->char_ptr"
|
"get number of children of psnp->char_ptr"
|
|
|
# Test: c_variable-5.13
|
# Test: c_variable-5.13
|
# Desc: children of *(psnp->char_ptr)
|
# Desc: children of *(psnp->char_ptr)
|
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \
|
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
|
"get children of psnp->char_ptr.*psnp->char_ptr"
|
"get children of psnp->char_ptr.*psnp->char_ptr"
|
|
|
# Test: c_variable-5.14
|
# Test: c_variable-5.14
|
# Desc: number of children of *(psnp->char_ptr)
|
# Desc: number of children of *(psnp->char_ptr)
|
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->char_ptr.*psnp->char_ptr"
|
"get number of children of psnp->char_ptr.*psnp->char_ptr"
|
|
|
# Test: c_variable-5.15
|
# Test: c_variable-5.15
|
# Desc: children of *(*(psnp->char_ptr))
|
# Desc: children of *(*(psnp->char_ptr))
|
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
|
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
|
"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
|
"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
|
|
|
# Test: c_variable-5.16
|
# Test: c_variable-5.16
|
# Desc: number of children of *(*(psnp->char_ptr))
|
# Desc: number of children of *(*(psnp->char_ptr))
|
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
|
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
|
|
|
# Test: c_variable-5.17
|
# Test: c_variable-5.17
|
# Desc: children of *(*(*(psnp->char_ptr)))
|
# Desc: children of *(*(*(psnp->char_ptr)))
|
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
|
mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of 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"
|
|
|
# Test: c_variable-5.18
|
# Test: c_variable-5.18
|
# Desc: number of children of *(*(*(psnp->char_ptr)))
|
# 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" \
|
mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
|
"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
|
|
|
|
|
# Test: c_variable-5.19
|
# Test: c_variable-5.19
|
# Desc: create psnp->long_ptr
|
# Desc: create psnp->long_ptr
|
mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \
|
mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \
|
"\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \
|
"\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \
|
"create local variable psnp->long_ptr"
|
"create local variable psnp->long_ptr"
|
|
|
# Test: c_variable-5.20
|
# Test: c_variable-5.20
|
# Desc: children of psnp->long_ptr
|
# Desc: children of psnp->long_ptr
|
mi_gdb_test "-var-list-children psnp->long_ptr" \
|
mi_gdb_test "-var-list-children psnp->long_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\}" \
|
"get children of psnp->long_ptr"
|
"get children of psnp->long_ptr"
|
|
|
# Test: c_variable-5.21
|
# Test: c_variable-5.21
|
# Desc: number of children of psnp->long_ptr
|
# Desc: number of children of psnp->long_ptr
|
mi_gdb_test "-var-info-num-children psnp->long_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->long_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->long_ptr"
|
"get number of children of psnp->long_ptr"
|
|
|
# Test: c_variable-5.22
|
# Test: c_variable-5.22
|
# Desc: children of *(psnp->long_ptr)
|
# Desc: children of *(psnp->long_ptr)
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\}" \
|
"get children of psnp->long_ptr.*psnp->long_ptr"
|
"get children of psnp->long_ptr.*psnp->long_ptr"
|
|
|
|
|
# Test: c_variable-5.23
|
# Test: c_variable-5.23
|
# Desc: number of children of *(psnp->long_ptr)
|
# Desc: number of children of *(psnp->long_ptr)
|
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->long_ptr.*psnp->long_ptr"
|
"get number of children of psnp->long_ptr.*psnp->long_ptr"
|
|
|
# Test: c_variable-5.24
|
# Test: c_variable-5.24
|
# Desc: children of *(*(psnp->long_ptr))
|
# Desc: children of *(*(psnp->long_ptr))
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\}" \
|
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
|
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
|
|
|
# Test: c_variable-5.25
|
# Test: c_variable-5.25
|
# Desc: number of children of *(*(psnp->long_ptr))
|
# Desc: number of children of *(*(psnp->long_ptr))
|
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
|
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
|
|
|
# Test: c_variable-5.26
|
# Test: c_variable-5.26
|
# Desc: children of *(*(*(psnp->long_ptr)))
|
# Desc: children of *(*(*(psnp->long_ptr)))
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\}" \
|
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
|
"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
|
|
|
# Test: c_variable-5.27
|
# Test: c_variable-5.27
|
# Desc: number of children of *(*(*(psnp->long_ptr)))
|
# 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" \
|
mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
|
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
|
|
|
# Test: c_variable-5.28
|
# Test: c_variable-5.28
|
# Desc: children of *(*(*(*(psnp->long_ptr))))
|
# Desc: children of *(*(*(*(psnp->long_ptr))))
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
|
mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of 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
|
# Test: c_variable-5.29
|
# Desc: number of children of *(*(*(*(psnp->long_ptr))))
|
# 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" \
|
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\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
|
"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
|
# Test: c_variable-5.30
|
# Desc: create psnp->ptrs
|
# Desc: create psnp->ptrs
|
mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \
|
mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \
|
"\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
|
"\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
|
"create local variable psnp->ptrs"
|
"create local variable psnp->ptrs"
|
|
|
# Test: c_variable-5.31
|
# Test: c_variable-5.31
|
# Desc: children of psnp->ptrs
|
# Desc: children of psnp->ptrs
|
mi_gdb_test "-var-list-children psnp->ptrs" \
|
mi_gdb_test "-var-list-children psnp->ptrs" \
|
"\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"get children of psnp->ptrs"
|
"get children of psnp->ptrs"
|
|
|
# Test: c_variable-5.32
|
# Test: c_variable-5.32
|
# Desc: number of children of psnp->ptrs
|
# Desc: number of children of psnp->ptrs
|
mi_gdb_test "-var-info-num-children psnp->ptrs" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs" \
|
"\\^done,numchild=\"3\"" \
|
"\\^done,numchild=\"3\"" \
|
"get number of children of psnp->ptrs"
|
"get number of children of psnp->ptrs"
|
|
|
# Test: c_variable-5.33
|
# Test: c_variable-5.33
|
# Desc: children of psnp->ptrs[0]
|
# Desc: children of psnp->ptrs[0]
|
mi_gdb_test "-var-list-children psnp->ptrs.0" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"get children of psnp->ptrs.0"
|
"get children of psnp->ptrs.0"
|
|
|
# Test: c_variable-5.34
|
# Test: c_variable-5.34
|
# Desc: number of children of psnp->ptrs[0]
|
# Desc: number of children of psnp->ptrs[0]
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
|
"\\^done,numchild=\"4\"" \
|
"\\^done,numchild=\"4\"" \
|
"get number of children of psnp->ptrs.0"
|
"get number of children of psnp->ptrs.0"
|
|
|
# Test: c_variable-5.35
|
# Test: c_variable-5.35
|
# Desc: children of psnp->ptrs[0]->next
|
# Desc: children of psnp->ptrs[0]->next
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"get children of psnp->ptrs.0.next"
|
"get children of psnp->ptrs.0.next"
|
|
|
#} {char_ptr long_ptr ptrs next}
|
#} {char_ptr long_ptr ptrs next}
|
|
|
# Test: c_variable-5.36
|
# Test: c_variable-5.36
|
# Desc: number of children of psnp->ptrs[0]->next
|
# Desc: number of children of psnp->ptrs[0]->next
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
|
"\\^done,numchild=\"4\"" \
|
"\\^done,numchild=\"4\"" \
|
"get number of children of psnp->ptrs.0.next"
|
"get number of children of psnp->ptrs.0.next"
|
|
|
|
|
# Test: c_variable-5.37
|
# Test: c_variable-5.37
|
# Desc: children of psnp->ptrs[0]->next->char_ptr
|
# Desc: children of psnp->ptrs[0]->next->char_ptr
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
|
"get children of psnp->ptrs.0.next.char_ptr"
|
"get children of psnp->ptrs.0.next.char_ptr"
|
|
|
#gdbtk_test c_variable-5.37 {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
|
# get_children psnp->ptrs.0.next.char_ptr
|
#} {*char_ptr}
|
#} {*char_ptr}
|
|
|
# Test: c_variable-5.38
|
# Test: c_variable-5.38
|
# Desc: number of children of psnp->ptrs[0]->next->char_ptr
|
# Desc: number of children of psnp->ptrs[0]->next->char_ptr
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->ptrs.0.next.char_ptr"
|
"get number of children of psnp->ptrs.0.next.char_ptr"
|
|
|
# Test: c_variable-5.39
|
# Test: c_variable-5.39
|
# Desc: children of *psnp->ptrs[0]->next->char_ptr
|
# Desc: children of *psnp->ptrs[0]->next->char_ptr
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
|
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
|
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
|
|
|
# Test: c_variable-5.40
|
# Test: c_variable-5.40
|
# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
|
# 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" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"
|
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"
|
|
|
# Test: c_variable-5.41
|
# Test: c_variable-5.41
|
# Desc: children of **psnp->ptrs[0]->next->char_ptr
|
# Desc: children of **psnp->ptrs[0]->next->char_ptr
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
|
"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
|
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
|
|
# Test: c_variable-5.42
|
# Test: c_variable-5.42
|
# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
|
# 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" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
|
"\\^done,numchild=\"1\"" \
|
"\\^done,numchild=\"1\"" \
|
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
|
|
|
# Test: c_variable-5.43
|
# Test: c_variable-5.43
|
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
|
# Desc: children of ***psnp->ptrs[0]->next->char_ptr
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get children of psnp->ptrs.0.next.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.44
|
# Test: c_variable-5.44
|
# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
|
# 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" \
|
mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
|
"\\^done,numchild=\"0\"" \
|
"\\^done,numchild=\"0\"" \
|
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
|
|
|
# Test: c_variable-5.45
|
# Test: c_variable-5.45
|
# Desc: children of psnp->ptrs[0]->next->next
|
# Desc: children of psnp->ptrs[0]->next->next
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"get children of psnp->ptrs.0.next.next"
|
"get children of psnp->ptrs.0.next.next"
|
|
|
# Test: c_variable-5.46
|
# Test: c_variable-5.46
|
# Desc: children of psnp->ptrs[0]->next->next->ptrs
|
# Desc: children of psnp->ptrs[0]->next->next->ptrs
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
|
mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
|
"\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
|
"get children of psnp->ptrs.0.next.next.ptrs"
|
"get children of psnp->ptrs.0.next.next.ptrs"
|
|
|
# Step over "snp0.char_ptr = &b3;"
|
# Step over "snp0.char_ptr = &b3;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"255\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"255\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.47
|
# Test: c_variable-5.47
|
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
|
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
|
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
|
|
|
# Step over "snp1.char_ptr = &c3;"
|
# Step over "snp1.char_ptr = &c3;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"256\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"256\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
|
|
# Test: c_variable-5.48
|
# Test: c_variable-5.48
|
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
|
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
|
"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
|
|
|
|
|
# Step over "snp2.char_ptr = &a3;"
|
# Step over "snp2.char_ptr = &a3;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"257\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"257\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
|
|
# Test: c_variable-5.49
|
# Test: c_variable-5.49
|
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
|
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
|
"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
|
|
|
|
|
# Step over "snp0.long_ptr = &y3;"
|
# Step over "snp0.long_ptr = &y3;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"258\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"258\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
# Test: c_variable-5.50
|
# Test: c_variable-5.50
|
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
|
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars psnp->long_ptr (and 0.long_ptr) changed"
|
"update all vars psnp->long_ptr (and 0.long_ptr) changed"
|
|
|
|
|
# Step over "snp1.long_ptr = &x3;"
|
# Step over "snp1.long_ptr = &x3;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"259\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"259\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
|
|
# Test: c_variable-5.51
|
# Test: c_variable-5.51
|
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
|
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
|
# Why does this have a FIXME?
|
# Why does this have a FIXME?
|
setup_xfail *-*-*
|
setup_xfail *-*-*
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
|
"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
|
clear_xfail *-*-*
|
clear_xfail *-*-*
|
|
|
# This command produces this error message:
|
# This command produces this error message:
|
# &"warning: varobj_list: assertion failed - mycount <> 0\n"
|
# &"warning: varobj_list: assertion failed - mycount <> 0\n"
|
#
|
#
|
|
|
# Step over "snp2.long_ptr = &z3;"
|
# Step over "snp2.long_ptr = &z3;"
|
send_gdb "-exec-step\n"
|
send_gdb "-exec-step\n"
|
gdb_expect {
|
gdb_expect {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
|
-re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
|
pass "step at do_children_tests"
|
pass "step at do_children_tests"
|
}
|
}
|
timeout {
|
timeout {
|
fail "step at do_children_tests (timeout)"
|
fail "step at do_children_tests (timeout)"
|
}
|
}
|
}
|
}
|
|
|
|
|
# Test: c_variable-5.52
|
# Test: c_variable-5.52
|
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
|
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
|
mi_gdb_test "-var-update *" \
|
mi_gdb_test "-var-update *" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
|
"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
|
"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
|
|
|
|
|
|
|
|
|
mi_gdb_exit
|
mi_gdb_exit
|
return 0
|
return 0
|
|
|
# Local variables:
|
# Local variables:
|
# change-log-default-name: "ChangeLog-mi"
|
# change-log-default-name: "ChangeLog-mi"
|
# End:
|
# End:
|
|
|