This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdbserver: Remove tracepoint_action ops.
- From: Pedro Alves <palves at redhat dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: gdb-patches at sourceware dot org, antoine dot tremblay at ericsson dot com
- Date: Thu, 11 Feb 2016 16:50:19 +0000
- Subject: Re: [PATCH] gdbserver: Remove tracepoint_action ops.
- Authentication-results: sourceware.org; auth=none
- References: <56A60CD3 dot 6060704 at redhat dot com> <1455208203-28310-1-git-send-email-koriakin at 0x04 dot net>
On 02/11/2016 04:30 PM, Marcin KoÅcielnicki wrote:
> 2015-06-27 Wei-cheng Wang <cole945@gmail.com>
> 2016-02-11 Marcin KoÅcielnicki <koriakin@0x04.net>
Only one date, and then align names:
2015-06-27 Wei-cheng Wang <cole945@gmail.com>
Marcin KoÅcielnicki <koriakin@0x04.net>
See previous examples:
$ grep -P "\t.*@" gdb/ChangeLog-2015 -C 3 | less
>
> * tracepoint.c (struct tracepoint_action_ops): Removed.
"Remove."
> (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.
Split lines with close/open ()s:
(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
Ditto. Period at end:
(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.
Typo "tracetion".
> (add_tracepoint_action): Remove setup actions ops.
> (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
> ---
> Hey,
>
> This is a fixed-up version of Wei-cheng's patch at
> https://sourceware.org/ml/gdb-patches/2015-03/msg00995.html .
>
> This version, in addition to fixing a few trivial conflicts, also removes
> the definition of struct tracepoint_action_ops, which is now unused, but
> was left in by the original patch.
Thanks.
>
> I'm also not sure if I got the changelog format right...
>
> OK to push?
>
OK with fixes below.
> -
> 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));
> - CORE_ADDR ipa_action = target_malloc (size_in_ipa);
> + CORE_ADDR ipa_action = target_malloc (sizeof (struct collect_registers_action));
>
Remove spurious double-space before '=' while at it.
> @@ -628,21 +592,14 @@ x_tracepoint_action_send ( char *buffer, const struct tracepoint_action *action)
> return agent_expr_send (buffer, eaction->expr);
> }
>
> -static const struct tracepoint_action_ops x_tracepoint_action_ops =
> -{
> - x_tracepoint_action_download,
> - x_tracepoint_action_send,
> -};
> -
> static CORE_ADDR
> l_tracepoint_action_download (const struct tracepoint_action *action)
> {
> - int size_in_ipa = (sizeof (struct collect_static_trace_data_action)
> - - offsetof (struct tracepoint_action, type));
> - CORE_ADDR ipa_action = target_malloc (size_in_ipa);
> + CORE_ADDR ipa_action =
> + target_malloc (sizeof (struct collect_static_trace_data_action));
The '=' goes at the beginning of the next line.
OK with those fixed.
Thanks,
Pedro Alves