gdb_test "lf" "Source files for which symbols have been read in:\r\n\r\n.*average\\.c.*Source files for which symbols will be read in on demand:\r\n\r\nglobals,.*\[se\]\[un\]\[md\]\\.c.*\[se\]\[un\]\[md\]\\.c"
} else {
gdb_test "lf" "Source files for which symbols have been read in:\r\n\r\n.*average\\.c.*\r\n\r\nSource files for which symbols will be read in on demand:\r\n\r\nglobals, end\\.c,.*sum\\.c"
gdb_test "t" "#0 sum \\(list=0x.*, low=0, high=9\\) at.*sum\.c:12\r\n#1 0x.* in print_average \\(list=0x.*, low=0, high=9\\) at.*average\.c:24\r\n#2 0x.* in main \\(\\) at.*average\.c:42"
gdb_test "xbreak" "Breakpoint.*at.*file.*sum.c, line 15."
gdb_test "xbreak print_average" "Breakpoint.*at.*file.*average.c, line 29."
gdb_test "xbreak if (1)" "Note: breakpoint.*also set at pc.*Breakpoint.*at.*file.*sum.c, line 15."
gdb_test "xbreak print_average if (1)" "Note: breakpoint.*also set at pc.*Breakpoint.*at.*file.*average.c, line 29."
send_gdb "lb\n"
gdb_expect {
-re "Num Type Disp Enb Address What.*breakpoint keep y.*sum.c:15.*breakpoint keep y.*average.c:29.*breakpoint keep y.*sum.c:15.*stop only if 1.*breakpoint keep y.*average.c:29.*stop only if 1.*$gdb_prompt $" {pass "lb on xbreaks"}
-re ".*$gdb_prompt $" { fail "breakpoints not deleted"}
timeout { fail "info breakpoints (timeout)" }
}
}
#
# test_signals
#
proc test_signals { } {
gdb_test "handle SIGTERM nostop noprint" ""
gdb_test "z 15 s" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*Yes.*Yes.*Yes.*Terminated"
gdb_test "z 15 r" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*Yes.*Terminated"
gdb_test "z 15 i" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*No.*Terminated"
gdb_test "z 15 r" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*Yes.*No.*Terminated"
gdb_test "z 15 Q" "Signal.*Stop.*Print.*Pass to program.*Description\r\nSIGTERM.*No.*No.*No.*Terminated"
gdb_test "lz" "Signal.*Stop.*Print.*Pass to program.*Description\r\n\r\nSIGHUP.*Yes.*"
}
# Start with a fresh gdb.
global GDBFLAGS
set saved_gdbflags $GDBFLAGS
set GDBFLAGS "$GDBFLAGS --xdb"
gdb_exit
gdb_start
xdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
send_gdb "set width 0\n"
gdb_expect -re "$gdb_prompt $"
test_search
test_viewing_loc
test_dir_list
test_list_sources
test_vlist
test_va
gdb_test "next"
gdb_test "l" "No arguments.\r\nc = *.*\r\nfirst = 0\r\nlast = 0"
#test_list_globals
test_list_registers
test_backtrace
# Start with a fresh gdb.
gdb_exit
gdb_start
xdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
send_gdb "set width 0\n"
gdb_expect -re "$gdb_prompt $"
test_go
gdb_exit
gdb_start
xdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
send_gdb "set width 0\n"
gdb_expect -re "$gdb_prompt $"
gdb_test "break main" ""
gdb_test "R" ""
gdb_test "S" "39\[ \t\]+last = num-1;"
test_breakpoints
test_signals
gdb_test "sm" ""
gdb_test "info set" ".*pagination: State of pagination is off.*"
gdb_test "am" ""
gdb_test "info set" ".*pagination: State of pagination is on.*"