[7/7] gdb/testsuite: fix gdb.rocm/code-object-load-while-breakpoint-hit.exp with native-gdbserver

Message ID 20260506202804.1681886-8-simon.marchi@polymtl.ca
State New
Headers
Series gdb/testsuite: allow passing inferior arguments with native-gdbserver board |

Commit Message

Simon Marchi May 6, 2026, 8:27 p.m. UTC
  From: Simon Marchi <simon.marchi@polymtl.ca>

ROCm tests don't work under the native-gdbserver board, but switch it to
use the new -inferior-args option anyway, to give the good example.

Change-Id: I684cd5e4328e033072735d5feca8037ca77b57c1
---
 .../gdb.rocm/code-object-load-while-breakpoint-hit.exp         | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.rocm/code-object-load-while-breakpoint-hit.exp b/gdb/testsuite/gdb.rocm/code-object-load-while-breakpoint-hit.exp
index f9120a9cad03..c06038863837 100644
--- a/gdb/testsuite/gdb.rocm/code-object-load-while-breakpoint-hit.exp
+++ b/gdb/testsuite/gdb.rocm/code-object-load-while-breakpoint-hit.exp
@@ -55,9 +55,8 @@  proc do_test { } {
     with_rocm_gpu_lock {
 	clean_restart
 	gdb_load $::binfile
-	gdb_test_no_output "set args $::hipmodule_path" "set args"
 
-	if { ![runto_main] } {
+	if { ![runto_main -inferior-args $::hipmodule_path] } {
 		return
 	}