* [PATCH] Clear board_info entry in kill_wait_spawned_process
@ 2024-03-14 17:56 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-03-14 17:56 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
When certain DAP tests are run in a certain order, dejagnu will throw
an exception during shutdown. After adding many logging statements, I
tracked this down to kill_wait_spawned_process not clearing the
'fileid' board_info entry, causing dejagnu to try to wait for the
process a second time -- and fail.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31435
---
gdb/testsuite/lib/gdb.exp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index fe4ac7d2719..48c241ad178 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6194,6 +6194,11 @@ proc kill_wait_spawned_process { proc_spawn_id } {
# wait for the PID in the background. That's fine because we
# don't care about the exit status. */
wait -nowait -i $proc_spawn_id
+
+ # Don't let dejagnu try to clean this up, either.
+ global board_info
+ set name [board_info target name]
+ unset -nocomplain board_info($name,fileid)
}
# Returns the process id corresponding to the given spawn id.
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-14 17:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 17:56 [PATCH] Clear board_info entry in kill_wait_spawned_process Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox