On 6/4/19 5:22 PM, Christophe Lyon wrote:
> Hi,
> 
> I've been debugging a problem where we clear "isremote" with:
> unset_board_info isremote
> set_board_info isremote 0
> but this isn't taken into account correctly by is_remote (in
> framework.exp), when we use target variants, because is_remote removes
> the target variant specifications.
> 
> For instance, if we use --target-board=qemu, everything works well,
> but if we use --target-board=qemu/-mcpu=XXX, then:
> ==========
> unset_board_info isremote
> set_board_info isremote 0
> ==========
> clear the "isremote" flag for board=="qemu/-mcpu=XXX", but subsequent
> calls to is_remote actually check the isremote flagfor board=="qemu"
> (after removing the part after the "/")
> 
> Is that a bug in is_remote, or is there a clean way of setting "isremote"?

Here's how GDB works around this:

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/testsuite/boards/local-board.exp;h=6e0448c58a94afc87e23c33359593a89fecd76fe;hb=HEAD#l20

  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

Thanks,
Pedro Alves

_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu

Reply via email to