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

📄 usrthcore.exp

📁 lwip在ucos上的移植
💻 EXP
字号:
# usrthcore.exp -- Expect script to test gdb with user threads# Copyright (C) 1992 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# use this to debug:##log_user 1if $tracelevel {    strace $tracelevel}if { [skip_hp_tests] } { continue }if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa2.0w-*-*"] } {    verbose "HPUX thread test ignored for non-hppa or PA64 targets."    return 0}set testfile usrthcoreset srcfile ${srcdir}/${subdir}/${testfile}.cset binfile ${srcdir}/${subdir}/${testfile}# To build the executable we need to link against the thread library.##	/opt/ansic/bin/cc -Ae +DAportable -g -o usrthcore -lcma usrthcore.c### we have trouble building it on 11.0, so we use the prebuilt## executable instead.####if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c -lcma" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {##    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."##}#=========================## Test looking at threads in a core file#remote_exec build "rm -f core"remote_exec build "${binfile}"gdb_exitgdb_startgdb_reinitialize_dir $srcdir/$subdirgdb_load ${binfile}gdb_test "core-file core" \    ".*Core was generated by `usrthcore'.*in main.*usrthcore.c:170.*" \    "load corefile"gdb_test "info thread" \    "  4 .*cma__dispatch.*\\* 1 .*in main.*usrthcore.c:170.*" \    "info thread on core file"gdb_test "bt" "#0.*in main.*usrthcore.c:170" "backtrace on active thread"gdb_test "thread 4" ".*Switching to thread 4.*cma__dispatch.*" \    "switch to thread 4 (thread2 procedure)"gdb_test "bt" "#0.*cma__dispatch.*thread2.*usrthcore.c:99.*" \    "Backtrace on inactive thread (thread2 procedure)"gdb_test "b thread1"  "Breakpoint 1.*usrthcore.c, line 75.*" \    "break on thread1"gdb_test "run" "Starting program.*Breakpoint 1, thread1.*usrthcore.c:75.*" \    "run program, get to thread1 procedure"gdb_test "info threads" "\\* \[23\] .*thread1.* 1 .*cma__dispatch.*" \    "info threads after running core"# Done!#gdb_exitremote_exec build "rm -f core"return 0

⌨️ 快捷键说明

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