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 7/7 v3] Remove tracepoint_action ops.


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


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