From: Pedro Alves <palves@redhat.com>
To: Sterling Augustine <saugustine@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [Patch] Mechanism for board files to set default remotetimeout
Date: Mon, 03 Jun 2013 10:52:00 -0000 [thread overview]
Message-ID: <51AC7565.9070400@redhat.com> (raw)
In-Reply-To: <CAEG7qUxVaxn_J7G1jhUZFryK6ekoxaYZoLfGR8+Ke5y_m0HSgA@mail.gmail.com>
On 05/31/2013 09:57 PM, Sterling Augustine wrote:
> On Fri, May 31, 2013 at 3:13 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 05/31/2013 12:42 AM, Sterling Augustine wrote:
>>> The enclosed simple patch adds and demonstrates a new mechanism for a
>>> board file to declare a default remotetimeout.
>>
>> Took me a bit to realize this is about "set remotetimeout" in gdb,
>> not the expect timeout. It wasn't that obvious from the
>> description. :-)
>>
>> Is this really necessary? The board could just append "-l TIMEOUT"
>> to the GDB command line invocation. Looks simpler, and doesn't
>> depend on issuing an interactive GDB command.
>
> I'll switch to this.
>
>>> It follows a similar mechanism as set height 0.
>>>
>>> This is useful if the board has high latency for internal gdb
>>> commands, as remote-stdio-gdbserver.exp does.
>>
>> "high latency for internal gdb commands"?
>>
>> What does that mean? What are internal gdb commands?
>
> I meant to distinguish between the communication that happens between
> the user and gdb, and the communication that happens between gdb and
> gdbserver. Not very well, apparently.
:-) Calling those the remote serial protocol (RSP) commands would be
clearer.
>
>>
>> Testsuite knobs boards can tweak should be documented somewhere.
>> Looks like under "Testsuite Configuration" in the gdbint manual
>> might be a good place? Would be great if it was minimally
>> documented in the .exp itself too.
>
> Since I'm switching to the other mechanism, I guess I won't worry
> about this. I will however, separately submit a patch to the "set
> remotetimeout" command's documentation, mentioning that there is a
> command line option which does the same thing. Would have saved me a
> bit of trouble.
That's always nice, thanks.
Note however, given "-ex", you don't even need the special -l switch.
This
gdb -ex "set remotetimeout xxx"
works just as fine. So you can do this from the command line:
$ make check RUNTESTFLAGS="GDBFLAGS='-ex set\ remotetimeout\ 1000'"
Or, for example, this is a board file I have for testing
GDB in different modes:
~~~
set board_info(localhost,isremote) 0
load_generic_config "unix"
set GDBFLAGS ""
#set GDBFLAGS "${GDBFLAGS} -ex \"set target-async on\""
#set GDBFLAGS "${GDBFLAGS} -ex \"set break always-inserted on\""
#set GDBFLAGS "${GDBFLAGS} -ex \"set displaced-stepping on\""
# The default compiler for this target.
set_board_info compiler "[find_gcc]"
~~~
I then go and uncomment one of those lines to pick the mode I want.
and run with:
$ make check RUNTESTFLAGS="--target_board=localhost"
(I call that board file localhost.exp)
--
Pedro Alves
next prev parent reply other threads:[~2013-06-03 10:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 23:42 Sterling Augustine
2013-05-31 10:13 ` Pedro Alves
2013-05-31 20:57 ` Sterling Augustine
2013-05-31 22:49 ` Sterling Augustine
2013-06-03 11:31 ` Pedro Alves
2013-06-03 10:52 ` Pedro Alves [this message]
2013-06-03 11:09 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51AC7565.9070400@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=saugustine@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox