This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] New field stop_pc in tracepoint_hit_ctx
On 03/02/2012 01:00 AM, Yao Qi wrote:
> This patch is to add a new field `stop_pc' in tracepoint_hit_ctx, so
> parameter `stop_pc' used here and there can be removed. This change
> allows us to give a clean interface in next patch.
>
> Note the name `tracepoint_hit_ctx' is not very accurate, because it
> has been used in collect_data_at_step for "while-stepping" action also.
> It may be renamed to `tracepoint_action_ctx', which is about the
> context of doing tracepoint actions. I don't rename `tracepoint_hit_ctx'
> to keep this patch as readable as possible. I can send a follow-up
> patch to rename it if this change is reasonable.
>
> As `tracepoint_hit_ctx' is about the context of doing tracepoint
> actions, it is natural to add field `stop_pc' to show the pc value when
> to do tracepoint actions.
Fine with me, though honestly I find that the similarity between
tracepoint_action vs tracepoint_action_ctx will increase confusion,
not reduce.
> tpoint = ust_marker_to_static_tracepoint (mdata);
> + ctx.base.stop_pc = tpoint->address;
tpoint may be NULL, see just below.
> +
> if (tpoint == NULL)
> {
--
Pedro Alves