]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use the .py file in gdb.dap/pause.exp
authorTom Tromey <tromey@adacore.com>
Fri, 16 Feb 2024 17:39:46 +0000 (10:39 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 27 Feb 2024 16:46:31 +0000 (09:46 -0700)
Tom de Vries pointed out that the gdb.dap/pause.exp test writes a
Python file but then does not use it.  This patch corrects the
oversight.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31354
Reviewed-By: Tom de Vries <tdevries@suse.de>
gdb/testsuite/gdb.dap/pause.exp

index 4d13dadd3ad157e60de0779a1fcc9bf036acfd13..9038d0f037fcc7fa16fc25b79a1f5fbd3a86c780 100644 (file)
@@ -134,7 +134,7 @@ dap_read_response cancel $cancel_id
 # does not continue the inferior) can be canceled.
 #
 
-write_file py "while True:\n  pass"
+set gdbfile [write_file py "while True:\n  pass"]
 set cont_id [dap_send_request evaluate \
                 [format {o expression [s "source %s"] context [s repl]} \
                      $gdbfile]]