This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 7/7 v3] Remove tracepoint_action ops.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: cole945 at gmail dot com (Wei-cheng Wang)
- Cc: gdb-patches at sourceware dot org, cole945 at gmail dot com (Wei-cheng Wang)
- Date: Wed, 8 Apr 2015 19:09:47 +0200 (CEST)
- Subject: Re: [PATCH 7/7 v3] Remove tracepoint_action ops.
- Authentication-results: sourceware.org; auth=none
Wei-cheng Wang wrote:
> 2015-03-30 Wei-cheng Wang <cole945@gmail.com>
>
> * tracepoint.c (struct tracepoint_action): Remove ops.
> (m_tracepoint_action_download, r_tracepoint_action_download,
> x_tracepoint_action_download, l_tracepoint_action_download): Adjust
> size and offset accordingly.
> (m_tracepoint_action_ops, r_tracepoint_action_ops,
> x_tracepoint_action_ops, l_tracepoint_action_ops): Delete
> (tracepoint_action_send, tracepoint_action_download): New functions.
> Helpers for tracetion action handlers.
> (add_tracepoint_action): Remove setup actions ops.
> (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
It would be good to verify this doesn't break Intel by running the
regression test suite there.
> static CORE_ADDR
> r_tracepoint_action_download (const struct tracepoint_action *action)
> {
> - int size_in_ipa = (sizeof (struct collect_registers_action)
> - - offsetof (struct tracepoint_action, type));
> + int size_in_ipa = (sizeof (struct collect_registers_action));
I guess there's not much need to have these "size_in_ipa" variables
any more, subsequent code might as well just use the sizeof directly.
Otherwise looks good.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com