dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isremote and unix board special handling question


From: Pedro Alves
Subject: Re: isremote and unix board special handling question
Date: Thu, 29 Nov 2018 22:59:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 11/28/2018 02:27 AM, Ben Elliston wrote:
> On Tue, Nov 27, 2018 at 06:53:17PM -0600, Jacob Bachmeyer wrote:
> 
>> As we see, set_board_info only works if the specified /entry/ has not
>> already been defined.
> 
> That is consistent with the manual:
> 
>   @node set_board_info procedure, [...]
>   This checks if @code{board_info} array's field @emph{entry} has been
>   set already and if not, then sets it to @emph{value}.
> 
> Rob, I never understood why this was so. Why not just override board
> settings? Perhaps that explains why I have seen DejaGnu baseboard
> definitions that modify the board_info array directly rather than go
> via proc set_board_info.

Yeah, GDB does in its internal board files.  Non-remote boards source
a file with this:

~~~~~
  16 # By default, DejaGnu makes the board remote unless the board name
  17 # matches localhost.  Sourcing this script from a board file forces
  18 # the board to be NOT remote.
  19 
  20 global board
  21 global board_info
  22 # Remove any target variant specifications from the name.
  23 set baseboard [lindex [split $board "/"] 0]
  24 set board_info($baseboard,isremote) 0
~~~~~

That's from:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/testsuite/boards/local-board.exp;h=df9e5bf588d13b6fe535439e51c6f5fd1ed231fb;hb=HEAD

Thanks,
Pedro Alves



reply via email to

[Prev in Thread] Current Thread [Next in Thread]