From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Pedro Alves'" <pedro@codesourcery.com>, <gdb-patches@sourceware.org>
Subject: RE: [PING] [RFC-v3] Add windows Thread Information Block
Date: Thu, 11 Mar 2010 08:13:00 -0000 [thread overview]
Message-ID: <002101cac0f2$a2298890$e67c99b0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <201003110000.31184.pedro@codesourcery.com>
Hi Pedro,
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyé : Thursday, March 11, 2010 1:01 AM
> À : gdb-patches@sourceware.org
> Cc : Pierre Muller
> Objet : Re: [PING] [RFC-v3] Add windows Thread Information Block
>
> On Wednesday 10 March 2010 22:22:51, Pierre Muller wrote:
>
> > > Sorry, I already explained long ago that TARGET_OBJECT_OSDATA
> > > is being misused here.
> > OK, I start to remember now,
> > you said that TARGET_OBJECT_DATA should use xml syntax for
> > all data transmission, what that it?
>
> Basically repeating from
> <http://sourceware.org/ml/gdb-patches/2009-07/msg00011.html>:
Sorry to bother you and bug you with all that.
I really completely forgot these last emails, I should have
reread them before sending this PING.
> TARGET_OBJECT_OSDATA is meant be used through the
> get_osdata interface, which assumes the target returns
> xml encoded tabular form data. See gdb/osdata.c, and
> the "info os" command (use and implementation). You
> can try "info os processes" against linux native or
> gdbserver to see it in action. The basic idea of this
> object, is to be able to fetch tables of operating system
> related data, like the list of running processes, or the
> list of running threads, which are the present uses.
OK, so let's use another scheme.
> > > Why the resistence to change that?
> > It's not resistance, its just that I have no xml knowledge,
> > and I still don't really understand why
> > xml should be required for all TARGET_OBJECT_DATA.
>
> See above.
>
> > > There's another bit you haven't addressed yet:
> > >
> > > > + if (len == 8)
> > > > + {
> > > > + uint64_t tlb = th->thread_local_base;
> > > > + memcpy ((void *)readbuf, (void *) &tlb, len);
> > > > + return len;
> > > > + }
> > > > + else if (len == 4)
> > >
> > > As I explained before, for partial xfers you should not
> > > design the protocol relying on `len' being exactly 4 or 8.
> > > Also, this is just transfering a number, why make that
> > > target-endian dependant (see memcpy above) ?
> >
> > My code does assume that there is a unique call that
> > will fetch either 4 bytes (for windows 32 bit inferior)
> > or 8 bytes for (windows 64 bit inferior) in a unique call,
> > which avoids the static struct used in the linux counter part...
> > (I could have added a check that offset is zero).
> >
> > Anyhow, if you insist on using xml, you will need to
> > help me on how to handle and extract the relevant data from
> > the generated xml.
>
> I never insisted you used xml... I do insist however,
> that everything that goes through TARGET_OBJECT_OSDATA
> respects the get_osdata interface, and that, is
> tabular/xml based transfer of data.
>
> Basically repeating from:
> <http://sourceware.org/ml/gdb-patches/2009-07/msg00015.html>:
>
> So, if you want to use the qxfer interface, please
> add a new target object. One note: I think target object's spirit is
> to transfer the whole data block, which is what would make
> sense to me when requesting a TLB _object_. The reason that
> makes me consider transfering the whole blob instead of an address
> and then relying on plain memory reads issued from GDB,
> is that on other targets that may want to reuse the
> interface, the TLB-like object may not be mapped or
> accessible on the address space accessible with plain memory
> reads. This is exactly the rationale behind objects like
> TARGET_OBJECT_AUXV, TARGET_OBJECT_WCOOKIE or
> TARGET_OBJECT_SIGNAL_INFO: each of these objects can
> be seen as a blob of data in its own address space.
> If just transfering the address of the data is the way
> to go, as you're doing presently, then I'm not certain
> the xfer_partial interface is a good fit for this --- for
> example, a simple packet like we use to fetch the tls data
> pointer seems like a better fit. For example, a new
> target_get_thread_local_block target method, and a
> new "qGetTLBAddr:XXX" packet: see the "qGetTLSAddr:" packet
> for inspiration.
So I will try this out, but adding new target methods
is something I am afraid of not being capable...
I will probably need so time to get that working...
Pedro,
I would like to apologize here, because my first email
sounded like an attack on you, but it was just that I I
still had not understood your reasons for the opposition
against another use of TARGET_OBJECT_OSDATA.
I was thinking that the Thread Information Block was an
OS specific feature, and as such would clearly be eligible
for the use of TARGET_OBJECT_OSDATA.
Your answer that it should all be processed through the
get_osdata function has finally convinced me.
It should already have last year, but I must have been
in a 'worse' mind and didn't understand your reasons then.
Thanks for all,
Pierre
next prev parent reply other threads:[~2010-03-11 8:13 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 23:47 [RFC] " Pierre Muller
2009-06-26 7:04 ` Eli Zaretskii
2009-06-26 15:45 ` Christopher Faylor
2009-06-26 16:08 ` Pierre Muller
2009-06-26 16:11 ` Christopher Faylor
2009-06-27 16:07 ` Doug Evans
2009-06-27 17:15 ` Eli Zaretskii
2009-06-29 1:58 ` Christopher Faylor
2009-06-26 15:53 ` Daniel Jacobowitz
2009-06-26 16:11 ` Pierre Muller
2009-06-26 16:18 ` 'Daniel Jacobowitz'
2009-06-26 16:14 ` Christopher Faylor
2009-07-01 14:41 ` [RFC-v2] " Pierre Muller
2009-07-01 15:42 ` Pedro Alves
2009-07-01 16:05 ` Pedro Alves
2009-07-01 16:18 ` Pierre Muller
2009-07-01 16:26 ` Pedro Alves
2009-07-01 16:09 ` Pierre Muller
2009-07-01 16:33 ` Pedro Alves
2009-07-01 16:39 ` Pedro Alves
2009-07-01 17:18 ` Pedro Alves
2009-07-01 17:43 ` Eli Zaretskii
2009-07-01 18:04 ` Christopher Faylor
2009-07-03 16:11 ` [RFC-v3] " Pierre Muller
2009-07-03 19:43 ` Christopher Faylor
2010-03-10 17:14 ` [PING] " Pierre Muller
2010-03-10 17:26 ` Pedro Alves
2010-03-10 22:23 ` Pierre Muller
2010-03-10 23:30 ` Daniel Jacobowitz
2010-03-11 0:11 ` Pedro Alves
2010-03-11 0:00 ` Pedro Alves
2010-03-11 8:13 ` Pierre Muller [this message]
2010-03-15 21:40 ` [RFC-v4] Add windows OS " Pierre Muller
2010-03-16 0:10 ` Christopher Faylor
2010-04-01 9:41 ` [PING][RFC-v4] " Pierre Muller
2010-04-01 11:21 ` Pedro Alves
2010-04-01 12:57 ` [RFC-v5] " Pierre Muller
2010-04-01 13:21 ` Pedro Alves
2010-04-01 13:31 ` Pierre Muller
2010-04-01 13:43 ` Pedro Alves
2010-04-11 15:10 ` Pedro Alves
2010-04-12 13:52 ` [RFC-v6] " Pierre Muller
2010-04-12 16:43 ` Pedro Alves
2010-04-13 8:38 ` [RFA-v7] " Pierre Muller
2010-04-13 11:14 ` Pedro Alves
2010-04-13 13:21 ` [RFA-v8] " Pierre Muller
2010-04-13 15:06 ` Pedro Alves
2010-04-13 17:42 ` Eli Zaretskii
2010-04-15 22:54 ` [RFA-v9] Add Windows " Pierre Muller
[not found] ` <000c01cadcee$7ffcedd0$7ff6c970$%muller@ics-cnrs.unistra.fr>
2010-04-16 6:29 ` Eli Zaretskii
2010-04-16 7:53 ` Pierre Muller
2010-04-16 20:30 ` Christopher Faylor
[not found] ` <002101cac0f2$a2298890$e67c99b0$%muller@ics-cnrs.unistra.fr>
[not found] ` <000e01cac488$27dcf970$7796ec50$%muller@ics-cnrs.unistra.fr>
[not found] ` <001201cad17f$6a058980$3e109c80$%muller@ics-cnrs.unistra.fr>
2010-04-01 13:30 ` [PING][RFC-v4] Add windows " Eli Zaretskii
2010-04-01 16:17 ` Pierre Muller
[not found] ` <003c01cad1b6$d69e44b0$83dace10$%muller@ics-cnrs.unistra.fr>
2010-04-01 16:58 ` Eli Zaretskii
2010-03-10 18:48 ` [PING] [RFC-v3] Add windows " Mark Kettenis
2010-03-10 22:25 ` Pierre Muller
2010-03-11 0:24 ` Pedro Alves
2010-03-11 8:01 ` Pierre Muller
2009-09-02 15:35 ` [PING][RFC-v3] " Pierre Muller
2009-07-01 18:10 ` [RFC-v2] " Christopher Faylor
2009-07-01 18:20 ` Pedro Alves
2009-07-01 19:10 ` Christopher Faylor
2009-07-01 19:18 ` Pedro Alves
2009-07-01 21:13 ` Christopher Faylor
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='002101cac0f2$a2298890$e67c99b0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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