⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mi-var-child.exp

📁 这个是LINUX下的GDB调度工具的源码
💻 EXP
📖 第 1 页 / 共 5 页
字号:
# Copyright 1999, 2000, 2001, 2002, 2004 Free Software Foundation# This Program Is Free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.# Test essential Machine interface (MI) operations## Verify that, using the MI, we can create, update, delete variables.#load_lib mi-support.expset MIFLAGS "-i=mi"gdb_exitif [mi_gdb_start] {    continue}set testfile "var-cmd"set srcfile ${testfile}.cset binfile ${objdir}/${subdir}/${testfile}if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."}mi_delete_breakpointsmi_gdb_reinitialize_dir $srcdir/$subdirmi_gdb_load ${binfile}mi_runto do_children_tests#####        ######                ## children tests ##                ######        ###### Test: c_variable-4.2# Desc: create variable "struct_declarations"mi_gdb_test "-var-create struct_declarations * struct_declarations" \	"\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \	"create local variable struct_declarations"# Test: c_variable-4.3# Desc: children of struct_declarations# STABS doesn't give us argument types for the func ptr structs, but# Dwarf 2 does.mi_gdb_test "-var-list-children struct_declarations" \	"\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \	"get children of struct_declarations"#gdbtk_test c_variable-4.3 {children of struct_declarations} {#  get_children  struct_declarations#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}# Test: c_variable-4.4# Desc: number of children of struct_declarationsmi_gdb_test "-var-info-num-children struct_declarations" \	"\\^done,numchild=\"11\"" \	"get number of children of struct_declarations"# Test: c_variable-4.5# Desc: children of struct_declarations.integermi_gdb_test "-var-list-children struct_declarations.integer" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.integer"# Test: c_variable-4.6# Desc: number of children of struct_declarations.integermi_gdb_test "-var-info-num-children struct_declarations.integer" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.integer"# Test: c_variable-4.7# Desc: children of struct_declarations.charactermi_gdb_test "-var-list-children struct_declarations.character" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.character"# Test: c_variable-4.8# Desc: number of children of struct_declarations.charactermi_gdb_test "-var-info-num-children struct_declarations.character" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.character"# Test: c_variable-4.9# Desc: children of struct_declarations.char_ptrmi_gdb_test "-var-list-children struct_declarations.char_ptr" \	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \	"get children of struct_declarations.char_ptr"# Test: c_variable-4.10# Desc: number of children of struct_declarations.char_ptrmi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \	"\\^done,numchild=\"1\"" \	"get number of children of struct_declarations.char_ptr"# Test: c_variable-4.11# Desc: children of struct_declarations.long_intmi_gdb_test "-var-list-children struct_declarations.long_int" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.long_int"# Test: c_variable-4.12# Desc: number of children of struct_declarations.long_intmi_gdb_test "-var-info-num-children struct_declarations.long_int" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.long_int"# Test: c_variable-4.13# Desc: children of int_ptr_ptrmi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \	"\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \	"get children of struct_declarations.int_ptr_ptr"#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {#  get_children struct_declarations.int_ptr_ptr#} {*int_ptr_ptr}# Test: c_variable-4.14# Desc: number of children of int_ptr_ptrmi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \	"\\^done,numchild=\"1\"" \	"get number of children of struct_declarations.int_ptr_ptr"# Test: c_variable-4.15# Desc: children of struct_declarations.long_arraymi_gdb_test "-var-list-children struct_declarations.long_array" \	"\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \	"get children of struct_declarations.long_array"# Test: c_variable-4.16# Desc: number of children of struct_declarations.long_arraymi_gdb_test "-var-info-num-children struct_declarations.long_array" \	"\\^done,numchild=\"10\"" \	"get number of children of struct_declarations.long_array"# Test: c_variable-4.17# Desc: children of struct_declarations.func_ptrmi_gdb_test "-var-list-children struct_declarations.func_ptr" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.func_ptr"# Test: c_variable-4.18# Desc: number of children of struct_declarations.func_ptrmi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.func_ptr"# Test: c_variable-4.19# Desc: children of struct_declarations.func_ptr_structmi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.func_ptr_struct"# Test: c_variable-4.20# Desc: number of children of struct_declarations.func_ptr_structmi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.func_ptr_struct"# Test: c_variable-4.21# Desc: children of struct_declarations.func_ptr_ptrmi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.func_ptr_ptr"# Test: c_variable-4.22# Desc: number of children of struct_declarations.func_ptr_ptrmi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.func_ptr_ptr"# Test: c_variable-4.23# Desc: children of struct_declarations.u1mi_gdb_test "-var-list-children struct_declarations.u1" \	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\\\]" \	"get children of struct_declarations.u1"# Test: c_variable-4.24# Desc: number of children of struct_declarations.u1mi_gdb_test "-var-info-num-children struct_declarations.u1" \	"\\^done,numchild=\"4\"" \	"get number of children of struct_declarations.u1"# Test: c_variable-4.25# Desc: children of struct_declarations.s2mi_gdb_test "-var-list-children struct_declarations.s2" \	"\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\\\]" \	"get children of struct_declarations.s2"#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {#  get_children struct_declarations.s2#} {u2 g h i}# Test: c_variable-4.26# Desc: number of children of struct_declarations.s2mi_gdb_test "-var-info-num-children struct_declarations.s2" \	"\\^done,numchild=\"4\"" \	"get number of children of struct_declarations.s2"# Test: c_variable-4.27# Desc: children of struct_declarations.long_array.1mi_gdb_test "-var-list-children struct_declarations.long_array.1" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.long_array.1"# Test: c_variable-4.28# Desc: number of children of struct_declarations.long_array.1mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.long_array.1"# Test: c_variable-4.29# Desc: children of struct_declarations.long_array.2mi_gdb_test "-var-list-children struct_declarations.long_array.2" \	"\\^done,numchild=\"0\"" \	"get children of struct_declarations.long_array.2"# Test: c_variable-4.30# Desc: number of children of struct_declarations.long_array.2mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \	"\\^done,numchild=\"0\"" \	"get number of children of struct_declarations.long_array.2"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -