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]

Re: [PATCH 4/9] agent doc


On 02/22/2012 01:28 AM, Yao Qi wrote:
> On 02/22/2012 01:26 AM, Pedro Alves wrote:
>> > From agentexpr.texi:
>> > 
>> >  When GDB is debugging a remote target, the GDB @dfn{agent} code running
>> >  on the target computes the values of the expressions itself.  To avoid
>> >  having a full symbolic expression evaluator on the agent, GDB translates
>> >  expressions in the source language into a simpler bytecode language, and
>> >  then sends the bytecode to the agent; the agent then executes the
>> >  bytecode, and records the values for GDB to retrieve later.
>> >                                                  (...) The interpreter is
>> >  small, and strict limits on the memory and time required to evaluate an
>> >  expression are easy to determine, making it suitable for use by the
>> >  debugging agent in real-time applications.
>> > 
>> > So nothing mentioned here about in-process or not.  This applies all the
>> > same to the agent expression mechinary in GDBserver (tracepoints, etc.).
>> > That's an agent as well.  "agent" is a very loose term for roughly something
>> > that runs on the remote target on GDB's behalf.  Can we just drop that
>> > explanation?  If we name things clearly then that's unnecessary.
>> > 
> I am inclined to leave this explanation there, as it is still useful to
> generic term "agent".

Hmm, it still seems incorrect in the exact same way.

> -When GDB is debugging a remote target, the GDB @dfn{agent} code running
> +Although called @dfn{agent expression}, because they originally
> +referred to the in-process agent (@pxref{In-Process Agent}), these

Still false.  Looks unchanged compared to the previous version?

> +When @value{GDBN} is debugging, the @value{GDBN} agent code running
>  on the target computes the values of the expressions itself.  To avoid
> -having a full symbolic expression evaluator on the agent, GDB translates
> -expressions in the source language into a simpler bytecode language, and
> -then sends the bytecode to the agent; the agent then executes the
> -bytecode, and records the values for GDB to retrieve later.
> +having a full symbolic expression evaluator on the agent or remote stub,

This is still confused on agent vs in-process agent.  The remote stub is
an agent as well; it does things for gdb (e.g., GDBserver supports tracepoints).
Note the several references to "agent" on this whole paragraph.  I suggest
really just leave this paragraph as it was.

> +@value{GDBN} translates expressions in the source language into a simpler
> +bytecode language, and then sends the bytecode to the agent; the agent
> +then executes the bytecode, and records the values for @value{GDBN} to
> +retrieve later.

We lost the intro about tracepoints, so this mention of recording values
for gdb to retrieve later is now awkward.

-- 
Pedro Alves


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