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

📄 ena-dis-br.exp

📁 lwip在ucos上的移植
💻 EXP
📖 第 1 页 / 共 2 页
字号:
#   Copyright (C) 1997, 1998, 1999 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.eduif $tracelevel then {	strace $tracelevel	}global usestubs## test running programs#set prms_id 0set bug_id 0set testfile "break"set srcfile ${testfile}.cset binfile ${objdir}/${subdir}/${testfile}if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."}proc rerun_to_main {} {  global gdb_prompt  if [target_info exists use_gdb_stub] {    gdb_run_cmd    gdb_expect {      -re ".*Breakpoint .*main .*$gdb_prompt $"\	      {pass "rerun to main" ; return 0}      -re "$gdb_prompt $"\	      {fail "rerun to main" ; return 0}      timeout {fail "(timeout) rerun to main" ; return 0}    }  } else {    send_gdb "run\n"    gdb_expect {      -re "Starting program.*$gdb_prompt $"\	      {pass "rerun to main" ; return 0}      -re "$gdb_prompt $"\	      {fail "rerun to main" ; return 0}      timeout {fail "(timeout) rerun to main" ; return 0}    }  }}gdb_exitgdb_startgdb_reinitialize_dir $srcdir/$subdirgdb_load ${binfile}if ![runto_main] then { fail "enable/disable break tests suppressed" }# Verify that we can set a breakpoint (the location is irrelevant),# then enable it (yes, it's already enabled by default), then hit it.#send_gdb "break marker1\n"gdb_expect {  -re "Breakpoint (\[0-9\]*) at .*, line 4\[38\].*$gdb_prompt $"\          {pass "break marker1"}  -re "$gdb_prompt $"\          {fail "break marker1"}  timeout {fail "(timeout) break marker1"}}send_gdb "enable $expect_out(1,string)\n"gdb_expect {  -re "$gdb_prompt $"\          {pass "enable break marker1"}  timeout {fail "(timeout) enable break marker1"}}send_gdb "info break $expect_out(1,string)\n"gdb_expect {  -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*$gdb_prompt $"\          {pass "info break marker1"}  -re "$gdb_prompt $"\          {fail "info break marker1"}  timeout {fail "(timeout) info break marker1"}}# See the comments in condbreak.exp for "run until breakpoint at marker1" # for an explanation of the xfail below.send_gdb "continue\n"gdb_expect {  -re "Breakpoint \[0-9\]*, marker1.*$gdb_prompt $"\          {pass "continue to break marker1"}  -re "Breakpoint \[0-9\]*, $hex in marker1.*$gdb_prompt $"\          {xfail "continue to break marker1"}  -re "$gdb_prompt $"\          {fail "continue to break marker1"}  timeout {fail "(timeout) continue to break marker1"}}send_gdb "delete $expect_out(1,string)\n"gdb_expect {  -re "$gdb_prompt $"\          {pass "delete break marker1"}  timeout {fail "(timeout) delete break marker1"}}# Verify that we can set a breakpoint to be self-disabling after# the first time it triggers.#send_gdb "break marker2\n"gdb_expect {  -re "Breakpoint (\[0-9\]*) at .*, line 4\[49\].*$gdb_prompt $"\          {pass "break marker2"}  -re "$gdb_prompt $"\          {fail "break marker2"}  timeout {fail "(timeout) break marker2"}}send_gdb "enable once $expect_out(1,string)\n"gdb_expect {  -re "$gdb_prompt $"\          {pass "enable once break marker2"}  timeout {fail "(timeout) enable once break marker2"}}send_gdb "info break $expect_out(1,string)\n"gdb_expect {  -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+y.*$gdb_prompt $"\          {pass "info auto-disabled break marker2"}  -re "$gdb_prompt $"\          {fail "info auto-disabled break marker2"}  timeout {fail "(timeout) info auto-disabled break marker2"}}# See the comments in condbreak.exp for "run until breakpoint at marker1" # for an explanation of the xfail below.send_gdb "continue\n"gdb_expect {  -re "Breakpoint \[0-9\]*, marker2.*$gdb_prompt $"\          {pass "continue to auto-disabled break marker2"}  -re "Breakpoint \[0-9\]*, $hex in marker2.*$gdb_prompt $"\          {xfail "continue to auto-disabled break marker2"}  -re "$gdb_prompt $"\          {fail "continue to auto-disabled break marker2"}  timeout {fail "(timeout) continue to auto-disabled break marker2"}}send_gdb "info break $expect_out(1,string)\n"gdb_expect {  -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+n.*$gdb_prompt $"\          {pass "info auto-disabled break marker2"}  -re "$gdb_prompt $"\          {fail "info auto-disabled break marker2"}  timeout {fail "(timeout) info auto-disabled break marker2"}}# Verify that we don't stop at a disabled breakpoint.#gdb_continue_to_end "no stop"rerun_to_maingdb_continue_to_end "no stop at auto-disabled break marker2"# Verify that we can set a breakpoint to be self-deleting after# the first time it triggers.#if ![runto_main] then { fail "enable/disable break tests suppressed" }send_gdb "break marker3\n"gdb_expect {  -re "Breakpoint (\[0-9\]*) at .*, line (45|50).*$gdb_prompt $"\          {pass "break marker3"}  -re "$gdb_prompt $"\          {fail "break marker3"}  timeout {fail "(timeout) break marker3"}}send_gdb "enable del $expect_out(1,string)\n"gdb_expect {  -re "$gdb_prompt $"\          {pass "enable del break marker3"}  timeout {fail "(timeout) enable del break marker3"}}send_gdb "info break $expect_out(1,string)\n"gdb_expect {  -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*$gdb_prompt $"\          {pass "info auto-deleted break marker2"}  -re "$gdb_prompt $"\          {fail "info auto-deleted break marker2"}  timeout {fail "(timeout) info auto-deleted break marker2"}}send_gdb "continue\n"gdb_expect {  -re ".*marker3 .*:(45|50).*$gdb_prompt $"\          {pass "continue to auto-deleted break marker3"}  -re "Breakpoint \[0-9\]*, marker3.*$gdb_prompt $"\          {fail "continue to auto-deleted break marker3"}  -re "$gdb_prompt $"\          {fail "continue to auto-deleted break marker3"}  timeout {fail "(timeout) continue to break marker3"}}send_gdb "info break $expect_out(1,string)\n"gdb_expect {  -re ".*No breakpoint or watchpoint number.*$gdb_prompt $"\          {pass "info auto-deleted break marker3"}  -re "\[0-9\]*\[ \t\]+breakpoint\[ \t\].*$gdb_prompt $"\          {fail "info auto-deleted break marker3"}  -re "$gdb_prompt $"\          {fail "info auto-deleted break marker3"}  timeout {fail "(timeout) info auto-deleted break marker3"}}# Verify that we can set a breakpoint and manually disable it (we've# already proven that disabled bp's don't trigger).#send_gdb "break marker4\n"gdb_expect {  -re "Breakpoint (\[0-9\]*) at .*, line (46|51).*$gdb_prompt $"\          {pass "break marker4"}  -re "$gdb_prompt $"\          {fail "break marker4"}  timeout {fail "(timeout) break marker4"}}send_gdb "disable $expect_out(1,string)\n"gdb_expect {  -re "$gdb_prompt $"\          {pass "disable break marker4"}  timeout {fail "(timeout) disable break marker4"}}send_gdb "info break $expect_out(1,string)\n"

⌨️ 快捷键说明

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