📄 mi-var-child.exp
字号:
mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \ "\\^done,numchild=\"10\"" \ "get number of children of struct_declarations.s2.u2.u1s1.e"# Test: c_variable-4.71# Desc: children of struct_declarations.s2.u2.u1s1.funcmi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \ "\\^done,numchild=\"0\"" \ "get children of struct_declarations.s2.u2.u1s1.func"# Test: c_variable-4.72# Desc: number of children of struct_declarations.s2.u2.u1s1.funcmi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \ "\\^done,numchild=\"0\"" \ "get number of children of struct_declarations.s2.u2.u1s1.func"# Test: c_variable-4.73# Desc: children of struct_declarations.s2.u2.u1s1.foomi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \ "\\^done,numchild=\"0\"" \ "get children of struct_declarations.s2.u2.u1s1.foo"# Test: c_variable-4.74# Desc: number of children of struct_declarations.s2.u2.u1s1.foomi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \ "\\^done,numchild=\"0\"" \ "get number of children of struct_declarations.s2.u2.u1s1.foo"# Test: c_variable-4.75# Desc: children of struct_declarations.s2.u2.u1s2.array_ptrmi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \ "\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\\\]" \ "get children of struct_declarations.s2.u2.u1s2.array_ptr"# Test: c_variable-4.76# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptrmi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \ "\\^done,numchild=\"2\"" \ "get number of children of struct_declarations.s2.u2.u1s2.array_ptr"# Test: c_variable-4.77# Desc: children of struct_declarations.s2.u2.u1s2.funcmi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \ "\\^done,numchild=\"0\"" \ "get children of struct_declarations.s2.u2.u1s2.func"# Test: c_variable-4.78# Desc: number of children of struct_declarations.s2.u2.u1s2.funcmi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \ "\\^done,numchild=\"0\"" \ "get number of children of struct_declarations.s2.u2.u1s2.func"# Test: c_variable-4.79# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptrmi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \ "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"#} {**int_ptr_ptr}# Test: c_variable-4.80# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptrmi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \ "\\^done,numchild=\"1\"" \ "get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"# Step to "struct_declarations.integer = 123;"set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]mi_step_to do_children_tests {} {.*var-cmd.c} \ $line_dct_123 "step to line \$line_dct_123"# Test: c_variable-4.81# Desc: create local variable "weird"mi_gdb_test "-var-create weird * weird" \ "\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \ "create local variable weird"# Test: c_variable-4.82# Desc: children of weirdmi_gdb_test "-var-list-children weird" \ "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ "get children of weird"# Test: c_variable-4.83# Desc: number of children of weirdmi_gdb_test "-var-info-num-children weird" \ "\\^done,numchild=\"11\"" \ "get number of children of weird"# Test: c_variable-4.84# Desc: children of weird->long_arraymi_gdb_test "-var-list-children weird.long_array" \ "\\^done,numchild=\"10\",children=\\\[child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \ "get children of weird.long_array"#gdbtk_test c_variable-4.84 {children of weird->long_array} {# get_children weird.long_array#} {0 1 2 3 4 5 6 7 8 9}# Test: c_variable-4.85# Desc: number of children of weird.long_arraymi_gdb_test "-var-info-num-children weird.long_array" \ "\\^done,numchild=\"10\"" \ "get number of children of weird.long_array"# Test: c_variable-4.86# Desc: children of weird.int_ptr_ptrmi_gdb_test "-var-list-children weird.int_ptr_ptr" \ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \ "get children of weird.int_ptr_ptr"#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {# get_children weird.int_ptr_ptr#} {*int_ptr_ptr}# Test: c_variable-4.87# Desc: number of children of weird.int_ptr_ptrmi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \ "\\^done,numchild=\"1\"" \ "get number of children of weird.int_ptr_ptr"# Test: c_variable-4.88# Desc: children of *weird->int_ptr_ptrmi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \ "get children of weird.int_ptr_ptr.*int_ptr_ptr"#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {# get_children weird.int_ptr_ptr.*int_ptr_ptr#} {**int_ptr_ptr}# Test: c_variable-4.89# Desc: number of children *weird->int_ptr_ptrmi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \ "\\^done,numchild=\"1\"" \ "get number of children of weird.int_ptr_ptr.*int_ptr_ptr"# Test: c_variable-4.90# Desc: create weird->int_ptr_ptrmi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \ "\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \ "create local variable weird->int_ptr_ptr"# Test: c_variable-4.91# Desc: children of weird->int_ptr_ptrmi_gdb_test "-var-list-children weird->int_ptr_ptr" \ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \ "get children of weird->int_ptr_ptr"# Test: c_variable-4.92# Desc: number of children of (weird->int_ptr_ptr)mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \ "\\^done,numchild=\"1\"" \ "get number of children of weird->int_ptr_ptr"# Test: c_variable-4.93# Desc: children of *(weird->int_ptr_ptr)mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \ "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \ "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"# Test: c_variable-4.94# Desc: number of children of *(weird->int_ptr_ptr)mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \ "\\^done,numchild=\"1\"" \ "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"# Test: c_variable-4.95# Desc: children of *(*(weird->int_ptr_ptr))mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \ "\\^done,numchild=\"0\"" \ "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"# Test: c_variable-4.96# Desc: number of children of *(*(weird->int_ptr_ptr))mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \ "\\^done,numchild=\"0\"" \ "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"# Test: c_variable-4.97# Desc: is weird editablemi_gdb_test "-var-show-attributes weird" \ "\\^done,attr=\"editable\"" \ "is weird editable"# Test: c_variable-4.98# Desc: is weird->int_ptr_ptr editablemi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \ "\\^done,attr=\"editable\"" \ "is weird->int_ptr_ptr editable"# Test: c_variable-4.99# Desc: is *(weird->int_ptr_ptr) editablemi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \ "\\^done,attr=\"editable\"" \ "is weird.int_ptr_ptr.*int_ptr_ptr editable"# Test: c_variable-4.100# Desc: is *(*(weird->int_ptr_ptr)) editablemi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \ "\\^done,attr=\"editable\"" \ "is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"# Test: c_variable-4.101# Desc: is weird->u1 editablemi_gdb_test "-var-show-attributes weird.u1" \ "\\^done,attr=\"noneditable\"" \ "is weird.u1 editable"# Test: c_variable-4.102# Desc: is weird->s2 editablemi_gdb_test "-var-show-attributes weird.s2" \ "\\^done,attr=\"noneditable\"" \ "is weird.s2 editable"# Test: c_variable-4.103# Desc: is struct_declarations.u1.a editablemi_gdb_test "-var-show-attributes struct_declarations.u1.a" \ "\\^done,attr=\"editable\"" \ "is struct_declarations.u1.a editable"# Test: c_variable-4.104# Desc: is struct_declarations.u1.b editablemi_gdb_test "-var-show-attributes struct_declarations.u1.b" \ "\\^done,attr=\"editable\"" \ "is struct_declarations.u1.b editable"# Test: c_variable-4.105# Desc: is struct_declarations.u1.c editablemi_gdb_test "-var-show-attributes struct_declarations.u1.c" \ "\\^done,attr=\"editable\"" \ "is struct_declarations.u1.c editable"# Test: c_variable-4.106# Desc: is struct_declarations.long_array editablemi_gdb_test "-var-show-attributes struct_declarations.long_array" \ "\\^done,attr=\"noneditable\"" \ "is struct_declarations.long_array editable"# Test: c_variable-4.107
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -