[PATCH] Make native gdbserver boards no longer be "remote" (in DejaGnu terms)

Simon Marchi simon.marchi@ericsson.com
Mon Oct 16 18:58:00 GMT 2017


On 2017-10-16 02:35 PM, Pedro Alves wrote:
> This commit finally clears the "isremote" flag in the native-gdbserver
> and native-stdio-gdbserver boards.  The goal is to make all "native"
> boards be considered not remote in DejaGnu terms, like the
> native-extended-gdbserver board is too.
> 
> DejaGnu automatically considers boards remote if their names don't
> match the local hostname.  That means that native-gdbserver and
> native-extended-gdbserver are considered remote by default by DejaGnu,
> even though they run locally.  native-extended-gdbserver, however,
> overrides its isremote flag to force it to be not remote.  So we are
> in that weird state where native-gdbserver is considered remote, and
> native-extended-gdbserver is considered not remote.
> 
> A recent set of commits fixed all the problems (and some more) exposed
> by testing with --target_board=native-gdbserver and
> --target_board=native-stdio-gdbserver with isremote forced off on
> x86-64 GNU/Linux.  I believe we're good to go now.
> 
> The native-stdio-gdbserver.exp/remote-stdio-gdbserver.exp boards
> required deep non-obvious modifications unfortunately...  The problem
> is that if a board is not remote, then DejaGnu doesn't call
> ${board}_spawn / ${board}_exec at all, and the
> native-stdio-gdbserver.exp board relies on those procedures being
> called.  To fix that, this commit redesigns how the stdio boards hook
> into the testing framework to spawn gdbserver.  IMO, this is a good
> change anyway, because the way its done currently is a bit of a hack,
> and the result turns out to be simpler, even.  With this commit, they
> now no longer load the "gdbserver" generic config, and hook at the
> mi_gdb_target_load/gdb_reload level instead, making them more like
> traditional board files.
> 
> To share code between native-stdio-gdbserver.exp and
> remote-stdio-gdbserver.exp, a new shared stdio-gdbserver-base.exp file
> is created.
> 
> Instead of having each native board clear isremote manually, boards
> source the new "local-base.exp" file.
> 
> Simon, I've migrated the text you had in the commit log of your
> version of this change to the testsuite/README file, so that we can
> refer to it.  WDYT?

That looks fine to me.  Good idea to put that in the README, it will be
easier to refer people to it.  I didn't test remote-stdio-gdbserver though,
but I did test native-stdio-gdbserver.

Thanks for doing this!

Simon



More information about the Gdb-patches mailing list