PR python/13599:
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-symtab.exp
index f64cb57b3dd1fc8bdcd43334a26d4709bbcdd5fb..490a891b796dd8ccbde24127ecc7ac447c6f641d 100644 (file)
@@ -43,7 +43,8 @@ if ![runto_main] then {
 global hex decimal
 
 # Setup and get the symbol table.
-gdb_breakpoint [gdb_get_line_number "Block break here."]
+set line_no [gdb_get_line_number "Block break here."]
+gdb_breakpoint $line_no
 gdb_continue_to_breakpoint "Block break here."
 gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
 gdb_py_test_silent_cmd "python sal = frame.find_sal()" "Get block" 0
@@ -52,7 +53,7 @@ gdb_py_test_silent_cmd "python symtab = sal.symtab" "Get block" 0
 # Test sal.
 gdb_test "python print sal.symtab" ".*gdb.python/py-symbol.c.*" "Test symtab"
 gdb_test "python print sal.pc" "${decimal}" "Test sal.pc"
-gdb_test "python print sal.line" "42" "Test sal.line"
+gdb_test "python print sal.line" "$line_no" "Test sal.line"
 gdb_test "python print sal.is_valid()" "True" "Test sal.is_valid"
 
 # Test symbol table.
This page took 0.025154 seconds and 4 git commands to generate.