📄 default.exp
字号:
-re "You can\'t do that without a process to debug.*$gdb_prompt $" { pass "generate-core-file" } -re "Undefined command: .*$gdb_prompt $" { pass "generate-core-file" } default { fail "generate-core-file" }}#test help "h" abbreviationgdb_test "h" "List of classes of commands:(\[^\r\n\]*\[\r\n\])+aliases -- Aliases of other commands(\[^\r\n\]*\[\r\n\])+breakpoints -- Making program stop at certain points(\[^\r\n\]*\[\r\n\])+data -- Examining data(\[^\r\n\]*\[\r\n\])+files -- Specifying and examining files(\[^\r\n\]*\[\r\n\])+obscure -- Obscure features(\[^\r\n\]*\[\r\n\])+running -- Running the program(\[^\r\n\]*\[\r\n\])+stack -- Examining the stack(\[^\r\n\]*\[\r\n\])+status -- Status inquiries(\[^\r\n\]*\[\r\n\])+support -- Support facilities(\[^\r\n\]*\[\r\n\])+user-defined -- User-defined commands(\[^\r\n\]*\[\r\n\])+Type \"help\" followed by a class name for a list of commands in that class.(\[^\r\n\]*\[\r\n\])+Type \"help\" followed by command name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "help \"h\" abbreviation"#test helpgdb_test "help" "List of classes of commands:(\[^\r\n\]*\[\r\n\])+aliases -- Aliases of other commands(\[^\r\n\]*\[\r\n\])+breakpoints -- Making program stop at certain points(\[^\r\n\]*\[\r\n\])+data -- Examining data(\[^\r\n\]*\[\r\n\])+files -- Specifying and examining files(\[^\r\n\]*\[\r\n\])+obscure -- Obscure features(\[^\r\n\]*\[\r\n\])+running -- Running the program(\[^\r\n\]*\[\r\n\])+stack -- Examining the stack(\[^\r\n\]*\[\r\n\])+status -- Status inquiries(\[^\r\n\]*\[\r\n\])+support -- Support facilities(\[^\r\n\]*\[\r\n\])+user-defined -- User-defined commands(\[^\r\n\]*\[\r\n\])+Type \"help\" followed by a class name for a list of commands in that class.(\[^\r\n\]*\[\r\n\])+Type \"help\" followed by command name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "help"#test handlegdb_test "handle" "Argument required .signal to handle.*" "handle"#test info "i" abbreviation gdb_test "i" "\"info\" must be followed by the name of an info command.(\[^\r\n\]*\[\r\n\])+List of info subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help info\" followed by info subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "info \"i\" abbreviation"#test infogdb_test "info" "\"info\" must be followed by the name of an info command.(\[^\r\n\]*\[\r\n\])+List of info subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help info\" followed by info subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "info"#test ignoregdb_test "ignore" "Argument required .a breakpoint number.*" "ignore"#test info addressgdb_test "info address" "Argument required." "info address"#test info all-registersgdb_test "info all-registers" "The program has no registers now." "info all-registers"#test info argsgdb_test "info args" "No frame selected." "info args"#test info bogus-gdb-commandgdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\". Try \"help info\".*" "info bogus-gdb-command"#test info breakpointsgdb_test "info breakpoints" "No breakpoints or watchpoints." "info breakpoints"#test info catchgdb_test "info catch" "You can't do that without a process to debug." "info catch"#test info copying# FIXME -- doesn't work worth a shit#send_gdb "info copying"# -re "GNU GENERAL PUBLIC LICENSE.*#of preserving the free status of all derivatives of our free software and.*#of promoting the sharing and reuse of software generally."# gdb_test "info copying"# }###test info displaygdb_test "info display" "There are no auto-display expressions now." "info display"#test info frame "f" abbreviationgdb_test "info f" "No stack.*|No selected frame.*" "info frame \"f\" abbreviation"#test info framegdb_test "info frame" "No stack.|No selected frame." "info frame"#test info filesgdb_test "info files" "" "info files"#test info floatgdb_test "info float" "The program has no registers now." "info float"#test info functionsgdb_test "info functions" "All defined functions:" "info functions"#test info localsgdb_test "info locals" "No frame selected." "info locals"#test info programgdb_test "info program" "The program being debugged is not being run." "info program"#test info registersgdb_test "info registers" "The program has no registers now." "info registers"#test info stack "s" abbreviationgdb_test "info s" "No stack." "info stack \"s\" abbreviation"#test info stackgdb_test "info stack" "No stack." "info stack"#test info set# FIXME -- needs to match the entire output# FIXME -- on native solaris 2.8, this test fails due to this line:# prompt: Gdb's prompt is "(gdb) ".^Mgdb_test "info set" "confirm: Whether to confirm potentially dangerous operations is o\[a-z\]*.(\[^\r\n\]*\[\r\n\])+history filename: The filename in which to record the command history is (\[^\r\n\]*\[\r\n\])+listsize: Number of source lines gdb will list by default is 10.*" "info set"gdb_test "info symbol" "Argument required .address.."#test info sourcegdb_test "info source" "No current source file..*" "info source"#test info sourcesgdb_test "info sources" "No symbol table is loaded. Use the \"file\" command.*" "info sources"#test info targetgdb_test "info target" "" "info target"#test info terminalgdb_test "info terminal" "No saved terminal information." "info terminal"#test info typesgdb_test "info types" "All defined types:" "info types"#test info variablesgdb_test "info variables" "All defined variables:" "info variables"#test info vectorgdb_test "info vector" "The program has no registers now." "info vector"#test info warrantygdb_test "info warranty" "NO WARRANTY(\[^\r\n\]*\[\r\n\])+ *11. *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY(\[^\r\n\]*\[\r\n\])+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN(\[^\r\n\]*\[\r\n\])+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES(\[^\r\n\]*\[\r\n\])+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED(\[^\r\n\]*\[\r\n\])+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF(\[^\r\n\]*\[\r\n\])+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS(\[^\r\n\]*\[\r\n\])+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE(\[^\r\n\]*\[\r\n\])+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,(\[^\r\n\]*\[\r\n\])+REPAIR OR CORRECTION.(\[^\r\n\]*\[\r\n\])+ *12. *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING(\[^\r\n\]*\[\r\n\])+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR(\[^\r\n\]*\[\r\n\])+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,(\[^\r\n\]*\[\r\n\])+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING(\[^\r\n\]*\[\r\n\])+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED(\[^\r\n\]*\[\r\n\])+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY(\[^\r\n\]*\[\r\n\])+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER(\[^\r\n\]*\[\r\n\])+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE(\[^\r\n\]*\[\r\n\])+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"#test info watchpointsgdb_test "info watchpoints" "No breakpoints or watchpoints." "info watchpoints"#test inspectgdb_test "inspect" "The history is empty." "inspect"#test jumpgdb_test "jump" "The program is not being run." "jump"#test killgdb_test "kill" "The program is not being run." "kill"#test list "l" abbreviationgdb_test "l" "No symbol table is loaded. Use the \"file\" command.*" "list \"l\" abbreviation"#test listgdb_test "list" "No symbol table is loaded. Use the \"file\" command.*" "list"#test load# The ``takes a file name'' case is for vxgdb.# The ``Use the "file" command'' case is for newer GDB versions which try# to deduce the filename from the exec file.gdb_test "load" "You can't do that when your target is `None'.*|The load command takes a file name.*|Must specify at least a file name with the load command.*|.*Use the .file. or .exec-file. command.*" "load"#test next "n" abbreviationgdb_test "n" "The program is not being run." "next \"n\" abbreviation"#test nextgdb_test "next" "The program is not being run." "next"#test nexti "ni" abbreviationgdb_test "ni" "The program is not being run." "nexti \"ni\" abbreviation"#test nextigdb_test "nexti" "The program is not being run." "nexti"#test outputgdb_test "output" "Argument required .expression to compute.*" "output"#test overlaygdb_test "overlay" "\"overlay\" must be followed by the name of .*"#test a non-existant overlay subcommandgdb_test "overlay on" "Undefined overlay command.* Try \"help overlay\"."gdb_test "overlay manual" "" "overlay manual #1"gdb_test "overlay auto" ""gdb_test "overlay off" ""gdb_test "overlay list" "No sections are mapped."gdb_test "overlay map" "Overlay debugging not enabled.*" "overlay map #1"gdb_test "overlay unmap" "Overlay debugging not enabled.*" "overlay unmap #1"gdb_test "overlay manual" "" "overlay manual #2"gdb_test "overlay map" "Argument required: name of an overlay section." "overlay map #2"gdb_test "overlay unmap" "Argument required: name of an overlay section." "overlay unmap #2"#test print "p" abbreviationgdb_test "p" "The history is empty." "print \"p\" abbreviation"#test printgdb_test "print" "The history is empty." "print"#test printfgdb_test "printf" "Argument required .format-control string and values to print.*" "printf"#test ptypegdb_test "ptype" "The history is empty." "ptype"#test pwdgdb_test "pwd" "Working directory .*" "pwd"#test run "r" abbreviationif [istarget "*-*-vxworks*"] then { gdb_test "set args" "" "" gdb_test "r" "Starting program: .*You must specify a function name to run, and arguments if any"\ "run \"r\" abbreviation" gdb_test "set args main" "" "" } else { send_gdb "r\n" gdb_expect { -re "Starting program: .*You can't do that when your target is `None'.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .*No executable file specified.*Use the \"file\" or \"exec-file\" command.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .*No executable specified, use .target exec.\\..*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .*No image loaded into target.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .*No program loaded.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Don't know how to run. Try \"help target\"..*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re ".*$gdb_prompt $" { fail "run \"r\" abbreviation" } timeout { fail "(timeout) run \"r\" abbreviation" } }}#test runif [istarget "*-*-vxworks*"] then { gdb_test "set args" "" "" gdb_test "run" "Starting program: .*You must specify a function name to run, and arguments if any" gdb_test "set args main" "" "" } else { send_gdb "run\n" gdb_expect { -re "Starting program:.*You can't do that when your target is `None'.*$gdb_prompt $" { pass "run" } -re "Starting program: .*No executable file specified.*Use the \"file\" or \"exec-file\" command.*$gdb_prompt $"\ { pass "run" } -re "Starting program: .*No executable specified, use .target exec.\\..*$gdb_prompt $"\ { pass "run" } -re "Starting program: .*No image loaded into target.*$gdb_prompt $"\ { pass "run" } -re "Starting program: .*No program loaded.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Don't know how to run. Try \"help target\"..*$gdb_prompt $"\ { pass "run" } -re ".*$gdb_prompt $" { fail "run" } timeout { fail "(timeout) run" } }}#test rbreakgdb_test "rbreak" "" "rbreak"# test restoregdb_test "restore" "You can't do that without a process to debug\."#test return# The middle case accomodated the obsolete a29k, where doing the "ni"# above causes an initial stack to be created.gdb_test "return" "No selected frame..*" "return" "Make .* return now.*y or n. $" "y"#test reverse-searchgdb_test "reverse-search" "No previous regular expression.*|There is no previous regular expression.*" "reverse-search"#test step "s" abbreviationgdb_test "s" "The program is not being run." "step \"s\" abbreviation #1"#test stepgdb_test "step" "The program is not being run." "step #1"#test searchgdb_test "search" "No previous regular expression.*|There is no previous regular expression.*" "search"#test sectiongdb_test "section" "Must specify section name and its virtual address.*" "section"#test set annotategdb_test "set annotate" "Argument required .integer to set it to.*" "set annotate"#test set argsgdb_test "set args" "" "set args"#test set check "c" abbreviationgdb_test "set c" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check \"c\" abbreviation"#test set check "ch" abbreviationgdb_test "set ch" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check \"ch\" abbreviation"#test set checkgdb_test "set check" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check"#test set check rangegdb_test "set check range" "" "set check range"#test set check typegdb_test "set check type" "" "set check type"#test set complaintsgdb_test "set complaints" "Argument required .integer to set it to.*" "set complaints"#test set confirmgdb_test "set confirm" "" "set confirm"# Don't test set editing. What if we're talking to a gdb that# won't do editing correctly while we're talking to it?# gdb_test "set editing" "" "set editing"#test set environmentgdb_test "set environment" "Argument required .environment variable and value.*" "set environment"#test set heightgdb_test "set height" "Argument required .integer to set it to.*" "set height"#test set history expansiongdb_test "set history expansion" "" "set history expansion"#test set history filenamegdb_test "set history filename" "Argument required .filename to set it to.*" "set history filename"#test set history savegdb_test "set history save" "" "set history save"#test set history sizegdb_test "set history size" "Argument required .integer to set it to.*" "set history size"#test set historygdb_test "set history" "\"set history\" must be followed by the name of a history subcommand.(\[^\r\n\]*\[\r\n\])+List of set history subcommands:(\[^\r\n\]*\[\r\n\])+set history expansion -- Set history expansion on command input(\[^\r\n\]*\[\r\n\])+set history filename -- Set the filename in which to record the command history(\[^\r\n\]*\[\r\n\])+set history save -- Set saving of the history record on exit(\[^\r\n\]*\[\r\n\])+set history size -- Set the size of the command history(\[^\r\n\]*\[\r\n\])+Type \"help set history\" followed by set history subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set history"#test set languagegdb_test "set language" "The currently understood settings are:(\[^\r\n\]*\[\r\n\])+local or auto *Automatic setting based on source file(\[^\r\n\]*\[\r\n\])+c *Use the C language(\[^\r\n\]*\[\r\n\])+c\[+\]+ *Use the C\[+\]+ language(\[^\r\n\]*\[\r\n\])+modula-2 *Use the Modula-2 language.*" "set language"#test set listsizegdb_test "set listsize" "Argument required .integer to set it to.*" "set listsize"#test set print "p" abbreviationgdb_test "set p" "\"set print\" must be followed by the name of a print subcommand.(\[^\r\n\]*\[\r\n\])+List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print \"p\" abbreviation"#test set print "pr" abbreviationgdb_test "set pr" "\"set print\" must be followed by the name of a print subcommand.(\[^\r\n\]*\[\r\n\])+List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print \"pr\" abbreviation"#test set printgdb_test "set print" "\"set print\" must be followed by the name of a print subcommand.(\[^\r\n\]*\[\r\n\])+List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print"#test set print address
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -