This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4] testsuite: Add option to capture gdbserver debug
(Patches 1 to 3 pushed).
> On 16 Apr 2019, at 20:49, Tom Tromey <tom@tromey.com> wrote:
>
>>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:
>
> Alan> Add board option which enables gdbserver debug and sends it to the
> Alan> file gdbserver.log, located in the output directory for the current
> Alan> test. Document this.
>
> Alan> Add debug versions of the native gdbserver board files.
>
> Alan> Disable tspeed.exp when debugging to prevent the log file filling
> Alan> many gigabytes then timing out.
>
> Thanks.
>
> Alan> +gdbserver,debug
> Alan> +
> Alan> + When set gdbserver debug is outputed to the file gdbserver.log in the test
>
> I think it should say "is sent" rather than "is outputed”.
Done.
> Alan> diff --git a/gdb/testsuite/boards/native-extended-gdbserver-debug.exp b/gdb/testsuite/boards/native-extended-gdbserver-debug.exp
>
> I wonder if a new board is needed for this?
> Could it be done some other way, like a command-line setting?
Agreed, it’s a little awkward. I’ve been playing round with an alternative
implementation and have added it an environment variable (in addition to the
board setting).
So, now you can do:
make check GDBSERVER_DEBUG=all
Which is much nicer. However, see final comment.
>
> TBH I'm not sure what the typical approach is for something like this.
>
> Alan> if {![info exists gdbserver_reconnect_p] || !$gdbserver_reconnect_p} {
> Alan> # GDB client could accidentally connect to a stale server.
> Alan> - # append gdbserver_command " --debug --once"
> Alan> append gdbserver_command " --once"
>
> Was this intentional?
Yes, I removed this commented out line. I suspect it was there so that you could
quickly switch over to using "—debug". With my changes you shouldn’t need it.
>
>
> One random thought I had about this series is that it would be nice to
> have a way to get "set remotelogfile" output in the test directory.
> That way a failing test could be re-run with gdbreplay without much
> trouble.
Yes, I think it’d be possible using a similar approach. You’d end up with another
environment variable, REPLAY_LOG=1 or something. My only concern is that it’s
starting down the road of adding more environment vars to the make line - which
people might not want?
I’ll post the updated version as a V2 so that I can use git send-email.
Alan.