This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/5] Preparatory patches for ITSET in GDBserver


Hi,
This patch series include something that will be used when we support
ITSET in GDBserver, and even in IPA.

I applied Pedro's patches [1] on top of CVS trunk, and move most of ITSET
code to gdb/common/, so that both GDB, GDBserver and IPA supports
ITSET.  I am still looking at the regressions in native testing
and remote testing caused by patch 2/14 `running all-stop on top of
non-stop', meanwhile I've queued too many patches in my local tree, so
I think it is good if I:
  - Send some refactor patches upstreams first, to reduce the length
of my patch queue, and to be motivated to look at the rest of
regressions :)
  - Post my thoughts on supporting ITSET in GDB, GDBserver and IPA, to
get feedbacks as early as possible.

Before explain these patches, I want to explain my design on supporting
ITSET in GDB, GDBserver and IPA.  In patch series [1], ITSET is
supported in GDB naturally.  When supporting ITSET in GDBserver and IPA,
GDB has to send ITSET to them in some format over RSP and IPA protocol.
One decision we have to make here is the format of ITSET when sending
it.  We have two choices here,

  - ITSET spec, which is a string.  GDB just sends a compiled version
of ITSET (which is still an ITSET, but with different contents, I'll
explain it later).  Then GDBserver and IPA should be able to parse
ITSET spec, build up a tree, and evaluate thread/cores on a given
ITSET instance.

  - Agent Expression.  GDB just transform ITSET from a string format
to agent expression, and send agent expression to GDBsever and IPA.
Agent expression has been supported in GDBserver and IPA, so we may
have to add new opcode specific to ITSET operations, which is hard
to me  In ITSET, set is a unit in each operation, such as
INTERSECTION and UNION.  Looks hard to operate sets with arbitrary
number of elements in a stack machine model.  Then, I give up on
this direction.

Finally I choose the former approach.  When GDB sending ITSET, it
"compiles" itset to a new instance of itset which

  a) still complies to ITSET spec,
  b) replaced thread/inferior information that GDBserver or IPA
understands.

The string of compiled itset is sent over RSP to GDBserver, and
get parsed there.  In other words, GDBserver and IPA has
equivalent ITSET functionality compared with GDB, so most of
itset code is moved to gdb/common/.  Then, it needs GDBserver
can give similar support in GDB to ITSET code, so these patches
come up.

[1] [RFC/WIP I/T sets V2 PATCH 00/14] I/T sets.  http://sourceware.org/ml/gdb-patches/2011-12/msg00550.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]