Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Wei-cheng Wang <cole945@gmail.com>,
	uweigand@de.ibm.com,        gdb-patches@sourceware.org
Subject: Re: [PATCH 1/5 v4] Remove tracepoint_action ops.
Date: Tue, 30 Jun 2015 09:57:00 -0000	[thread overview]
Message-ID: <559267F9.6000307@redhat.com> (raw)
In-Reply-To: <1435422102-39438-1-git-send-email-cole945@gmail.com>

On 06/27/2015 05:21 PM, Wei-cheng Wang wrote:

> This patch removes 'ops' in tracepoint, and uses helper functions to
> call action handler instead.
> 
> The object layout of tracepoint_action may differ in gdbserver and
> inferior depend on the alignment rule of target ABI, so gdbserver cannot
> simply copy the object from its memory to inferior memory.
> 
> For example,
> 
>   struct collect_memory_action
>   {
>     struct tracepoint_action base;
>     {
>       #ifndef IN_PROCESS_AGENT
>       const struct tracepoint_action_ops *ops;
>       #if
>   -   char type;
>   | }
>   | ULONGEST addr;
>   | ULONGEST len;
>   - int32_t basereg;
>   };
> 
> and on PowerPC,
> 
>      Wihtout ops           with ops
>       0   1   2   3         0   1   2   3
>    0 |type| PADDING...    0 |ops-------------|
>    4 .................    4 |type|PADDING....|
>    8 |addr------------    8 |addr-------------
>    c ----------------|    c -----------------|
>   10 |len-------------   10 |len--------------
>   14 ----------------|   14 -----------------|
>   18 |basereg--------|   18 |basereg---------|
> 
> so we cannot directly copy the object.
> 
> In this patch, 'ops' is removed in order to make the objects identical.
> 
> gdbserver/ChangeLog
> 
> 2015-06-27  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.
> ---

FAOD, this looks fine to me.

Thanks,
-- 
Pedro Alves


      parent reply	other threads:[~2015-06-30  9:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-27 16:21 Wei-cheng Wang
2015-06-27 16:22 ` [PATCH 5/5 v4] Allow target to decide where to map jump-pad Wei-cheng Wang
2015-07-03 16:38   ` Ulrich Weigand
2015-06-27 16:22 ` [PATCH 2/5 v4] powerpc: Support z-point type in gdbserver Wei-cheng Wang
2015-07-03 15:17   ` Ulrich Weigand
2016-02-24 12:05   ` Marcin Kościelnicki
2016-02-24 17:37     ` Ulrich Weigand
2016-02-24 17:39       ` Marcin Kościelnicki
2015-06-27 16:22 ` [PATCH 3/5 v4] Fix argument to compiled_cond, and add cases for compiled-condition Wei-cheng Wang
2015-06-30  9:57   ` Pedro Alves
2015-09-14 14:04   ` Pierre Langlois
2015-09-16 16:15   ` Yao Qi
2015-06-27 16:22 ` [PATCH 4/5 v4] Tracepoint for ppc64 Wei-cheng Wang
2015-06-28  6:21   ` Wei-cheng Wang
2015-06-29 15:54   ` Pierre Langlois
2015-07-03 16:37   ` Ulrich Weigand
2015-06-30  9:57 ` Pedro Alves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559267F9.6000307@redhat.com \
    --to=palves@redhat.com \
    --cc=cole945@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox