[PATCH 2/2] OO tracepoint_action

Yao Qi yao@codesourcery.com
Fri Mar 2 01:06:00 GMT 2012


On 03/02/2012 09:00 AM, Yao Qi wrote:
> This is the major part of this patch series, which replace several
> switch/case blocks in code with function vectors.  It is easier to add
> new operation to tracepoint_action in the future.

This patch is a mechanical refactor change, except in
do_action_at_tracepoint.  In GDBserver, we can install
tracepoint_action_ops when creating tracepoint_action objects, however,
in IPA, all tracepoint_actions objects are written from GDBserver.  So
when writing tracepoint_actions to IPA, we firstly write field `ops' to
NULL, and check it in do_action_at_tracepoint.  If `ops' field is NULL,
install corresponding tracepoint_action_ops instances.  The other
approach is to expose the symbols of tracepoint_action_ops instances to
GDBserver, so GDBserver can write it to `ops' field.  This approach
exposed too much details of IPA (symbols of tracepoint_action_ops
variables), so I don't use it.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list