gdb_load_shlib $lib1
gdb_load_shlib $lib2
-gdb_test_no_output "set print sevenbit-strings"
-gdb_test_no_output "set print address off"
-gdb_test_no_output "set width 0"
-
if ![runto_main] then {
perror "C function calling tests suppressed"
#print g
-gdb_test "print g" "\[0-9\]* = 2"
+gdb_test "print g" "\[0-9\]* = 2" "print g two"
#print shr1(1)
if ![gdb_skip_stdio_test "print shr1(1)"] {
# behavior will differ depending upon upon whether or not
# the compiler emits line number information for the epilogue.
gdb_test_multiple "step" "step out of shr2 to main" {
- -re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" {
+ -re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" {
pass "step out of shr2 to main"
}
-re ".*\\\}.*$gdb_prompt $" {
}
}
}
-
+
#print mainshr1(1)
gdb_test "print mainshr1(1)" "\[0-9\]* = 2"
# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-gdb_test_no_output "set print sevenbit-strings"
-gdb_test_no_output "set print address off"
-gdb_test_no_output "set width 0"
-
+clean_restart $binfile
# PR's 16495, 18213
# test that we can re-set breakpoints in shared libraries
gdb_run_cmd
gdb_test_multiple "" $test {
-re "Breakpoint .,.*${gdb_prompt} " {
- pass $test
+ pass $gdb_test_name
}
}
gdb_run_cmd
gdb_test_multiple "" $test {
-re "Breakpoint .,.*${gdb_prompt} " {
- pass $test
+ pass $gdb_test_name
}
}
-gdb_continue_to_end "" continue 1
+gdb_continue_to_end "after re-run" continue 1