[PATCH v8 6/6] gdb/infrun: handle already-exited threads when attempting to stop

Aktemur, Tankut Baris tankut.baris.aktemur@intel.com
Thu May 14 18:54:57 GMT 2020


On Thursday, May 14, 2020 8:00 PM, Tom de Vries wrote:
> On 13-05-2020 22:53, Pedro Alves via Gdb-patches wrote:
> > +	set testpid($num) [get_integer_valueof "pid" -1]
> 
> I'm running into:
> ...
> ERROR: tcl error sourcing
> /data/gdb_versions/devel/src/gdb/testsuite/gdb.multi/multi-kill.exp.
> ERROR: can't set "testpid(1)": variable isn't array
>     while executing
> "set testpid($num) [get_integer_valueof "pid" -1]"

I'm not able to reproduce this problem.  The test runs fine on my system
with 58 expected passes and no failures.  Could it be related to the tcl
version?

As a rough guess, could you try the patch below to initialize the array
variable?

diff --git a/gdb/testsuite/gdb.multi/multi-kill.exp b/gdb/testsuite/gdb.multi/multi-kill.exp
index ce6075045fc..a21f8a78b0d 100644
--- a/gdb/testsuite/gdb.multi/multi-kill.exp
+++ b/gdb/testsuite/gdb.multi/multi-kill.exp
@@ -70,6 +70,7 @@ proc start_inferior {num} {
 # Sufficient inferiors to make sure that at least some other inferior
 # is killed while we're handling a killed event.
 set NUM_INFS 10
+array set testpid {}

 for {set i 1} {$i <= $NUM_INFS} {incr i} {
     if {[start_inferior $i] < 0} {


Thanks,
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Gdb-patches mailing list