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

📄 default.exp

📁 这个是LINUX下的GDB调度工具的源码
💻 EXP
📖 第 1 页 / 共 3 页
字号:
#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,#   2000, 2001, 2002, 2003#   Free Software Foundation, Inc.# This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  # Please email any bugs, comments, and/or additions to this file to:# bug-gdb@prep.ai.mit.edu# Start with a fresh gdbgdb_exitgdb_startset timeout 60## test default actions of gdb commands##load_lib gdb.expgdb_test "add-symbol-file" "add-symbol-file takes a file name and an address" "add-symbol-file"# test appendgdb_test "append" "\"append\" must be followed by a subcommand\.\[\r\n\]+List of append subcommands:.*" gdb_test "append binary" "\"append binary\" must be followed by a subcommand\.\[\r\n\]+List of append binary subcommands:.*" gdb_test "append memory" "Missing filename\." gdb_test "append value"  "Missing filename\." gdb_test "append binary memory" "Missing filename\." gdb_test "append binary value"  "Missing filename\." setup_xfail "mips-idt-*"send_gdb "attach\n"gdb_expect {    -re "Argument required .(process-id|program) to attach.*$gdb_prompt $"\			{ pass "attach" }    -re "You can't do that when your target is `None'.*$gdb_prompt $"\			{ pass "attach" }    -re "You can't do that without a process to debug.*$gdb_prompt $"\			{ pass "attach" }    -re "Don't know how to attach.  Try \"help target\"..*$gdb_prompt $"\			{ pass "attach" }    -re "Kill it. .y or n." {	send_gdb "y\n"	exp_continue    }    -re "$gdb_prompt $" { fail "attach" }    timeout { fail "(timeout) attach" }}if ![target_info exists use_gdb_stub] {    gdb_test "break" "No default breakpoint address now." "break"    foreach i "b br bre brea" {	gdb_test $i "No default breakpoint address now." "break \"$i\" abbreviation"    }        setup_xfail "mips-idt-*"    gdb_test "backtrace" "No stack."    # ba and bac are no longer unique command prefixes. So these tests    # elict an error from GDB.    # GDB needs to be fixed to map unique alias here for ba bac.    #    foreach i "bt ba bac" {	setup_xfail "mips-idt-*"	gdb_test $i "No stack." "backtrace \"$i\" abbreviation"    }} else {    warning "Skipping backtrace and break tests because of GDB stub."}# This works on the MIPS IDT board, but confuses future tests.if ![istarget "mips-idt-*"] then {    gdb_test "continue" "The program is not being run." "continue"    gdb_test "c" "The program is not being run." "continue \"c\" abbreviation"}#test callgdb_test "call" "The history is empty..*" "call"#test catchgdb_test "catch" "Catch requires an event name..*" "catch"#test cdgdb_test "cd" "Argument required .new working directory.*" "cd"#test cleargdb_test "clear" "No source file specified..*" "clear"#test commandsgdb_test "commands" "No breakpoint number 0..*" "commands"#test conditiongdb_test "condition" "Argument required .breakpoint number.*" "condition"#test core-filegdb_test "core-file" "No core file now.|GDB can't read core files on this machine." "core-file"#test delete "d" abbreviationgdb_test "d" "" "delete \"d\" abbreviation"#test deletegdb_test "delete" "" "delete"#test definegdb_test "define" "Argument required \[(\]name of command to define\[)\]." "define"#test delete breakpointsgdb_test "delete breakpoints" "" "delete breakpoints"#test delete display# FIXME -- need to dump full output to detailed logsend_gdb "delete display\n"gdb_expect {    -re "Delete all auto-display expressions.*y or n. $" {	send_gdb "y\n"	gdb_expect {	    -re "$gdb_prompt $"     { pass "delete display prompt" }	    timeout		{ fail "(timeout) delete display prompt" }	}    }    timeout		{ fail "(timeout) delete display prompt" }}#test detachgdb_test "detach" "" "detach"if [istarget "h8300-*-hms"] then {    gdb_exit    gdb_start}#test directory# FIXME -- need to dump full output to detailed logsend_gdb "directory\n"gdb_expect {    -re "Reinitialize source path to empty.*y or n. $"  {	send_gdb "y\n"	gdb_expect {	    -re "Source directories searched: .cdir:.cwd.*$gdb_prompt $"\		    { pass "directory prompt" }	    timeout		{ fail "(timeout) directory prompt" }	}    }}#test disable "dis" abbreviationgdb_test "dis" "" "disable \"dis\" abbreviation"#test disable "disa" abbreviationgdb_test "disa" "" "disable \"disa\" abbreviation"#test disablegdb_test "disable" "" "disable"#test disable breakpointsgdb_test "disable breakpoints" "" "disable breakpoints"#test disable displaygdb_test "disable display" "" "disable display"#test disassemblegdb_test "disassemble" "No frame selected." "disassemble"#test displaygdb_test "display" "" "display"#test dogdb_test "do" "No stack." "do"#test documentgdb_test "document" "Argument required .name of command to define.*" "document"#test downgdb_test "down" "No stack.*" "down"#test down-silentlygdb_test "down-silently" "No stack." "down-silently"# test dumpgdb_test "dump" "\"dump\" must be followed by a subcommand\.\[\r\n\]+List of dump subcommands:.*" gdb_test "dump binary" "\"dump binary\" must be followed by a subcommand\.\[\r\n\]+List of dump binary subcommands:.*" gdb_test "dump ihex" "\"dump ihex\" must be followed by a subcommand\.\[\r\n\]+List of dump ihex subcommands:.*" gdb_test "dump memory" "Missing filename\." gdb_test "dump srec" "\"dump srec\" must be followed by a subcommand\.\[\r\n\]+List of dump srec subcommands:.*" gdb_test "dump tekhex" "\"dump tekhex\" must be followed by a subcommand\.\[\r\n\]+List of dump tekhex subcommands:.*" gdb_test "dump value" "Missing filename\." gdb_test "dump binary memory" "Missing filename\." gdb_test "dump binary value"  "Missing filename\." gdb_test "dump ihex memory" "Missing filename\." gdb_test "dump ihex value"  "Missing filename\." gdb_test "dump srec memory" "Missing filename\." gdb_test "dump srec value"  "Missing filename\." gdb_test "dump tekhex memory" "Missing filename\." gdb_test "dump tekhex value"  "Missing filename\." #test echogdb_test "echo" "" "echo"#test enable breakpoints deletegdb_test "enable breakpoints delete" "Argument required .one or more breakpoint numbers.*" "enable breakpoints delete"#test enable breakpoints oncegdb_test "enable breakpoints once" "Argument required .one or more breakpoint numbers.*" "enable breakpoints once"#test enable breakpointsgdb_test "enable breakpoints" "" "enable breakpoints"#test enable deletegdb_test "enable delete" "Argument required .one or more breakpoint numbers.*" "enable delete"#test enable displaygdb_test "enable display" "" "enable display"#test enable oncegdb_test "enable once" "Argument required .one or more breakpoint numbers.*" "enable once"#test enablegdb_test "enable" "" "enable"#test exec-filesend_gdb "exec-file\n"gdb_expect {    -re "No executable file now..*$gdb_prompt $" {	pass "exec-file"    }    -re "exec-file.*A program is being debugged already.  Kill it. .y or n.*$" {	send_gdb "n\n"	if $verbose>1 then {	    send_user "\tDidn't kill program being debugged\n"	}	gdb_expect -re "$gdb_prompt $" { }	pass "exec-file"    }    -re "$gdb_prompt $"	{ fail "exec-file" }    timeout		{ fail "(timeout) exec-file" }}#test frame "f" abbreviationgdb_test "f" "No stack." "frame \"f\" abbreviation"#test framegdb_test "frame" "No stack." "frame"#test fggdb_test "fg" "The program is not being run." "fg"# FIXME: fg kills the udi connection#test filesend_gdb "file\n"gdb_expect {    -re "No executable file now..*$gdb_prompt $"\	    { pass "file" }    -re ".*A program is being debugged already.  Kill it. .y or n.*$" {	send_gdb "n\n"	if $verbose>1 then {	    send_user "\t\tDidn't kill program being debugged\n"	}	gdb_expect -re "$gdb_prompt $" { }	pass "file"    }    -re ".*$gdb_prompt $"	{ fail "file" }    timeout		{ fail "(timeout) file" }}#test finishgdb_test "finish" "The program is not running." "finish"#test forward-search# The message here comes from the regexp library, not gdb, and so can# vary on different systems.gdb_test "forward-search" "No previous regular expression.*|There is no previous regular expression.*" "forward-search"#test gcoresend_gdb "gcore\n"gdb_expect {    -re "You can\'t do that without a process to debug.*$gdb_prompt $" {	pass "gcore"    }    -re "Undefined command: .*$gdb_prompt $" {	pass "gcore"    }    default { fail "gcore" }}send_gdb "generate-core-file\n"gdb_expect {

⌨️ 快捷键说明

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