On 04/11/2016 08:14 PM, Simon Marchi wrote:
On 16-04-11 02:40 PM, Pedro Alves wrote:
On 04/06/2016 04:15 AM, Simon Marchi wrote:
OOC, don't we need the "global" declarations as
in native-extended-gdbserver.exp?
Apparently not, since it works :)
:-)
I'm not familiar enough with TCL to know that. Are we executing in
the body
of a procedure at this point? This file is sourced from some proc in
DejaGnu,
so I'd say yes, but this example may suggest otherwise.
Hmm, that's probably search_and_load_file, which does
"uplevel #0 source ...", meaning top-level global variables are visible
in the sourced file.
You're probably already thinking of doing this, but I'll state it
explicitly anyway: it'd be nice to move this isremote frobbing to
a shared .exp file, so that boards that need it can just
source the file.
I wasn't, but it's a good idea. isremote is also handled in an
unintuitive way,
since the testsuite only checks if it's defined. So when you set
isremote to 0,
it's still considered as "true".
Hmm, that sounds like a bug. If that were generally true, then
native-gdbserver.exp's isremote hacks in ${board}_spawn /
${board}_exec
wouldn't work? Where are you seeing that?
Thanks,
Pedro Alves