From: Pedro Alves <palves@redhat.com>
To: David Taylor <dtaylor@emc.com>, gdb@sourceware.org
Subject: Re: why I dislike qXfer
Date: Mon, 13 Jun 2016 18:35:00 -0000 [thread overview]
Message-ID: <7ee87c44-2fe7-741b-d134-49e9a56a966c@redhat.com> (raw)
In-Reply-To: <31527.1465841753@usendtaylorx2l>
On 06/13/2016 07:15 PM, David Taylor wrote:
> With the qT{f,s}{STM,P,V} q{f,s}ThreadInfo (and possibly others)
> interfaces, nothing needs to be precomputed, and I either start at the
> beginning (f -- first) or where the previous request left off (s --
> subsequent).
> I have to store, per connection, my location. But, there is no random
> reading. The next request of that flavor will either start at the
> beginning (f) or where the last one left off (s). Reads are sequential.
If you support non-stop mode, the target is running and list of threads
changes as gdb is iterating. The "location" thread can exit and you're
left not knowing where to continue from, for example. To get around that,
generate a stable snapshot when you get the f requests, and serve gdb
requests from that snapshot.
> With the offset,length interface I don't know that reads will be
> sequential so I need to pad and leave gaps.
>
> What do people do?
Generate a snapshot when gdb requests offset 0. Then serve requests
from that snapshot.
See handle_qxfer_threads in gdbserver's sources.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-06-13 18:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 18:16 David Taylor
2016-06-13 18:35 ` Pedro Alves [this message]
2016-06-16 17:42 ` taylor, david
2016-06-16 18:25 ` Pedro Alves
2016-06-16 20:00 ` taylor, david
2016-06-17 14:33 ` 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=7ee87c44-2fe7-741b-d134-49e9a56a966c@redhat.com \
--to=palves@redhat.com \
--cc=dtaylor@emc.com \
--cc=gdb@sourceware.org \
/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