This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] native-gdbserver: Clear isremote flag in board info
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org
- Date: Mon, 11 Apr 2016 22:29:03 +0100
- Subject: Re: [PATCH 1/4] native-gdbserver: Clear isremote flag in board info
- Authentication-results: sourceware.org; auth=none
- References: <1459912543-15328-1-git-send-email-simon dot marchi at polymtl dot ca> <570BEF8B dot 70203 at redhat dot com> <570BF79F dot 2070409 at ericsson dot com>
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