]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: make gdb_breakpoint, runto and runto_main use parse_args
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 18 Jun 2026 19:35:41 +0000 (15:35 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 19 Jun 2026 19:31:24 +0000 (15:31 -0400)
In preparation to adding an option with argument to runto, change these
procs to use parse_args to manage their args (variable arguments).
These three procs have to be converted at the same time, because they
pass args to each other.

I would have like to allow passing options mixed with non-option
arguments, to allow:

  gdb_breakpoint -qualified the_function

But that would be a larger and more difficult change, so we'll have to
stick having options after, like this:

  gdb_breakpoint the_function -qualified

Change all callers that do use options to add the leading dash.

This patch removes the "last one wins" aspect of the message/no-message
options in gdb_breakpoint and runto, but I don't think it's important.
I don't think there is actually a spot that passes both.  I added some
checks in those procs to ensure that.

Change-Id: I1500c60c4b1705ad5cd982d9324b627900ce411b
Reviewed-By: Tankut Baris Aktemur <TankutBaris.Aktemur@amd.com>
115 files changed:
gdb/testsuite/gdb.ada/break-label.exp
gdb/testsuite/gdb.ada/finish-var-size.exp
gdb/testsuite/gdb.ada/import.exp
gdb/testsuite/gdb.ada/length_cond.exp
gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp
gdb/testsuite/gdb.arch/amd64-pseudo-unwind.exp
gdb/testsuite/gdb.arch/arc-analyze-prologue.exp
gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy.exp
gdb/testsuite/gdb.arch/arm-pseudo-unwind.exp
gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
gdb/testsuite/gdb.base/annotate-symlink.exp
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/break-inline.exp
gdb/testsuite/gdb.base/break-interp.exp
gdb/testsuite/gdb.base/condbreak-multi-context.exp
gdb/testsuite/gdb.base/dlmopen-ns-ids.exp
gdb/testsuite/gdb.base/dlmopen.exp
gdb/testsuite/gdb.base/eh_return.exp
gdb/testsuite/gdb.base/foll-exec-mode.exp
gdb/testsuite/gdb.base/foll-vfork.exp
gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
gdb/testsuite/gdb.base/fullname.exp
gdb/testsuite/gdb.base/gdb-sigterm.exp
gdb/testsuite/gdb.base/gdb1250.exp
gdb/testsuite/gdb.base/infcall-failure-2.exp
gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
gdb/testsuite/gdb.base/inferior-args.exp
gdb/testsuite/gdb.base/info-shared.exp
gdb/testsuite/gdb.base/jit-reader.exp
gdb/testsuite/gdb.base/nostdlib.exp
gdb/testsuite/gdb.base/prologue.exp
gdb/testsuite/gdb.base/run-attach-while-running.exp
gdb/testsuite/gdb.base/shlib-call.exp
gdb/testsuite/gdb.base/solib-bad-entry-addr.exp
gdb/testsuite/gdb.base/solib-vanish.exp
gdb/testsuite/gdb.base/stale-infcall.exp
gdb/testsuite/gdb.base/sym-file.exp
gdb/testsuite/gdb.base/symlink-sourcefile.exp
gdb/testsuite/gdb.base/tls-dlobj.exp
gdb/testsuite/gdb.base/unload.exp
gdb/testsuite/gdb.btrace/rn-dl-bind.exp
gdb/testsuite/gdb.cp/anon-ns.exp
gdb/testsuite/gdb.cp/breakpoint-shlib-func.exp
gdb/testsuite/gdb.cp/meth-typedefs.exp
gdb/testsuite/gdb.cp/nextoverthrow.exp
gdb/testsuite/gdb.cp/paramless.exp
gdb/testsuite/gdb.cp/save-bp-qualified.exp
gdb/testsuite/gdb.cp/step-and-next-inline.exp
gdb/testsuite/gdb.cp/subtypes.exp
gdb/testsuite/gdb.cp/templates.exp
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
gdb/testsuite/gdb.dwarf2/struct-decl.exp
gdb/testsuite/gdb.gdb/python-helper.exp
gdb/testsuite/gdb.go/methods.exp
gdb/testsuite/gdb.go/no-package.exp
gdb/testsuite/gdb.linespec/explicit.exp
gdb/testsuite/gdb.linespec/keywords.exp
gdb/testsuite/gdb.linespec/thread.exp
gdb/testsuite/gdb.multi/inferior-specific-bp.exp
gdb/testsuite/gdb.multi/multi-kill.exp
gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp
gdb/testsuite/gdb.multi/pending-bp.exp
gdb/testsuite/gdb.multi/watchpoint-multi.exp
gdb/testsuite/gdb.opt/inline-break.exp
gdb/testsuite/gdb.python/py-breakpoint.exp
gdb/testsuite/gdb.python/py-events.exp
gdb/testsuite/gdb.python/py-finish-breakpoint.exp
gdb/testsuite/gdb.reverse/finish-reverse-next.exp
gdb/testsuite/gdb.reverse/func-map-to-same-line.exp
gdb/testsuite/gdb.reverse/i386-avx-reverse.exp
gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp
gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp
gdb/testsuite/gdb.rocm/multi-inferior-gpu.exp
gdb/testsuite/gdb.rocm/precise-memory-warning-watchpoint.exp
gdb/testsuite/gdb.rocm/precise-memory.exp
gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
gdb/testsuite/gdb.rocm/watchpoint-basic.exp
gdb/testsuite/gdb.rust/modules.exp
gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
gdb/testsuite/gdb.trace/actions-changed.exp
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/circ.exp
gdb/testsuite/gdb.trace/collection.exp
gdb/testsuite/gdb.trace/disconnected-tracing.exp
gdb/testsuite/gdb.trace/ftrace-lock.exp
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/infotrace.exp
gdb/testsuite/gdb.trace/packetlen.exp
gdb/testsuite/gdb.trace/passc-dyn.exp
gdb/testsuite/gdb.trace/qtro.exp
gdb/testsuite/gdb.trace/read-memory.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/signal.exp
gdb/testsuite/gdb.trace/status-stop.exp
gdb/testsuite/gdb.trace/strace.exp
gdb/testsuite/gdb.trace/tfind.exp
gdb/testsuite/gdb.trace/trace-break.exp
gdb/testsuite/gdb.trace/trace-condition.exp
gdb/testsuite/gdb.trace/trace-mt.exp
gdb/testsuite/gdb.trace/tstatus.exp
gdb/testsuite/gdb.trace/tsv.exp
gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
gdb/testsuite/gdb.trace/unavailable.exp
gdb/testsuite/gdb.trace/while-dyn.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/selftest-support.exp

index b92a665ef862e6229bedfea78a8d52c1e53ab91e..dec083be1a66f7d879e1ed5ef24ce96eb0b21b05 100644 (file)
@@ -26,5 +26,5 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
 # Ada is case-insensitive, so both of these should work.
 foreach_with_prefix name {break_here Break_Here} {
     clean_restart ${testfile}
-    runto "proc:$name" message
+    runto "proc:$name" -message
 }
index 51c056a91064449d98625709740b6ce7671718c4..20e214c850abed30e4d72164ba0daafc41b1d9f8 100644 (file)
@@ -33,7 +33,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $opts] != ""} {
 }
 
 clean_restart ${testfile}
-runto "pck.get" temporary
+runto "pck.get" -temporary
 
 set value [string_to_regexp "= (defined => true, payload => true)"]
 
index 085eb2fbf9956c511db8057701ed4e475fc6e71d..50ad623add46ff34f6c8b7cdcd333ca69dffcc1a 100644 (file)
@@ -54,7 +54,7 @@ gdb_test "print pkg.imported_var_ada" " = 42"
 gdb_test "print pkg.exported_var_ada" " = 99"
 gdb_test "print exported_var_ada" " = 99"
 
-gdb_breakpoint "local_imported_func" message
+gdb_breakpoint "local_imported_func" -message
 gdb_test "print copy" " = 42"
 
 # This passes with gcc 10 but fails with gcc 9.  With gcc 9, we have:
@@ -84,11 +84,11 @@ foreach func {"pkg.imported_func_ada" "imported_func"} {
     if { [gnat_version_compare < 10] } {
        setup_xfail *-*-*
     }
-    gdb_breakpoint $func message
+    gdb_breakpoint $func -message
 }
 
 foreach func {"imported_func_ada" "pkg.exported_func_ada" \
                  "exported_func_ada" "exported_func"} {
     clean_restart $testfile
-    gdb_breakpoint $func message
+    gdb_breakpoint $func -message
 }
index 5cf4fb8eabd99a5bf447d0c942a4e136b1a7ce18..2c62e9b0333fe77e8a4355f333fccc317b9b395a 100644 (file)
@@ -29,7 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } {
 clean_restart ${testfile}
 
 set bp_location [gdb_get_line_number "BREAKPOINT" ${testdir}/length_cond.adb]
-gdb_breakpoint length_cond.adb:$bp_location message
+gdb_breakpoint length_cond.adb:$bp_location -message
 
 # Resolving the conditional expression would cause a crash, so it's
 # enough to just set the conditions.
index 81c87afc410a06da74bec42fec50f26c21dd4bd6..74b1762dc1b61c9981759a98502509ec831ed2e4 100644 (file)
@@ -49,10 +49,10 @@ gdb_test "print var_𐐩" " = 25"
 gdb_test "print VAR_Ż" " = 26"
 gdb_test "print var_ż" " = 26"
 
-gdb_breakpoint "FUNC_Ü" message
-gdb_breakpoint "func_ü" message
-gdb_breakpoint "FUNC_Ƹ" message
-gdb_breakpoint "func_ƹ" message
-gdb_breakpoint "FUNC_Ż" message
-gdb_breakpoint "func_ż" message
-gdb_breakpoint "FUNC_𐐁" message
+gdb_breakpoint "FUNC_Ü" -message
+gdb_breakpoint "func_ü" -message
+gdb_breakpoint "FUNC_Ƹ" -message
+gdb_breakpoint "func_ƹ" -message
+gdb_breakpoint "FUNC_Ż" -message
+gdb_breakpoint "func_ż" -message
+gdb_breakpoint "FUNC_𐐁" -message
index d43ab468cabece4f8158590e002a5fc39976c183..048a3a89e49f37fdd6067d4963ce256adf4a102e 100644 (file)
@@ -35,7 +35,7 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint break_here_asm temporary
+gdb_breakpoint break_here_asm -temporary
 gdb_continue_to_breakpoint "continue to callee"
 
 # Verify the value of x19/w19 in the inner frame (callee).
@@ -83,6 +83,6 @@ with_test_prefix "callee, after change in caller" {
 
 # Verify that the value of the saved x19 we changed is correctly seen by the
 # inferior.
-gdb_breakpoint break_here_c temporary
+gdb_breakpoint break_here_c -temporary
 gdb_continue_to_breakpoint "continue to break_here_c"
 gdb_test "p/x value" " = 0x44454647"
index 44ef137d87582bc9dffb4b7751a110cc3a89af90..1a8a2ee4c00c08e07d1ca57ffe8c7538540e5d9e 100644 (file)
@@ -38,7 +38,7 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint break_here_asm temporary
+gdb_breakpoint break_here_asm -temporary
 gdb_continue_to_breakpoint "continue to callee"
 
 # Verify the value of rbx/ebx in the inner frame (callee).
@@ -86,6 +86,6 @@ with_test_prefix "callee, after change in caller" {
 
 # Verify that the value of the saved rbx we changed is correctly seen by the
 # inferior.
-gdb_breakpoint break_here_c temporary
+gdb_breakpoint break_here_c -temporary
 gdb_continue_to_breakpoint "continue to break_here_c"
 gdb_test "p/x value" " = 0x1011121344454647"
index 693e5efe22604936f9c17a9799a8a769d1e8e0c8..bbed25262758926d593de7095dadcba94fd66255 100644 (file)
@@ -72,7 +72,7 @@ proc saved_regs_to_str { savedregs funcname } {
 
 proc prologue_test {funcname {savedregs ""} {fp_offset ""} } {
     global hex
-    gdb_breakpoint $funcname temporary
+    gdb_breakpoint $funcname -temporary
     gdb_continue_to_breakpoint $funcname
     gdb_test "backtrace 10" \
        "#0\[ \t\]*$hex in $funcname .*\r\n#1\[ \t\]*$hex in main.*" \
@@ -130,7 +130,7 @@ prologue_test "enter_s_all" { {r13 4} {r14 8} {r15 12} {r16 16} {r17 20} \
     {gp 56} {fp 60} {blink 0} } 0
 
 # Test more levels of backtrace.
-gdb_breakpoint nested_prologue_inner temporary
+gdb_breakpoint nested_prologue_inner -temporary
 gdb_continue_to_breakpoint nested_prologue_inner
 gdb_test "backtrace 10" \
     "#0\[ \t\]*$hex in nested_prologue_inner .*\r\n#1\[ \t\]*$hex in nested_prologue_outer .*\r\n#2\[ \t\]*$hex in main.*" \
@@ -189,7 +189,7 @@ prologue_test "unstored_reg" { {r13 0} {r14 4} }
 prologue_test "double_store" { {r14 0} }
 
 # alloca() tests
-gdb_breakpoint alloca_inner temporary
+gdb_breakpoint alloca_inner -temporary
 gdb_continue_to_breakpoint alloca_inner
 gdb_test "backtrace 3" \
     "#0\[ \t\]*$hex in alloca_inner .*\r\n#1\[ \t\]*$hex in alloca_outer .*\r\n#2\[ \t\]*$hex in main.*" \
index 06a9ba3a74ed43638195845e338e906d06d57e85..42dfec0bbc934ec060af63c72d701c6be99256c9 100644 (file)
@@ -40,7 +40,7 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint break_here_asm temporary
+gdb_breakpoint break_here_asm -temporary
 gdb_continue_to_breakpoint "continue to callee"
 
 # Verify the value of s16 in the inner frame (callee).
@@ -81,6 +81,6 @@ with_test_prefix "callee, after change in caller" {
 
 # Verify that the value of the saved s16 we changed is correctly seen by the
 # inferior.
-gdb_breakpoint break_here_c temporary
+gdb_breakpoint break_here_c -temporary
 gdb_continue_to_breakpoint "continue to break_here_c"
 gdb_test "p/x value" " = 0x40000000"
index d2d65f792d59bd08f4a004024ee90f511d7eee0f..ab9d3609dbd3d4bab58d73be07a4a1401c6fb566 100644 (file)
@@ -35,7 +35,7 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint break_here_asm temporary
+gdb_breakpoint break_here_asm -temporary
 gdb_continue_to_breakpoint "continue to callee"
 
 # Verify the value of d8/s16 in the inner frame (callee).
@@ -83,6 +83,6 @@ with_test_prefix "callee, after change in caller" {
 
 # Verify that the value of the saved d8 we changed is correctly seen by the
 # inferior.
-gdb_breakpoint break_here_c temporary
+gdb_breakpoint break_here_c -temporary
 gdb_continue_to_breakpoint "continue to break_here_c"
 gdb_test "p/x value" " = 0x1011121340000000"
index 8716ce02224b4d4de25a27a14a6c39f9d5e3def4..972b1f2337d13ebe112b8d38b7e99f721951e3a6 100644 (file)
@@ -87,7 +87,7 @@ with_test_prefix "check htm support" {
 
     # Displaced-stepping a tbegin. causes problems,
     # so we make the breakpoint temporary.
-    gdb_breakpoint [gdb_get_line_number "marker" "$gen_src"] temporary
+    gdb_breakpoint [gdb_get_line_number "marker" "$gen_src"] -temporary
 
     gdb_run_cmd
 
@@ -134,7 +134,7 @@ if {[build_executable "compile" $binfile $srcfile {debug}] == -1} {
 
 clean_restart $testfile
 
-gdb_breakpoint [gdb_get_line_number "first marker"] temporary
+gdb_breakpoint [gdb_get_line_number "first marker"] -temporary
 
 gdb_run_cmd
 
index 9d6f8fe3a68031cd3f8f898d8590ef9d4b358564..fb17ab99bcf209c2e445bd4866eb67b4bfcb54fd 100644 (file)
@@ -41,7 +41,7 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint func message
+gdb_breakpoint func -message
 
 gdb_test_no_output "set annotate 1"
 
index 1cb716d7130ec9b0dd56eae2535f028a37f82362..e75dd662203e148d78aeea249ac470f7277ec557 100644 (file)
@@ -324,7 +324,7 @@ proc_with_prefix do_attach_tests {} {
 
     # Verify that the modification really happened.
 
-    gdb_breakpoint [gdb_get_line_number "postloop"] temporary
+    gdb_breakpoint [gdb_get_line_number "postloop"] -temporary
     gdb_continue_to_breakpoint "postloop" ".* postloop .*"
 
     # Allow the test process to exit, to cleanup after ourselves.
index 057dd3b03b912e9f9f74b01a4c854e17a87ea90c..64006097c101b6a7b7c355b32600b21bd098965c 100644 (file)
@@ -18,7 +18,7 @@ if { [prepare_for_testing "failed to prepare" "break-inline" {} {debug nowarning
     return
 }
 
-gdb_breakpoint "main" "temporary"
+gdb_breakpoint "main" -temporary
 gdb_run_cmd
 gdb_test "" "Temporary breakpoint.*foo\\(\\).*"
 
index 527eece5d86751068f72c42b06fa392aa410e173..14094c72844a65c743762cfa109342ab729a82fe 100644 (file)
@@ -133,7 +133,7 @@ proc reach_1 {func command displacement} {
        # Breakpoint on _dl_debug_state can have problems due to its overlap
        # with the existing internal breakpoint from GDB.
        gdb_test_no_output "set stop-on-solib-events 1"
-    } elseif {! [gdb_breakpoint $func allow-pending]} {
+    } elseif {! [gdb_breakpoint $func -allow-pending]} {
        return
     }
 
index e351eb0e65b9f2b720d5d637d7b4ec7462c15b64..d85ec3eb5588d12e4973a4bedd1c94670442b322 100644 (file)
@@ -133,7 +133,7 @@ proc_with_prefix scenario_1 { start_before } {
     clean_restart $::testfile
 
     if { $start_before } {
-       if {![runto_main temporary]} {
+       if {![runto_main -temporary]} {
            return
        }
     }
@@ -168,7 +168,7 @@ proc_with_prefix scenario_1 { start_before } {
     }
 
     if { !$start_before } {
-       if {![runto_main temporary no-delete-breakpoints]} {
+       if {![runto_main -temporary -no-delete-breakpoints]} {
            return
        }
     }
@@ -245,7 +245,7 @@ proc_with_prefix scenario_2 { start_before } {
     clean_restart $::testfile
 
     if { $start_before } {
-       if {![runto_main temporary]} {
+       if {![runto_main -temporary]} {
            return
        }
     }
@@ -258,7 +258,7 @@ proc_with_prefix scenario_2 { start_before } {
     }
 
     if { !$start_before } {
-       if {![runto_main temporary no-delete-breakpoints]} {
+       if {![runto_main -temporary -no-delete-breakpoints]} {
            return
        }
     }
@@ -293,7 +293,7 @@ proc_with_prefix scenario_3 { start_before } {
     clean_restart $::testfile
 
     if { $start_before } {
-       if {![runto_main temporary]} {
+       if {![runto_main -temporary]} {
            return
        }
     }
@@ -348,7 +348,7 @@ proc_with_prefix scenario_3 { start_before } {
 
     # Do not use runto_main, it deletes all breakpoints.
     if { !$start_before } {
-       if {![runto_main temporary no-delete-breakpoints]} {
+       if {![runto_main -temporary -no-delete-breakpoints]} {
            return
        }
     }
@@ -370,7 +370,7 @@ proc_with_prefix scenario_4 { start_before } {
     clean_restart $::testfile
 
     if { $start_before } {
-       if {![runto_main temporary]} {
+       if {![runto_main -temporary]} {
            return
        }
     }
index e40bc213454babb9d695fa26509763068eaad593..25b98054053b39b37110a7ebb205b6126497c471 100644 (file)
@@ -192,7 +192,7 @@ proc_with_prefix test_conv_vars {} {
     gdb_test "print \$_linker_namespace" ".* = 0" \
        "Still in the default namespace"
 
-    gdb_breakpoint "inc" allow-pending
+    gdb_breakpoint "inc" -allow-pending
     gdb_breakpoint [gdb_get_line_number "TAG: first dlclose"]
 
     foreach_with_prefix dl {3 2 1} {
index 60922643d28b09ec01469ce7e0fe23e75408643e..6485a43a7aa7e531aa00b62b02b8666c99c7bcdc 100644 (file)
@@ -194,7 +194,7 @@ proc test_dlmopen_no_attach {} {
 
     # Break in the to-be-loaded library and at the end of main.
     delete_breakpoints
-    gdb_breakpoint $::srcfile_lib:$::bp_inc allow-pending
+    gdb_breakpoint $::srcfile_lib:$::bp_inc -allow-pending
     gdb_breakpoint $::srcfile:$::bp_main
 
     test_dlmopen
index 5a32ab0d2b8956d428713c7f70eb68a2b89e8d06..3021d5afc0c02bbddc6be25f138c2cb4b206f054 100644 (file)
@@ -73,7 +73,7 @@ if { $address == -1 } {
 
 clean_restart $testfile
 
-gdb_assert [gdb_breakpoint "*$address" no-message] "set breakpoint on address"
+gdb_assert [gdb_breakpoint "*$address" -no-message] "set breakpoint on address"
 
 # The assert did not reproduce when running to main, and continuing to the
 # breakpoint, so instead, run to the breakpoint.
index 6fa076ada2a7371bea7a16a3bfa743500c231ee7..ad10cea426b18b40b5571b079aa4fd081fa1c42f 100644 (file)
@@ -127,7 +127,7 @@ proc do_follow_exec_mode_tests { mode cmd infswitch } {
        # past it.
        #
        if {$cmd == "continue"} {
-           gdb_breakpoint "$execd_line" "allow-pending"
+           gdb_breakpoint "$execd_line" -allow-pending
        }
 
        # Execute past the exec call.
index d58b64095f7ce5c908bff2a85550104b50a99237..c4eac8bb4f60b0a3140c3cf1b00de738bbed8e40 100644 (file)
@@ -57,7 +57,7 @@ proc setup_gdb { binfile srcfile } {
        return -code return
     }
 
-    gdb_breakpoint [gdb_get_line_number " VFORK " $srcfile] temporary
+    gdb_breakpoint [gdb_get_line_number " VFORK " $srcfile] -temporary
     gdb_continue_to_breakpoint "at VFORK"
 }
 
index b3c240b8a8f37e5abc35365434776a8fe2f3696e..3ae6ba87dad655de7a0b852920b8cd66e0dba8c5 100644 (file)
@@ -49,7 +49,7 @@ proc do_test {} {
     gdb_test_no_output "set follow-fork-mode child"
     gdb_test_no_output "set detach-on-fork off"
 
-    runto "add" qualified allow-pending
+    runto "add" -qualified -allow-pending
 
     # Since we have debug info in the shlib, we should have the file name available.
     gdb_test "frame" "add \(.*\) at .*$::srcfile2:${::decimal}.*"
index 30969248d56c5a8576502dee9bacfb8301e15580..161bb65853aa8ff91f7db1fa9389cc830f866185 100644 (file)
@@ -48,7 +48,7 @@ set line [gdb_get_line_number "set breakpoint 1 here"]
 clean_restart $testfile
 
 set msg "set breakpoint by full path before loading symbols - built absolute"
-if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
+if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} -no-message] != 0 } {
     pass $msg
 } else {
     fail $msg
@@ -58,7 +58,7 @@ gdb_test "break -q main" \
         "Breakpoint.*at.*line.*" "set breakpoint at main - built absolute"
 
 set msg "set breakpoint by full path after loading symbols - built absolute"
-if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
+if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} -no-message] != 0 } {
     pass $msg
 } else {
     fail $msg
@@ -73,7 +73,7 @@ if  { [gdb_compile [relative_filename [pwd] [build_standard_output_file tmp-${sr
 clean_restart $testfile
 
 set msg "set breakpoint by full path before loading symbols - built relative"
-if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
+if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} -no-message] != 0 } {
     pass $msg
 } else {
     fail $msg
@@ -83,7 +83,7 @@ gdb_test "break -q main" \
         "Breakpoint.*at.*line.*" "set breakpoint at main - built relative"
 
 set msg "set breakpoint by full path after loading symbols - built relative"
-if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
+if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} -no-message] != 0 } {
     pass $msg
 } else {
     fail $msg
@@ -102,7 +102,7 @@ with_cwd [standard_output_file {}] {
 clean_restart $testfile
 
 set msg "set breakpoint by full path before loading symbols - built other"
-if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
+if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} -no-message] != 0 } {
     pass $msg
 } else {
     fail $msg
@@ -112,7 +112,7 @@ gdb_test "break -q main" \
         "Breakpoint.*at.*line.*" "set breakpoint at main - built other"
 
 set msg "set breakpoint by full path after loading symbols - built other"
-if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
+if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} -no-message] != 0 } {
     pass $msg
 } else {
     fail $msg
index 7c5b43de085552cdb55148597b6a44f211eda8dd..9e391ce00e0d52d7f4ac423076b7efc9094ec027 100644 (file)
@@ -39,7 +39,7 @@ proc do_test { pass } {
     }
 
     gdb_breakpoint "${testfile}.c:[gdb_get_line_number "loop-line" ${testfile}.c]" \
-                  temporary
+                  -temporary
 
     gdb_test "continue" "Temporary breakpoint .* loop-line .*"
 
index fdb9a79a13a7983b39cdaf98aa76c9f3c6ac77ad..2ba25499daa792699989c57c1ff09a6ae2e45bcc 100644 (file)
@@ -28,7 +28,7 @@ if { [prepare_for_testing "prepare" $testfile $srcfile] != 0 } {
     return
 }
 
-if {![runto abort {allow-pending}]} {
+if {![runto abort -allow-pending]} {
     return
 }
 
index e03b6be467a69c0a70c908c2bff141937425f860..47fba196ccdc32ccc2da79888d5faf219708c72e 100644 (file)
@@ -23,7 +23,7 @@ if { ![runto_main] } {
     return
 }
 
-if { ![gdb_breakpoint "*0x1" message] } {
+if { ![gdb_breakpoint "*0x1" -message] } {
     return
 }
 
index b6aaa5855da1716975ec96e356fbd0dcda25f676..b840766a7bb99770908f0dd1462dcfc9cfd488ed 100644 (file)
@@ -93,7 +93,7 @@ proc start_nested_structs_test { lang types } {
     # Some targets only enable the FPU on first use, so ensure that we
     # have used the FPU before we make calls from GDB to code that
     # could use the FPU.
-    gdb_breakpoint [gdb_get_line_number "Break Here"] temporary
+    gdb_breakpoint [gdb_get_line_number "Break Here"] -temporary
     gdb_continue_to_breakpoint "breakpt" ".* Break Here\\. .*"
 
     return 1
index 21357c2f479df0d7ed9b4a1c74cbf2d79871fc00..b11323bc083e9bbb4e39c8ecb5c698b6a88b2257 100644 (file)
@@ -76,7 +76,7 @@ proc do_test { method startup_with_shell inferior_args expected_results \
        gdb_test "" "" "stop at first instruction"
 
        # Put a breakpoint and continue until main.
-       if { ![gdb_breakpoint "main" message] } {
+       if { ![gdb_breakpoint "main" -message] } {
            fail "could not set breakpoint on main"
            return -1
        }
@@ -87,7 +87,7 @@ proc do_test { method startup_with_shell inferior_args expected_results \
        }
 
     } elseif { $method == "run" } {
-       if { ![gdb_breakpoint "main" message] } {
+       if { ![gdb_breakpoint "main" -message] } {
            fail "could not set breakpoint on main"
            return -1
        }
@@ -253,7 +253,7 @@ proc run_all_tests {} {
            }
 
            # Now place a breakpoint on main.
-           if { ![gdb_breakpoint "main" message] } {
+           if { ![gdb_breakpoint "main" -message] } {
                fail "could not set breakpoint on main"
                continue
            }
index 5e740f2a3ee58f26e9027bd9961332c073f134cc..0e99eb96ef9edad82de64bd16a14bc23ce279cc7 100644 (file)
@@ -91,8 +91,8 @@ check_info_shared "info sharedlibrary #1" 0 0
 
 # Set up breakpoints.
 gdb_breakpoint "stop"
-gdb_breakpoint "foo" allow-pending
-gdb_breakpoint "bar" allow-pending
+gdb_breakpoint "foo" -allow-pending
+gdb_breakpoint "bar" -allow-pending
 
 # Run to the first stop and check that only the first library is loaded.
 gdb_continue_to_breakpoint "library load #1" "\\.?stop .*"
index e9b3f2672ae955bece173c8290077634989810c8..0b5a6caead8111e2b370cf829a1d56fc4bf0ef08 100644 (file)
@@ -302,7 +302,7 @@ proc jit_reader_test {} {
        # Check that the DWARF unwinder does not crash in presence of
        # JIT objfiles.
        gdb_test "up"
-       gdb_breakpoint "*function_add" temporary
+       gdb_breakpoint "*function_add" -temporary
        gdb_test "cont" ".*Temporary breakpoint ${any} in jit_function_add .*"
        gdb_test "bt" \
            [multi_line \
index 920f145d628842a4b7277890090fcfc50b9d4ca3..1b2de580d532b06de1170a0521857dbf0ed1e767 100644 (file)
@@ -75,7 +75,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
     # Instead of trying to cater for all these possibilities in a controlled
     # fashion, make the breakpoint temporary, ensuring that there will just be
     # one stop.
-    gdb_breakpoint "*_start" temporary
+    gdb_breakpoint "*_start" -temporary
 
     gdb_run_cmd
 
index cd7c1bf8e4a86bd24731b0a5c6add5ad30c33d6c..61334112afa663cc244ce23f74a1b9dd72cd5aae 100644 (file)
@@ -29,7 +29,7 @@ if {![runto_main]} {
 proc find_breakpoint_pc { sym } {
     global decimal hex gdb_prompt
 
-    if { [gdb_breakpoint $sym temporary] } {
+    if { [gdb_breakpoint $sym -temporary] } {
        pass "setting breakpoint at $sym"
     }
 
index 29480ac2f2c4ce8923fb205ed3d2935c4a33fa37..4ac6df9708444fd0b57745895c191a950630547f 100644 (file)
@@ -68,7 +68,7 @@ proc_with_prefix test { non-stop threaded run-or-attach } {
        return
     }
 
-    gdb_breakpoint "all_started" "temporary"
+    gdb_breakpoint "all_started" -temporary
     gdb_continue_to_breakpoint "continue to all_started"
 
     # If all-stop, everything stopped when we hit the all_started
index bcee223874a28ef34f7ed3b76168c98a15da8f64..1b2bc0dd5781d985b663abb633eb58ea9fbb9969 100644 (file)
@@ -167,7 +167,7 @@ clean_restart $testfile
 
 # PR's 16495, 18213
 # test that we can re-set breakpoints in shared libraries
-gdb_breakpoint "shr1" "allow-pending"
+gdb_breakpoint "shr1" -allow-pending
 
 set test "run to bp in shared library"
 gdb_run_cmd
index eff7ffe16cbfbdb8c51f46b818b838c1dc73ae1c..6cd88f211251bb9ffa3011d2ef026420ee2f6e4e 100644 (file)
@@ -94,6 +94,6 @@ if { $load_segment_count <= 2 } {
 # then we will see an internal error once the inferior starts running.
 clean_restart $testfile
 
-if {![runto_main message]} {
-    return
+if {![runto_main -message]} {
+  return
 }
index 80e28638b2d2838a763a8e34a386930652ef3ecf..59e02b696f43b40678dded1149917da0115191de 100644 (file)
@@ -104,7 +104,7 @@ delete_breakpoints
 
 set lib2_lineno [gdb_get_line_number "break here" ${srcfile_lib2}]
 
-gdb_breakpoint "${lib2name}.c:${lib2_lineno}" {allow-pending}
+gdb_breakpoint "${lib2name}.c:${lib2_lineno}" -allow-pending
 
 # Verify that both the location and source code are displayed
 gdb_continue_to_breakpoint "bar" \
index ea3db89d2e92435e44abd40e4224b123e0dbf675..cf0dc02c947e5d5d364e9e856b92e27d40618f81 100644 (file)
@@ -23,7 +23,7 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint [gdb_get_line_number "test-next"] temporary
+gdb_breakpoint [gdb_get_line_number "test-next"] -temporary
 gdb_continue_to_breakpoint "test-next" ".* test-next .*"
 gdb_breakpoint [gdb_get_line_number "test-fail"]
 gdb_test_no_output {set $test_fail_bpnum=$bpnum}
index 022c1eedbd9e699b1a03d2a7be64683549ad1d8b..396d33591b280942212f53c5a538c7168eb92a7b 100644 (file)
@@ -83,7 +83,7 @@ proc do_test { remove_expr } {
     gdb_continue_to_breakpoint gdb_add_symbol_file
 
     # 2) Set a pending breakpoint at bar in $srcfile3.
-    set result [gdb_breakpoint bar allow-pending]
+    set result [gdb_breakpoint bar -allow-pending]
     if {!$result} {
        return
     }
index fc6a0c08b2d505f9bb787f76289e54b291ec66e8..0e98c8c75975083c7e94502b8eec793f98add8aa 100644 (file)
@@ -40,5 +40,5 @@ if {![runto_main]} {
 }
 
 # Using a line number ensures that the default symtab is used.
-gdb_breakpoint [gdb_get_line_number "break here" $srcfile] message
+gdb_breakpoint [gdb_get_line_number "break here" $srcfile] -message
 gdb_continue_to_breakpoint "run to breakpoint marker"
index 2136af0fe7bcbc36b4fd7efffaa22e2e23aff756..f6eb621e9fae23868dd0a3db2a3ea1420e40e981 100644 (file)
@@ -57,7 +57,7 @@ proc gdb_test_with_xfail { cmd re cond} {
 
 proc do_tests {force_internal_tls} {
     clean_restart $::testfile
-    if {![runto main temporary]} {
+    if {![runto main -temporary]} {
        return
     }
 
@@ -65,7 +65,7 @@ proc do_tests {force_internal_tls} {
        gdb_test_no_output "maint set force-internal-tls-address-lookup on"
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-1"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-1"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-1"
 
     with_test_prefix "before assignments" {
@@ -100,7 +100,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-2"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-2"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-2"
 
     with_test_prefix "at main-breakpoint-2" {
@@ -117,7 +117,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-3"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-3"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-3"
 
     # At this point lib2 and lib3 have been unloaded.  Also, TLS vars
@@ -137,7 +137,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-4"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-4"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-4"
 
     # lib3 has been loaded again; lib2 is the only one not loaded.
@@ -157,7 +157,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-5"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-5"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-5"
 
     # lib2 and lib3 are loaded; lib1 and lib4 are not.
@@ -177,7 +177,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-6"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-6"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-6"
 
     # lib1, lib3 and lib4 are loaded; lib2 is not loaded.
@@ -197,7 +197,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-7"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-7"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-7"
 
     # lib2 and lib3 are loaded; lib1 and lib4 are not.
@@ -217,7 +217,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-8"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-8"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-8"
 
     # lib1, lib2, lib3, and lib4 are all loaded.
@@ -236,7 +236,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-9"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-9"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-9"
 
     # lib2 is loaded; lib1, lib3, and lib4 are not.
@@ -255,7 +255,7 @@ proc do_tests {force_internal_tls} {
        }
     }
 
-    gdb_breakpoint [gdb_get_line_number "main-breakpoint-10"] temporary
+    gdb_breakpoint [gdb_get_line_number "main-breakpoint-10"] -temporary
     gdb_continue_to_breakpoint "main-breakpoint-10"
 
     # lib3 and lib4 are loaded; lib1 and lib2 are not.
index bdfcc67249890dfb99017740d37ca4b825e6d0f2..e9751023906a4a421e4779f6b06b937259933427 100644 (file)
@@ -63,8 +63,8 @@ gdb_load_shlib $lib_sl2
 # manually loaded and unloaded
 #
 
-gdb_breakpoint "shrfunc1" allow-pending
-gdb_breakpoint "shrfunc2" allow-pending
+gdb_breakpoint "shrfunc1" -allow-pending
+gdb_breakpoint "shrfunc2" -allow-pending
 
 gdb_test "info break" \
     "Num     Type\[ \]+Disp Enb Address\[ \]+What\r?
@@ -85,7 +85,7 @@ gdb_test "info break" \
 2\[\t \]+breakpoint     keep y *<PENDING> *shrfunc2.*" \
 "pending breakpoint info on first run at shrfunc1"
 
-gdb_breakpoint "$testfile.c:[gdb_get_line_number "y-set-1" $testfile.c]" temporary
+gdb_breakpoint "$testfile.c:[gdb_get_line_number "y-set-1" $testfile.c]" -temporary
 
 gdb_test "continue" \
 "Continuing.*warning: Temporarily disabling breakpoints for.*${lib_syms}.*y-set-1.*" \
@@ -108,7 +108,7 @@ gdb_test "info break" \
 2\[\t \]+breakpoint     keep y *<PENDING> *shrfunc2.*" \
 "pending breakpoint info on second run at shrfunc1"
 
-gdb_breakpoint "$testfile.c:[gdb_get_line_number "y-set-1" $testfile.c]" temporary
+gdb_breakpoint "$testfile.c:[gdb_get_line_number "y-set-1" $testfile.c]" -temporary
 
 gdb_test "continue" \
 "Continuing.*warning: Temporarily disabling breakpoints for.*${lib_syms}.*y-set-1.*" \
index 58d40f6f732d22fb32b532b7ea6381f9fbbd59b8..e72107df4c33dffa81de670a41f8b0e2ef1a7c16 100644 (file)
@@ -53,7 +53,7 @@ with_test_prefix "main" {
 # debug information we may stop at the closing brace or at the return.
 #
 # instead, run to test
-gdb_breakpoint test {temporary}
+gdb_breakpoint test -temporary
 gdb_test "reverse-continue" ".*test\.1.*"
 
 with_test_prefix "test" {
index 50f77952bb3b52d9f2b65ffa91480b8182c78061..42114bf31c3bde29ab857c8990578b742f065242 100644 (file)
@@ -55,9 +55,9 @@ foreach test $methods {
 
     gdb_test "list $test" $result
     gdb_test "list '$test'" $result
-    gdb_assert { [gdb_breakpoint $test no-message] } \
+    gdb_assert { [gdb_breakpoint $test -no-message] } \
        "break $test, unquoted"
-    gdb_assert { [gdb_breakpoint '$test' no-message] } \
+    gdb_assert { [gdb_breakpoint '$test' -no-message] } \
        "break $test, single-quoted"
 }
 
index 5f99ab9a437dc275d348f83673b65f5c1883b08e..ef5189ca519a690251af8b5a05c629eee5fe2e10 100644 (file)
@@ -48,7 +48,7 @@ gdb_test "break foo" "Breakpoint $decimal at $hex"
 gdb_test "info breakpoints" "<foo\\(\\)@plt>"
 
 # Runto main, but don't delete all the breakpoints.
-if {![runto_main no-delete-breakpoints]} {
+if {![runto_main -no-delete-breakpoints]} {
     return
 }
 
index ba0fc6d9cbb77ae037c1e38041a5190bb65343f0..a0085dc415b857545de0998f7be5aeb083d9dbe0 100644 (file)
@@ -152,9 +152,9 @@ foreach test $methods {
 
     gdb_test "list -qualified $func" $result
     gdb_test "list -qualified '$func'" $result
-    gdb_assert { [gdb_breakpoint "-qualified $func" no-message] } \
+    gdb_assert { [gdb_breakpoint "-qualified $func" -no-message] } \
        "break -qualified $func, unquoted"
-    gdb_assert { [gdb_breakpoint "-qualified '$func'" no-message] } \
+    gdb_assert { [gdb_breakpoint "-qualified '$func'" -no-message] } \
        "break -qualified $func, single-quoted"
 }
 
index 2dbaae12869404ea17786f0a860c39ef6c458c0b..d62b7fb78b9d659442beb1bd9b9503e6992ac3df 100644 (file)
@@ -37,7 +37,7 @@ proc tbreak_and_cont {text} {
     global testfile
 
     set line [gdb_get_line_number $text $testfile.cc]
-    gdb_breakpoint "$testfile.cc:$line" temporary
+    gdb_breakpoint "$testfile.cc:$line" -temporary
     gdb_test "continue" "Temporary breakpoint.*" "continuing to $text"
 }
 
index 4c9b6a8b8bdccb3ec5031cd9695894c09a69d407..3353a61199d09b10ad118f5a5570df1494a8f9f2 100644 (file)
@@ -31,7 +31,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
 }
 
 foreach ordinary {"outer<int>::fn" "outer<char>::fn<short>" "toplev<char>"} {
-    gdb_breakpoint $ordinary message
+    gdb_breakpoint $ordinary -message
     clean_restart $testfile
 }
 
index 345290276628daf59ae6c4457e6ab25ffba8d2da..da56405cc51a422fdaa80332079b9f54008295ec 100644 (file)
@@ -41,7 +41,7 @@ with_test_prefix "save" {
        return
     }
 
-    gdb_breakpoint "function" qualified
+    gdb_breakpoint "function" -qualified
     gdb_breakpoint "function"
 
     # Save the breakpoints into a file.
index e8bb998231b4c830450dea68557317fd52d9ad00..2127847665db48062a4b808b6938f15ce0d3a70b 100644 (file)
@@ -74,7 +74,7 @@ proc do_test { use_header } {
 
     clean_restart $executable
 
-    if {![runto $main_location qualified]} {
+    if {![runto $main_location -qualified]} {
        return
     }
 
index 187bd494902a7046322e396790b80049e575eda5..31167f30521a71a272a45fe261674b04d9934f89 100644 (file)
@@ -70,14 +70,14 @@ foreach t { int char } {
     }
 }
 
-gdb_breakpoint "Outer::Inner::doit" message
+gdb_breakpoint "Outer::Inner::doit" -message
 
 foreach s { Foo Bar Baz } {
-    gdb_breakpoint "main::${s}::doit" message
+    gdb_breakpoint "main::${s}::doit" -message
 }
 
 foreach t { int char } {
     foreach s { Foo Bar Baz } {
-       gdb_breakpoint "foobar<$t>(int)::${s}::doit" message
+       gdb_breakpoint "foobar<$t>(int)::${s}::doit" -message
     }
 }
index 044190f1fac09c185435d4bce422e6273d4af9ba..089dcf64f4f7e1ae823230b756a0485ec9befa8f 100644 (file)
@@ -637,8 +637,8 @@ foreach t [list "int" "char" "Empty<int>"] {
     gdb_test "break Foozle::fogey ($t)" "Breakpoint.*at.* \\(3 locations\\)"
     gdb_test "break Foozle::fogey<$t>" "Breakpoint.*at.* \\(3 locations\\)"
     foreach u [list "int" "char" "Empty<int>"] {
-       gdb_breakpoint "Foozle<$t>::fogey<$u>" message
-       gdb_assert { [gdb_breakpoint "Foozle<$t>::fogey<$u> ($u)" no-message] } \
+       gdb_breakpoint "Foozle<$t>::fogey<$u>" -message
+       gdb_assert { [gdb_breakpoint "Foozle<$t>::fogey<$u> ($u)" -no-message] } \
            "break Foozle<$t>::fogey<$u> ($u), success"
     }
 }
@@ -660,19 +660,19 @@ gdb_test "break -source $srcfile -func operator<<" \
     "Breakpoint.*at.* \\(2 locations\\)"
 foreach t [list "Empty" "Foozle"] {
     set tt "$t<int>"
-    gdb_breakpoint "operator< <$tt>" message
-    gdb_breakpoint "operator<< <$tt>" message
+    gdb_breakpoint "operator< <$tt>" -message
+    gdb_breakpoint "operator<< <$tt>" -message
 
     # Try a specific instance, both with and without whitespace
     # after the template-template parameter.
     set loc "operator< <$tt> ($tt&, $tt&)"
-    gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+    gdb_assert { [gdb_breakpoint $loc -no-message] } "break $loc, success"
     set loc "operator< <$tt > ($tt&, $tt&)"
-    gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+    gdb_assert { [gdb_breakpoint $loc -no-message] } "break $loc, success"
     set loc "operator<< <$tt> ($tt&, $tt&)"
-    gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+    gdb_assert { [gdb_breakpoint $loc -no-message] } "break $loc, success"
     set loc "operator<< <$tt > ($tt&, $tt&)"
-    gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+    gdb_assert { [gdb_breakpoint $loc -no-message] } "break $loc, success"
 }
 
 # Test that "-qualified" finds no matching locations.
index eb1accc86d5e86d9d3906ce9873e514fb9c875ae..6a79ceaa606ffc98546a1e4dcded5bf03dac9a72 100644 (file)
@@ -233,7 +233,7 @@ proc_with_prefix local_url { } {
     gdb_breakpoint $lineno
 
     # Run to main, but don't delete all breakpoints.
-    if {![runto_main no-delete-breakpoints]} {
+    if {![runto_main -no-delete-breakpoints]} {
        return
     }
 
index 144bec7e53256a1765b24e01b112c550e329f3fb..a3d90e539705518a69af2a34fdec166d57e2f29f 100644 (file)
@@ -63,8 +63,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 }
 
 gdb_test_no_output "set language ada"
-gdb_breakpoint "pck.xtra.function" message
-gdb_breakpoint "pck.xtra.function\[cold\]" message
+gdb_breakpoint "pck.xtra.function" -message
+gdb_breakpoint "pck.xtra.function\[cold\]" -message
 gdb_test "complete break pck.xtra.function\[co" \
     "break pck.xtra.function\\\[cold\\\]" \
     "test completion of cold function"
index 01c0fbe5e4e2d12fe05c8766b79a505473455309..23dd7aaa86f560938cd91f894ce095e1281f533a 100644 (file)
@@ -68,8 +68,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 
 with_test_prefix "first first" {
     gdb_test_no_output "set language ada"
-    gdb_breakpoint "<__gnat_namefirst>" message
-    gdb_breakpoint "<__gnat_namesecond>" message
+    gdb_breakpoint "<__gnat_namefirst>" -message
+    gdb_breakpoint "<__gnat_namesecond>" -message
 }
 
 # Run the test again, but this time check the symbols in the other
@@ -80,6 +80,6 @@ clean_restart ${testfile}
 
 with_test_prefix "second first" {
     gdb_test_no_output "set language ada"
-    gdb_breakpoint "<__gnat_namesecond>" message
-    gdb_breakpoint "<__gnat_namefirst>" message
+    gdb_breakpoint "<__gnat_namesecond>" -message
+    gdb_breakpoint "<__gnat_namefirst>" -message
 }
index 3f03bf78df97ffe2f8f0d76606f703380def6a2a..d743dca89ed67e4c435180c501df464d29aca272 100644 (file)
@@ -31,4 +31,4 @@ if { [skip_inline_frame_tests] } {
 
 # Set a break-point in inline function bar, in a CU for which the partial
 # symtab has not been expanded.
-gdb_breakpoint "bar" message
+gdb_breakpoint "bar" -message
index b2f7a42c730271404fc4219233961e6ac5eb29c3..10ddbfc1422b1387f77bd874aadfadf30ec70c15 100644 (file)
@@ -53,5 +53,5 @@ if {![runto_main]} {
     return
 }
 
-set breakpoint_at_missing_lineno_set [gdb_breakpoint "1" no-message]
+set breakpoint_at_missing_lineno_set [gdb_breakpoint "1" -no-message]
 gdb_assert { !$breakpoint_at_missing_lineno_set  }
index f02d82c3f22076fb92a955f16563185e056bc32f..b76abddebd5f2c5a769b606d8a7e47f44099ac82 100644 (file)
@@ -71,4 +71,4 @@ if {![runto_main]} {
     return
 }
 
-gdb_breakpoint "$srcfile:27" message
+gdb_breakpoint "$srcfile:27" -message
index 607e72bdf83ae82bbadba4d2efed479fee73ce55..be97260c0b5fee18fe4b8233fcb80403a646b56d 100644 (file)
@@ -208,4 +208,4 @@ if {[prepare_for_testing "failed to prepare" $testfile \
 # All we need to do is set a breakpoint, which causes the DWARF
 # info to be read, to demonstrate the problem.
 
-gdb_breakpoint "bytes_repeat" message
+gdb_breakpoint "bytes_repeat" -message
index 9c0c5a700c2f624fdc4476c71b9148fef372d5e0..14f0ca8e44a1eea0b78ff5803cfbfb5af199dd0c 100644 (file)
@@ -102,7 +102,7 @@ with_test_prefix "first session" {
     gdb_load_shlib ${lib_so}
 
     # Run to foo to make sure foo refers to the function, and not foo@PLT.
-    if {![runto foo qualified]} {
+    if {![runto foo -qualified]} {
        return
     }
 
@@ -370,5 +370,5 @@ with_test_prefix "third session" {
     # the same thing.  It's at this step that an internal error would
     # occur for PR28030.  The "message" argument tells runto to turn on
     # the printing of PASSes while runto is doing its job.
-    runto "bar" message
+    runto "bar" -message
 }
index aefa2609a8ace4bcfecfb5b7443ab324e9b61a12..d10eac0bffca89bc28c334cd935e5e56adb7e2fd 100644 (file)
@@ -69,4 +69,4 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
     return
 }
 
-gdb_breakpoint "the_type::method" message
+gdb_breakpoint "the_type::method" -message
index 8f00ce920af32eeb45a4f4e417a37f70893129fd..e700deda16d9ecad787b811fcbc27a2ae3154405 100644 (file)
@@ -66,8 +66,8 @@ proc test_python_helper {} {
     # (a) is easy to reach by issuing a simple gdb command, and
     # (b) is unlikely to be modified very often within gdb, and
     # (c) has a parameter that is either a 'struct type *' or a 'struct value *'.
-    gdb_breakpoint value_print qualified
-    gdb_breakpoint c_print_type qualified
+    gdb_breakpoint value_print -qualified
+    gdb_breakpoint c_print_type -qualified
 
     # With gdb build with -O2 -flto=auto and gcc 7.5.0, we can get the mangled
     # names due to a problem in the debug info, so we work around this by less
index b6caba424dccdf905be8e1d090b2625231a5c549..13db8d5773f49852d01136e70861fae432c87dd7 100644 (file)
@@ -72,7 +72,7 @@ if { $found_wrong_foo } {
     #    <6c46c>   DW_AT_name        : main.T.Foo
 }
 
-if { [gdb_breakpoint ${bp_location1} message]} {
+if { [gdb_breakpoint ${bp_location1} -message]} {
     gdb_test "cont" "Breakpoint .*, ${bp_location1}.*" \
        "going to first breakpoint"
 }
@@ -96,7 +96,7 @@ if { $found_wrong_bar == 1 } {
     # diverge between gc and gccgo.  So, we accept the main.T.Bar as valid.
 }
 
-if { [gdb_breakpoint ${bp_location2} message] } {
+if { [gdb_breakpoint ${bp_location2} -message] } {
     gdb_test "cont" "Breakpoint .*, ${bp_location2}.*" \
        "going to second breakpoint"
 }
index aad011e55b02368c600a1bc3435c68b75ad8dea9..28b9bab93b709ff6395652ab4f152fbec5055f82 100644 (file)
@@ -28,4 +28,4 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug go}]}
 }
 
 # The bug was that stopping in _start would crash.
-runto "*_start" message
+runto "*_start" -message
index b5d88e6a190ce30be9ed41c1aaa0fe4715ebcc47..3fa4b34f9f699803d5f0226df63f667ee55968d5 100644 (file)
@@ -580,7 +580,7 @@ namespace eval $testfile {
 
     set tst "pending invalid conditional explicit breakpoint"
     if {![gdb_breakpoint "-func myfunction if foofoofoo == 1" \
-             allow-pending]} {
+             -allow-pending]} {
        fail "set $tst"
     } else {
        gdb_test "info break" ".*PENDING.*myfunction\r\n\\s+stop only if foofoofoo == 1.*" $tst
@@ -597,7 +597,7 @@ namespace eval $testfile {
 
     set tst "pending valid conditional explicit breakpoint"
     if {![gdb_breakpoint "-func myfunction if arg == 0" \
-             allow-pending]} {
+             -allow-pending]} {
        fail "set $tst"
     } else {
        gdb_test "info break" \
index ae9380575cf64263887a81ba4d324cb16897ef1c..0c87ac2ead79886d230a94fddcc3add121d4779a 100644 (file)
@@ -32,16 +32,16 @@ gdb_test_no_output "set breakpoint pending off"
 # The linespec lexer ignores the language setting when lexing
 # keywords.
 gdb_test "break if" "Function \"if\" not defined."
-gdb_breakpoint "thread" "message"
-gdb_breakpoint "task" "message"
+gdb_breakpoint "thread" -message
+gdb_breakpoint "task" -message
 
 # The lexer should prune any trailing whitesapce, so the expected
 # outcome of the following tests should be the same as the previous
 # tests.
 with_test_prefix "trailing whitespace" {
     gdb_test "break if " "Function \"if\" not defined."
-    gdb_breakpoint "thread " "message"
-    gdb_breakpoint "task " "message"
+    gdb_breakpoint "thread " -message
+    gdb_breakpoint "task " -message
 }
 
 # With a single keyword specified first in the location,
@@ -56,7 +56,7 @@ gdb_test "break thread 123" "Unknown thread 123\\."
 gdb_test "break thread foo" "Invalid thread ID: foo"
 gdb_test "break task 123" "Unknown task 123\\."
 gdb_test "break task foo" "Junk 'foo' after task keyword\\."
-gdb_breakpoint "thread if 0" "message"
+gdb_breakpoint "thread if 0" -message
 
 # These are also NULL locations, but using a subsequent keyword
 # as the "junk".
@@ -86,7 +86,7 @@ foreach prefix {"" "thread 1 "} {
                        "You can specify only one thread\\."
                } else {
                    gdb_breakpoint "main ${prefix}-force-condition${suffix}${cond}"\
-                       "message"
+                       -message
                }
            }
        }
index ab63fe52a1d96297af568c1d634e72253e5a0556..efa657b1385ca677e23f9329364cd0c617a0f961 100644 (file)
@@ -35,6 +35,6 @@ gdb_test "break $srcfile:$bp_location1" \
 
 gdb_continue_to_breakpoint "$bp_location1"
 
-gdb_breakpoint "thread" "message"
+gdb_breakpoint "thread" -message
 
 gdb_continue_to_breakpoint "thread function"
index f6e7e970f89a676b0d2c3e4b1f81fcddbb57c669..fc756a8325220e7f17ddef92b34651b4779a4c86 100644 (file)
@@ -187,7 +187,7 @@ check_info_breakpoints "first check for inferior specific breakpoint" \
     $bp_number 2
 
 # Create a multi-inferior breakpoint to stop at.
-gdb_breakpoint "stop_breakpt" message
+gdb_breakpoint "stop_breakpt" -message
 set stop_bp_num [get_integer_valueof "\$bpnum" "INVALID" \
                    "get b/p number for stop_breakpt"]
 
index 20d39adaae2ce86aee60815be8989c1f81558513..6ed0230010d30fee5fae0bbb3a659ab7efa60f3b 100644 (file)
@@ -60,7 +60,7 @@ proc start_inferior {num} {
 
        gdb_load $binfile
 
-       gdb_breakpoint "initialized" {temporary}
+       gdb_breakpoint "initialized" -temporary
        gdb_run_cmd
        gdb_test "" ".*reakpoint .*, initialized .*${srcfile}.*" "run"
 
index a78c04531b226f72fcec539671efbea2fb34269b..ff2bcc87ca700728f8f4665f46933e9968f85d9f 100644 (file)
@@ -107,7 +107,7 @@ proc do_bp_test { bp_type bp_pending } {
        set bp_restriction "inferior 1"
     }
 
-    gdb_breakpoint "$bp_func $bp_restriction" allow-pending
+    gdb_breakpoint "$bp_func $bp_restriction" -allow-pending
     set bp_number [get_integer_valueof "\$bpnum" "INVALID" \
                       "get b/p number for previous breakpoint"]
 
index 6c75474fe574fe50b7dba65f5b4be72639623b5d..808bd4c5d83988f5189dbfce8bf0c31c964b251b 100644 (file)
@@ -53,7 +53,7 @@ proc do_test_setup { inf_1_stop inf_2_stop } {
        return false
     }
 
-    gdb_breakpoint [gdb_get_line_number ${inf_1_stop}] temporary
+    gdb_breakpoint [gdb_get_line_number ${inf_1_stop}] -temporary
     gdb_continue_to_breakpoint "move inferior 1 into position"
 
     gdb_test "add-inferior -exec ${::binfile}" \
@@ -64,7 +64,7 @@ proc do_test_setup { inf_1_stop inf_2_stop } {
        return false
     }
 
-    gdb_breakpoint [gdb_get_line_number ${inf_2_stop}] temporary
+    gdb_breakpoint [gdb_get_line_number ${inf_2_stop}] -temporary
     gdb_continue_to_breakpoint "move inferior 2 into position"
 
     gdb_test_no_output "set breakpoint pending on"
@@ -125,7 +125,7 @@ proc_with_prefix test_no_inf_display {} {
     # there will be no locations and the breakpoint will be created
     # pending.  Pass the 'allow-pending' flag so the gdb_breakpoint
     # correctly expects the new breakpoint to be pending.
-    gdb_breakpoint "foo" allow-pending
+    gdb_breakpoint "foo" -allow-pending
     set bpnum [get_integer_valueof "\$bpnum" "*INVALID*" \
                   "get foo breakpoint number"]
 
@@ -138,7 +138,7 @@ proc_with_prefix test_no_inf_display {} {
     # Now select inferior 1 and allow the inferior to run forward to the
     # point where a breakpoint location for foo will have been created.
     gdb_test "inferior 1" "Switching to inferior 1 .*"
-    gdb_breakpoint [gdb_get_line_number "Break after open"] temporary
+    gdb_breakpoint [gdb_get_line_number "Break after open"] -temporary
     gdb_continue_to_breakpoint \
        "move inferior 1 until a location has been added"
 
@@ -151,7 +151,7 @@ proc_with_prefix test_no_inf_display {} {
     # Continue inferior 1 until the shared library has been unloaded.  The
     # breakpoint on 'foo' will return to the pending state.  We will need to
     # 'continue' twice as the first time will hit the 'foo' breakpoint.
-    gdb_breakpoint [gdb_get_line_number "Break after close"] temporary
+    gdb_breakpoint [gdb_get_line_number "Break after close"] -temporary
     gdb_continue_to_breakpoint "hit the breakpoint in foo"
     gdb_continue_to_breakpoint "after close library"
 
@@ -195,7 +195,7 @@ proc_with_prefix test_pending_toggle { } {
             "\\s+breakpoint already hit 1 time"] \
        "check thread-specific breakpoint is no longer pending"
 
-    gdb_breakpoint [gdb_get_line_number "Break after close"] temporary
+    gdb_breakpoint [gdb_get_line_number "Break after close"] -temporary
     gdb_continue_to_breakpoint "close library"
     gdb_test "info breakpoints $bpnum" \
        [multi_line \
@@ -264,7 +264,7 @@ proc_with_prefix py_test_toggle_thread {} {
             "\\s+breakpoint already hit 1 time"] \
        "check thread-specific breakpoint has returned to pending"
 
-    gdb_breakpoint [gdb_get_line_number "Break after close"] temporary
+    gdb_breakpoint [gdb_get_line_number "Break after close"] -temporary
     gdb_continue_to_breakpoint "stop after close in inferior 2" \
        ".* Break after close\\. .*"
 
@@ -315,7 +315,7 @@ proc_with_prefix py_test_clear_thread {} {
             "\\s+breakpoint already hit 2 times"] \
        "check for a location only in inferior 2"
 
-    gdb_breakpoint [gdb_get_line_number "Break after close"] temporary
+    gdb_breakpoint [gdb_get_line_number "Break after close"] -temporary
     gdb_continue_to_breakpoint "stop after close in inferior 1" \
        ".* Break after close\\. .*"
 
index ba10f93d6236f9209b80bcb24000d0b71aff3bdf..a68ece0bdbbed0139b893ff24f8d7f796de9e4c8 100644 (file)
@@ -46,14 +46,14 @@ if {[support_displaced_stepping]} {
 #gdb_test_no_output "maintenance set show-debug-regs on"
 #gdb_test_no_output "set debug infrun 1"
 
-gdb_breakpoint main {temporary}
+gdb_breakpoint main -temporary
 gdb_test "run" "Temporary breakpoint.* main .*" "start to main inferior 1"
 
 gdb_test "add-inferior" "Added inferior 2 on connection .*" "add inferior 2"
 gdb_test "inferior 2" "witching to inferior 2 .*" "switch to inferior 2, first time"
 gdb_load $binfile
 
-gdb_breakpoint main {temporary}
+gdb_breakpoint main -temporary
 gdb_test "run" "Temporary breakpoint.* main .*" "start to main inferior 2"
 
 gdb_test "awatch c" \
index f45f61a607b70779bf69196d67c04de5d8971a61..c794aa659b3764413c7be06b96b2d8a998062706 100644 (file)
@@ -200,9 +200,9 @@ foreach_with_prefix cmd [list "break" "tbreak"] {
 
     # Assemble flags to pass to gdb_breakpoint.  Lame but this is just
     # a test suite!
-    set break_flags "message"
+    set break_flags "-message"
     if {[string match $cmd "tbreak"]} {
-       lappend break_flags "temporary"
+       lappend break_flags "-temporary"
     }
 
     # Insert breakpoints for all inline_func? and not_inline_func? and check
index 692d55eb0a21ab78738453598eaacdc5728dada2..8b19a11b1f6ecb2dbcca436634af4876c1948b85 100644 (file)
@@ -629,7 +629,7 @@ proc_with_prefix test_bkpt_address {} {
 
 proc_with_prefix test_bkpt_pending {} {
     delete_breakpoints
-    gdb_breakpoint "nosuchfunction" allow-pending
+    gdb_breakpoint "nosuchfunction" -allow-pending
     gdb_test "python print (gdb.breakpoints()\[0\].pending)" "True" \
        "Check pending status of pending breakpoint"
 }
index 35681cb178e785a6b965d68c12282821c0c3f90d..845be606db94f71d23fd08ac41f43a0c475a2ca3 100644 (file)
@@ -41,7 +41,7 @@ gdb_test_no_output "source ${pyfile}" "load python file"
 
 gdb_test "test-objfile-events" "Object file events registered."
 
-gdb_breakpoint "main" {temporary}
+gdb_breakpoint "main" -temporary
 
 gdb_test "run" ".*event type: new_objfile.*new objfile name.*" "new objfile notification"
 
index 703bc7d86019c4b801d64bfd9d09e7250b0317c0..131562da213b6cefbb8eec46f48373515304bf16 100644 (file)
@@ -128,7 +128,7 @@ with_test_prefix "no debug symbol" {
     }
 
     gdb_test "print do_nothing" "no debug info.*" "ensure that shared lib has no debug info"
-    gdb_breakpoint "do_nothing" {temporary}
+    gdb_breakpoint "do_nothing" -temporary
     gdb_test "continue" "Temporary breakpoint .*in \\.?do_nothing.*" \
        "continue to do_nothing"
 
index 96af034af1efc85b104f2d4775bb8490650a1c9c..8d43a1708212785f7a89091347e428be746077dc 100644 (file)
@@ -64,7 +64,7 @@ if {[supports_process_record]} {
 
 # Set breakpoint at call to function1 in main.
 set bp_LEP_test [gdb_get_line_number "CALL VIA LEP" $srcfile]
-gdb_breakpoint $srcfile:$bp_LEP_test temporary
+gdb_breakpoint $srcfile:$bp_LEP_test -temporary
 
 # Continue to break point at function1 call in main.
 gdb_continue_to_breakpoint \
@@ -93,7 +93,7 @@ gdb_test_no_output "record" "turn on process record for test2"
 ### TEST 2: reverse finish from the body of function1.
 
 # Set breakpoint at call to function1 in main.
-gdb_breakpoint $srcfile:$bp_LEP_test temporary
+gdb_breakpoint $srcfile:$bp_LEP_test -temporary
 
 # Continue to break point at function1 call in main.
 gdb_continue_to_breakpoint \
@@ -124,7 +124,7 @@ gdb_test_no_output "record" "turn on process record for test3"
 
 # Set breakpoint at call to funp in main.
 set bp_GEP_test  [gdb_get_line_number "CALL VIA GEP" $srcfile]
-gdb_breakpoint $srcfile:$bp_GEP_test temporary
+gdb_breakpoint $srcfile:$bp_GEP_test -temporary
 
 # Continue to break point at funp call in main.
 gdb_continue_to_breakpoint \
@@ -153,7 +153,7 @@ gdb_test_no_output "record" "turn on process record for test4"
 
 # Set breakpoint at call to funp in main.
 set bp_GEP_test  [gdb_get_line_number "CALL VIA GEP" $srcfile]
-gdb_breakpoint $srcfile:$bp_GEP_test temporary
+gdb_breakpoint $srcfile:$bp_GEP_test -temporary
 
 # Continue to break point at funp call in main.
 gdb_continue_to_breakpoint \
@@ -184,7 +184,7 @@ gdb_test_no_output "record" "turn on process record for test5"
 
 ### TEST 5: reverse finish from the body of function 1 when calling using the
 ### alternate entrypoint (GEP).
-gdb_breakpoint $srcfile:$bp_GEP_test temporary
+gdb_breakpoint $srcfile:$bp_GEP_test -temporary
 
 # Continue to break point at funp call.
 gdb_continue_to_breakpoint \
index 76febe312f583a6e2cb6288ec117b83e33979e03..b6f918a989bb486729763ca489aecb8bc1e59001 100644 (file)
@@ -46,7 +46,7 @@ proc run_tests {} {
        # Set breakpoint at the line after the function calls.
        set bp_start_reverse_test [gdb_get_line_number "START REVERSE TEST"]
 
-       gdb_breakpoint $bp_start_reverse_test temporary
+       gdb_breakpoint $bp_start_reverse_test -temporary
 
        # Continue to break point for reverse-next test.
        # Command definition:  reverse-next [count]
@@ -87,7 +87,7 @@ proc run_tests {} {
 
        # Test 2, reverse-step command
        # Set breakpoint at the line after the function calls.
-       gdb_breakpoint $bp_start_reverse_test temporary
+       gdb_breakpoint $bp_start_reverse_test -temporary
 
        # Continue to the start of the reverse-step test.
        # Command definition:  reverse-step [count]
index 2268f2c287221aba6ca90e4c3cf958af1f8c1535..9aef8f111dacf7bf375daeb91550aee5d8565e70 100644 (file)
@@ -105,8 +105,8 @@ proc test_one_memory {insn mem value {dynamic false} {prefix ""}} {
 proc record_full_function {function} {
     set end [gdb_get_line_number "end ${function}_test "]
     set start [gdb_get_line_number "start ${function}_test"]
-    gdb_breakpoint $start temporary
-    gdb_breakpoint $end temporary
+    gdb_breakpoint $start -temporary
+    gdb_breakpoint $end -temporary
     gdb_continue_to_breakpoint "start ${function}_test"
 
     if {[supports_process_record]} {
index d351555bfff50b5f305ab5aa88ab7113b9f871f5..aa85face8132b0c34d433cec3f5588ca54e2b151 100644 (file)
@@ -65,7 +65,7 @@ proc do_test { detach-on-fork follow-fork-mode fork_func } {
        gdb_test_no_output "set follow-fork-mode ${follow-fork-mode}"
 
        if { ${follow-fork-mode} == "parent" } {
-           runto break_here_execer allow-pending message
+           runto break_here_execer -allow-pending -message
            gdb_continue_to_end "continue parent to end" "continue" 1
 
            if { ${detach-on-fork} == "off" } {
@@ -73,7 +73,7 @@ proc do_test { detach-on-fork follow-fork-mode fork_func } {
                gdb_continue_to_end "continue child to end" "continue" 1
            }
        } elseif { ${follow-fork-mode} == "child" } {
-           runto break_here_execee allow-pending message
+           runto break_here_execee -allow-pending -message
            gdb_continue_to_end "continue child to end" "continue" 1
 
            if { ${detach-on-fork} == "off" } {
index 57dfac9fcece25c26008ac9500c830e5a3b295aa..ca104e1cb07cbed2a19e9f764872fb08eaca7a2f 100644 (file)
@@ -62,7 +62,7 @@ proc do_test { detach-on-fork follow-fork-mode fork_func } {
        gdb_test_no_output "set follow-fork-mode ${follow-fork-mode}"
 
        if { ${follow-fork-mode} == "parent" } {
-           runto break_here_execer allow-pending message
+           runto break_here_execer -allow-pending -message
            gdb_continue_to_end "continue parent to end" "continue" 1
 
            if { ${detach-on-fork} == "off" } {
@@ -70,7 +70,7 @@ proc do_test { detach-on-fork follow-fork-mode fork_func } {
                gdb_continue_to_end "continue child to end" "continue" 1
            }
        } elseif { ${follow-fork-mode} == "child" } {
-           runto break_here_execee allow-pending message
+           runto break_here_execee -allow-pending -message
            gdb_continue_to_end "continue child to end" "continue" 1
 
            if { ${detach-on-fork} == "off" } {
index a978eb7cf95f173da57a70725e0942e598c38fc8..f632ca3bd852db2741a8cd52b78ef9f5d8407a0d 100644 (file)
@@ -36,7 +36,7 @@ proc do_test {} {
 
     with_rocm_gpu_lock {
        gdb_breakpoint [gdb_get_line_number "Break here"]
-       gdb_breakpoint kern allow-pending
+       gdb_breakpoint kern -allow-pending
        gdb_breakpoint [gdb_get_line_number "Last break here"]
 
        # Run until we reach the first breakpoint where we can figure
index 9f8dac68047b2f882948772c440bbd70efdaaef1..15ab9a91e4ceb713bbefe412d0ced2704505001e 100644 (file)
@@ -35,7 +35,7 @@ proc do_test { } {
     gdb_load $::binfile
 
     with_rocm_gpu_lock {
-       if {![runto kernel allow-pending qualified]} {
+       if {![runto kernel -allow-pending -qualified]} {
            fail "can't run to main"
            return
        }
index 711060567643869a179f664b170104acc609f7be..fc6993e7d7b7a822ad88118a0930515597579b86 100644 (file)
@@ -63,7 +63,7 @@ proc do_test { } {
        # Get to the beginning of the GPU kernel without precise memory enabled.
        with_test_prefix "goto gpu code" {
            gdb_test_no_output "set amdgpu precise-memory off"
-           gdb_breakpoint "kernel" allow-pending
+           gdb_breakpoint "kernel" -allow-pending
            gdb_test "continue" "Thread ${::decimal}.* hit Breakpoint .*"
            gdb_test_no_output "set amdgpu precise-memory on"
        }
index ea88c1269b72d11c0d0caf3accb09b4d9478f2f3..2ae0e044a53681d629f401c683c28c5ae7e84934 100644 (file)
@@ -53,7 +53,7 @@ proc do_test {precise_memory has_xfail} {
     gdb_load $::binfile
 
     with_rocm_gpu_lock {
-       if {![runto [gdb_get_line_number "Break here."] allow-pending]} {
+       if {![runto [gdb_get_line_number "Break here."] -allow-pending]} {
            return
        }
 
index cd4b9c68f58abf53acad63aa99b2999bf823ff53..8d19b0dcba2c882dbbf3e2acc495611229b5cd9d 100644 (file)
@@ -118,7 +118,7 @@ proc_with_prefix test_watchpoint_inside_kernel {} {
            return
        }
 
-       gdb_breakpoint "kernel" allow-pending temporary
+       gdb_breakpoint "kernel" -allow-pending -temporary
        gdb_test "continue" \
            "hit Temporary breakpoint.*, kernel .*" \
            "continue to kernel"
index 4406b75b71b1033e682eca85d328db32819ca0e1..ab2957d63d3b3d499c31d326669c0c485f805b10 100644 (file)
@@ -85,8 +85,8 @@ foreach mod {mod1::inner::innest mod1::inner mod1 {}} {
     if {$mod != ""} {
        append mod ::
     }
-    gdb_breakpoint modules::${mod}f2 message
-    gdb_breakpoint "*::${mod}f2" message
+    gdb_breakpoint modules::${mod}f2 -message
+    gdb_breakpoint "*::${mod}f2" -message
 }
 
 gdb_test "print ::TWENTY_THREE" " = 23"
index c318b38b472a80552628d82edda414d78d986b86..92fe07437dd39867be412ca6679e571e3b94de4c 100644 (file)
@@ -56,7 +56,7 @@ gdb_continue_to_breakpoint "first breakpt call"
 gdb_test "info threads" "\r\n\\s+2\\s+\[^\r\n\]+"
 
 # Create a pending, thread-specific, breakpoint on 'foo'.
-gdb_breakpoint "foo thread 2" allow-pending
+gdb_breakpoint "foo thread 2" -allow-pending
 set bpnum [get_integer_valueof "\$bpnum" "*INVALID*" \
               "get breakpoint number"]
 
index e394edf53ea77d1a991cb00aebf45744984ca88d..edc15f25b0648f64b7fa298f2bebe2b1deeaa8d3 100644 (file)
@@ -127,7 +127,7 @@ proc detach_and_expect_exit {inf_output_re test} {
 # Run to _exit in the child.
 
 proc continue_to_exit_bp {} {
-    gdb_breakpoint "_exit" temporary
+    gdb_breakpoint "_exit" -temporary
     return [gdb_continue_to_breakpoint "_exit" ".*_exit.*"]
 }
 
@@ -254,7 +254,7 @@ proc test_detach_watch {wp multi_process cmd} {
            gdb_test_no_output "set detach-on-fork off"
            gdb_test_no_output "set follow-fork-mode child"
 
-           gdb_breakpoint "child_function" temporary
+           gdb_breakpoint "child_function" -temporary
            gdb_continue_to_breakpoint "child_function" ".*"
        }
 
index 113f49779f6e0b91d91e455bd50fd41a509e256a..9dc2be66a77d53a8f2f61b8e66cd929f30d70286 100644 (file)
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
 }
 
 proc test_actions_changed { } {
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "trace subr" "Tracepoint .*" \
        "tracepoint at subr"
index 2cbe222455bb4d910b6012298960a7d6206fe0fe..bdfe1215de6361804052c3425813fb34036a11e2 100644 (file)
@@ -146,7 +146,7 @@ gdb_trace_setactions "8.6: setup TP to collect stack mem cast expr" \
 
 gdb_test_no_output "tstart" ""
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
index d9ac46542005d739c0d6165ba14f969b1a49b4af..e96000f2e24713a9290c7399770c21f476cc434c 100644 (file)
@@ -66,7 +66,7 @@ proc run_trace_experiment { } {
     global decimal
 
     setup_tracepoints
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
     gdb_test "tstart" "\[\r\n\]*" "start trace experiment"
     gdb_test "continue" "Continuing.*Breakpoint ${::decimal}, end.*" \
        "run to end"
@@ -187,7 +187,7 @@ set frame_size -1
 with_test_prefix "frame size" {
     set_a_tracepoint func0
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "tstart" "\[\r\n\]*" "start trace"
 
index fdb5a7a8ed36e8f666b7ccb0c8c1c585b3036ee0..0fbc9de24c274f8714bdec1e298b1536daa42160 100644 (file)
@@ -62,8 +62,8 @@ proc prepare_for_trace_test {} {
 
     runto_main
 
-    gdb_breakpoint "begin" qualified
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "begin" -qualified
+    gdb_breakpoint "end" -qualified
 }
 
 proc run_trace_experiment { test_func } {
index 729a9d3179a9afb1d97bafc4f73221d46936ec0a..8202520b48218d92e60642aa38e1ddad532e9b3d 100644 (file)
@@ -60,7 +60,7 @@ proc disconnected_tracing {  } {
        gdb_test "trace start" ".*"
        gdb_trace_setactions "collect on tracepoint 2" "2" \
            "collect foo" "^$"
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
 
        gdb_test_no_output "tstart"
 
@@ -122,7 +122,7 @@ proc disconnected_tfind {  } {
        gdb_test "trace start" ".*"
        gdb_test_no_output "tstart"
 
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
        gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*"
        gdb_test_no_output "tstop"
 
index 6ca3ceb57ad75fbeb572a597cdc86205833d7213..a05bb793aea85a9c2190dc2614eb74beaca1b156 100644 (file)
@@ -68,8 +68,8 @@ if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 }
     return 1
 }
 
-gdb_breakpoint "end" qualified
-gdb_breakpoint "fail" qualified
+gdb_breakpoint "end" -qualified
+gdb_breakpoint "fail" -qualified
 
 gdb_test "ftrace set_point" "Fast tracepoint .*" \
     "fast tracepoint at a long insn"
index bcc1c311b65bff54b2d8cc274f46c1d3a3896407..3ceb6f88058c27553883509900cc71c049cc10de 100644 (file)
@@ -107,9 +107,9 @@ proc test_fast_tracepoints {} {
 
     set fourgood 0
 
-    gdb_breakpoint "begin" qualified
+    gdb_breakpoint "begin" -qualified
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "print gdb_agent_gdb_trampoline_buffer_error" ".*" ""
 
index 90e75b8176094ecfae594653ac4a46b603fc85e0..034411636dcee561d7ad091a3f50bede63c4ec3a 100644 (file)
@@ -107,7 +107,7 @@ if {![gdb_target_supports_trace]} {
     return 1
 }
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test_no_output "tstart"
 gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" \
     "continue to end"
index 73b3a402a31d68c894141be27dca36ad75bfaabe..ff9ae26fb89113f16e7383893eecada2e41806a6 100644 (file)
@@ -58,7 +58,7 @@ gdb_trace_setactions "setup collect actions" \
        "end" ""
 
 gdb_test_no_output "tstart" "survive the long packet send"
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
index b1270f3a4acc729b0fd9f2f5696eb95111b29aee..32fa58166f07e86cecb1e49926e23f9f585c1ccd 100644 (file)
@@ -82,7 +82,7 @@ gdb_test "passcount 3 $tdp4" "Setting tracepoint $tdp4's passcount to 3" \
 
 gdb_test "tstart" ".*" ""
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
index c4bf6ac981d984f58a9519fb0b98035922b1835a..ae64738392230737970e82185191654bf8daf2c8 100644 (file)
@@ -45,7 +45,7 @@ if {![gdb_target_supports_trace]} {
 # frame (IOW, returns while tfind mode is active).
 proc prepare_for_trace_disassembly { } {
     global gdb_prompt
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "trace subr" "Tracepoint .*" \
        "tracepoint at subr"
index 352516cebe8624cc9be9a13be9c133cc676a9d89..7d9b1c15d6427bb2414e4230a5b22ab39bcda765 100644 (file)
@@ -40,7 +40,7 @@ proc set_tracepoint_and_collect { } {
     if {![runto_main]} {
        return -1
     }
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
     gdb_test "trace start" "Tracepoint \[0-9\] at .*"
     gdb_trace_setactions "set action for tracepoint"  "" \
        "collect testglob" "^$" \
index c67634e4ce76d0e2ca68409e529521b8930989b2..32d7a9fb3ae641b4470d10f31865a423b6322139 100644 (file)
@@ -154,7 +154,7 @@ gdb_trace_setactions "9.x: setup TP to collect expressions" \
 
 gdb_test "tstart" ".*" ""
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
index 1d9000d360ddb90eec88d0fef1ec8af0d1e5ab40..dd3958d7ffd260d78ffca4bf0178b4e5833909c4 100644 (file)
@@ -66,7 +66,7 @@ if {![runto_main]} {
     return -1
 }
 
-gdb_breakpoint "kill" qualified
+gdb_breakpoint "kill" -qualified
 gdb_test "handle SIGABRT nostop noprint pass" ".*" "pass SIGABRT"
 
 # Hit the breakpoint on $syscall for the first time.  In this time,
@@ -119,7 +119,7 @@ gdb_test_multiple $test $test {
 }
 
 delete_breakpoints
-gdb_breakpoint "start" qualified
+gdb_breakpoint "start" -qualified
 gdb_continue_to_breakpoint "continue to start"
 
 with_test_prefix "counter is zero" {
@@ -137,7 +137,7 @@ set tpnum [get_integer_valueof "\$bpnum" 0]
 gdb_test "trace *$syscall_insn_next" "Tracepoint $decimal at .*" \
     "tracepoint on instruction following syscall instruction"
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 
 gdb_test_no_output "tstart"
 gdb_test "continue" ".*Breakpoint.* end .*at.*$srcfile.*" \
index 5206bf4dc5f0833af3ee85cf1d0173bc1c178ece..e41ca4555aa6772d77554bcaa438c624346cd851 100644 (file)
@@ -50,7 +50,7 @@ proc test_tstart_tstop_tstart { } {
        gdb_test_no_output "tstart" \
            "first tstart"
 
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
        gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" \
            "continue to end"
 
@@ -107,7 +107,7 @@ proc test_buffer_full_tstart { } {
 
        gdb_test_no_output "tstart" \
            "first tstart"
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
        gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" "continue to end"
 
        gdb_test "tstatus" ".*buffer was full.*"
index b6fa8632bfe09e9a8a67c0df1e568c816c3babec..b596968ce7ffa33be357c997098dac01e218fb64 100644 (file)
@@ -178,7 +178,7 @@ proc strace_probe_marker { } {
        gdb_test "info static-tracepoint-markers" \
            "ust/bar\[\t \]+y\[\t \]+$hex .*ust/bar2\[\t \]+y\[\t \]+$hex.*"
 
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
 
        gdb_test_no_output "tstart"
        gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" \
@@ -266,7 +266,7 @@ proc strace_trace_on_same_addr { type } {
            }
        }
 
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
 
        if {[string equal $type "break"]} {
            gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" \
@@ -341,7 +341,7 @@ proc strace_trace_on_diff_addr { } {
        gdb_test "trace *${marker_bar2_addr}" \
            "Tracepoint ${::decimal} at ${hex}: file.*"
 
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
 
        gdb_test_no_output "tstart"
        gdb_test "continue" "Continuing\\.\[ \r\n\]+Breakpoint.*" \
index eadc02f323aba0d9359936bc7389bbbdcaa0382f..5cf4122c017a1d0b449f52e6014f320e8e3832a9 100644 (file)
@@ -123,7 +123,7 @@ if {$return_me == 1} {
 # test tstatus (when trace on)
 gdb_test "tstatus" "\[Tt\]race is running.*" "test tstatus on"
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
index c5dd088ef74190ef32cb070f9ee63dad9dda3af0..27df24b70947be447596cc217a6252915e308f47 100644 (file)
@@ -53,9 +53,9 @@ proc break_trace_same_addr_1 { trace_type option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
-    gdb_breakpoint "set_point" qualified
+    gdb_breakpoint "set_point" -qualified
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
 
     gdb_test_no_output "tstart"
@@ -87,7 +87,7 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "${trace_type1} set_point" \
        "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
@@ -124,10 +124,10 @@ proc break_trace_same_addr_3 { trace_type option } \
     }
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
-    gdb_breakpoint "marker" qualified
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "marker" -qualified
+    gdb_breakpoint "end" -qualified
 
-    gdb_breakpoint "set_point" qualified
+    gdb_breakpoint "set_point" -qualified
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
 
     gdb_test_no_output "tstart"
@@ -161,10 +161,10 @@ proc break_trace_same_addr_4 { trace_type option } \
     }
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
-    gdb_breakpoint "marker" qualified
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "marker" -qualified
+    gdb_breakpoint "end" -qualified
 
-    gdb_breakpoint "set_point" qualified
+    gdb_breakpoint "set_point" -qualified
     gdb_test "${trace_type} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
 
     gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
@@ -203,8 +203,8 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
        return -1
     }
 
-    gdb_breakpoint "marker" qualified
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "marker" -qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "${trace1} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
        "${trace1} set_point 1"
@@ -276,8 +276,8 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
        return -1
     }
 
-    gdb_breakpoint "marker" qualified
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "marker" -qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
        "continue to marker"
index 55bea4439e77d6a41d8442057de3c67d617d32b0..7eb5df7ab7cfad9fac3ae6a15ffb2afa43a2a7bd 100644 (file)
@@ -73,9 +73,9 @@ proc test_tracepoints { trace_command condition num_frames { kfail_proc 0 } } {
        return 0
     }
 
-    gdb_breakpoint "begin" qualified
+    gdb_breakpoint "begin" -qualified
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     with_test_prefix "${trace_command}: ${condition}" {
 
index 9315508f4f3ae37a28d06e93d12706394b2c5068..90dd5284adc2994ea803d37e436dfe83dd3bf9bb 100644 (file)
@@ -76,7 +76,7 @@ proc break_trace_same_addr { testfile trace_type option } \
 
     gdb_test_no_output "set breakpoint always-inserted ${option}"
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "break set_point1" "Breakpoint \[0-9\] at $hex: file.*"
     gdb_test "${trace_type} set_point1" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*"
index f8bc72e8cfc9ef050eb68a9791a1d02a8a627a41..9ee56d490b15e7c6202cf5f2c71a287808617f55 100644 (file)
@@ -120,9 +120,9 @@ proc run_trace_experiment {} {
 proc test_tracepoints {} {
     global gdb_prompt
 
-    gdb_breakpoint "begin" qualified
+    gdb_breakpoint "begin" -qualified
 
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "end" -qualified
 
     gdb_test "trace gdb_c_test" "Tracepoint .*" \
        "tracepoint at gdb_c_test"
index 78527e2c7676a66502e095ac06a203325295d930..b1b706735e7ad71aa6b5859f0c53f422cafdc5d2 100644 (file)
@@ -135,7 +135,7 @@ gdb_test "print \$tvar5" " = 15" \
     "Print a trace state variable at start of run"
 
 # Be sure not to fall off the end of the program.
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 gdb_test "continue" \
     "Continuing.*Breakpoint $decimal, end.*" \
     "run trace experiment"
index 39b71b358775c2b5b6b1765395993f2ab02e6004..1a118c920dac4f9dc5a8a053df5136d8d2273a15 100644 (file)
@@ -303,7 +303,7 @@ if {![gdb_target_supports_trace]} {
     return -1
 }
 
-gdb_breakpoint "end" qualified
+gdb_breakpoint "end" -qualified
 
 with_test_prefix "tracing foo" {
     gdb_test "trace *foo_start_lbl" ".*"
index 6cafa111e558aa0205bb46a5929c5da60954a041..cd652affc0fd59c8463d3c5d0734ac8d8c82ea0d 100644 (file)
@@ -59,8 +59,8 @@ proc prepare_for_trace_test {} {
 
     runto_main
 
-    gdb_breakpoint "begin" qualified
-    gdb_breakpoint "end" qualified
+    gdb_breakpoint "begin" -qualified
+    gdb_breakpoint "end" -qualified
 }
 
 proc run_trace_experiment { test_func } {
index eba431af42536c0f7497ddebc4b1f98e56e7e7b7..8b7472cfcf44295d51b0a0d01997dc41b1cc941d 100644 (file)
@@ -66,7 +66,7 @@ proc test_while_stepping { while_stepping } {
 
        gdb_test "tstart" ".*"
 
-       gdb_breakpoint "end" qualified
+       gdb_breakpoint "end" -qualified
        gdb_test "continue" \
            "Continuing.*Breakpoint $decimal, end.*" \
            "run trace experiment"
index 7b1feeaac84b6054f13b96f55717a2a8eb796f98..31bb1c0fe59f5e643228e5dfb63778d17bfb1673 100644 (file)
@@ -725,44 +725,58 @@ proc gdb_starti_cmd { {inferior_args {}} } {
 # Set a breakpoint using LINESPEC.
 #
 # If there is an additional argument it is a list of options; the supported
-# options are allow-pending, temporary, message, no-message and qualified.
+# options are -allow-pending, -temporary, -message, -no-message and -qualified.
 #
 # The result is 1 for success, 0 for failure.
 #
 # Note: The handling of message vs no-message is messed up, but it's based
 # on historical usage.  By default this function does not print passes,
 # only fails.
-# no-message: turns off printing of fails (and passes, but they're already off)
-# message: turns on printing of passes (and fails, but they're already on)
+# -no-message: turns off printing of fails (and passes, but they're already off)
+# -message: turns on printing of passes (and fails, but they're already on)
 
 proc gdb_breakpoint { linespec args } {
     global gdb_prompt
     global decimal
 
+    parse_args {
+       {allow-pending}
+       {temporary}
+       {qualified}
+       {message}
+       {no-message}
+    }
+
     set pending_response n
-    if {[lsearch -exact $args allow-pending] != -1} {
+
+    if {${allow-pending}} {
        set pending_response y
     }
 
     set break_command "break"
     set break_message "Breakpoint"
-    if {[lsearch -exact $args temporary] != -1} {
+
+    if {$temporary} {
        set break_command "tbreak"
        set break_message "Temporary breakpoint"
     }
 
-    if {[lsearch -exact $args qualified] != -1} {
+    if {$qualified} {
        append break_command " -qualified"
     }
 
+    if {$message && ${no-message}} {
+       error "gdb_breakpoint: -message and -no-message are mutually exclusive"
+    }
+
     set print_pass 0
     set print_fail 1
-    set no_message_loc [lsearch -exact $args no-message]
-    set message_loc [lsearch -exact $args message]
-    # The last one to appear in args wins.
-    if { $no_message_loc > $message_loc } {
+
+    if {${no-message}} {
        set print_fail 0
-    } elseif { $message_loc > $no_message_loc } {
+    }
+
+    if {$message} {
        set print_pass 1
     }
 
@@ -804,12 +818,12 @@ proc gdb_breakpoint { linespec args } {
 # single quoted C++ function specifier.
 #
 # If there are additional arguments, pass them to gdb_breakpoint.
-# We recognize no-message/message ourselves as well as no-delete-brekpoints.
+# We recognize -no-message/-message ourselves as well as -no-delete-breakpoints.
 #
-# no-message is messed up here, like gdb_breakpoint: to preserve
+# -no-message is messed up here, like gdb_breakpoint: to preserve
 # historical usage fails are always printed by default.
-# no-message: turns off printing of fails (and passes, but they're already off)
-# message: turns on printing of passes (and fails, but they're already on)
+# -no-message: turns off printing of fails (and passes, but they're already off)
+# -message: turns on printing of passes (and fails, but they're already on)
 #
 # The 'no-delete-brekpoints' option stops this proc from deleting all
 # breakpoints.
@@ -819,24 +833,41 @@ proc runto { linespec args } {
     global bkptno_numopt_re
     global decimal
 
-    if {[lsearch -exact $args no-delete-breakpoints] == -1} {
+    # Parse our own option only, forward the rest to gdb_breakpoint.
+    parse_some_args {
+       {no-delete-breakpoints}
+       {message}
+       {no-message}
+    }
+
+    if {!${no-delete-breakpoints}} {
        delete_breakpoints
     }
 
+    if {$message && ${no-message}} {
+       error "runto: -message and -no-message are mutually exclusive"
+    }
+
     set print_pass 0
     set print_fail 1
-    set no_message_loc [lsearch -exact $args no-message]
-    set message_loc [lsearch -exact $args message]
-    # The last one to appear in args wins.
-    if { $no_message_loc > $message_loc } {
+
+    # Re-insert -message or -no-message into the args we pass to gdb_breakpoint,
+    # since it uses them as well.
+    set gdb_breakpoint_args $args
+
+    if {${no-message}} {
        set print_fail 0
-    } elseif { $message_loc > $no_message_loc } {
+       lappend gdb_breakpoint_args -no-message
+    }
+
+    if {$message} {
        set print_pass 1
+       lappend gdb_breakpoint_args -message
     }
 
     set test_name "runto: run to $linespec"
 
-    if {![gdb_breakpoint $linespec {*}$args]} {
+    if {![gdb_breakpoint $linespec {*}$gdb_breakpoint_args]} {
        return 0
     }
 
@@ -902,7 +933,7 @@ proc runto { linespec args } {
 # you don't want that then pass the 'no-delete-breakpoints' argument.
 
 proc runto_main { args } {
-    return [runto main qualified {*}$args]
+    return [runto main -qualified {*}$args]
 }
 
 ### Continue, and expect to hit a breakpoint.
index ad31897737a4eea0ee5f9239783a1febda6a1514..8d402288c51b95e8060bac2a773a11f6cbdddf11 100644 (file)
@@ -142,7 +142,7 @@ proc _selftest_setup { } {
 
     # Set a breakpoint at main
     set function main
-    if { [gdb_breakpoint $function "no-message"] != 1 } {
+    if { [gdb_breakpoint $function -no-message] != 1 } {
        untested "Cannot set breakpoint at $function, skipping testcase."
        return -2
     }