This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 10/17] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad
- From: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>, gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Wed, 15 Jun 2016 16:59:21 +0200
- Subject: Re: [PATCH v2 10/17] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad
- Authentication-results: sourceware.org; auth=none
- References: <1465476975-25062-1-git-send-email-antoine dot tremblay at ericsson dot com> <1465476975-25062-11-git-send-email-antoine dot tremblay at ericsson dot com>
On 09/06/16 14:56, Antoine Tremblay wrote:
From: Simon Marchi <simon.marchi@ericsson.com>
We currently pass many values to install_fast_tracepoint_jump_pad that
come from fields of struct tracepoint, and we plan to add another (the
kind field). It would be simpler to just pass a pointer to the
tracepoint and have install_fast_tracepoint_jump_pad fetch the fields
from it.
That requires moving the struct tracepoint definition to tracepoint.h.
gdb/gdbserver/ChangeLog:
* linux-aarch64-low.c (aarch64_install_fast_tracepoint_jump_pad):
Replaces some parameters with a struct tracepoint *.
The same needs to be done for s390 and powerpc.
* linux-low.c (linux_install_fast_tracepoint_jump_pad):
Likewise.
* linux-low.h (struct linux_target_ops)
<install_fast_tracepoint_jump_pad>: Likewise.
* linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Likewise.
(i386_install_fast_tracepoint_jump_pad): Likewise.
(x86_install_fast_tracepoint_jump_pad): Likewise.
* target.h (struct tracepoint): New forward declaration.
(struct target_ops) <install_fast_tracepoint_jump_pad>: Replace
some parameters with a struct tracepoint *.
(install_fast_tracepoint_jump_pad): Likewise.
* tracepoint.c (enum tracepoint_type): Move to tracepoint.h.
(struct tracepoint): Likewise.
(install_fast_tracepoint): Adapt call to
install_fast_tracepoint_jump_pad.
* tracepoint.h (enum tracepoint_type) Moved from tracepoint.c.
(struct tracepoint): Moved from tracepoint.c.
---
gdb/gdbserver/linux-aarch64-low.c | 26 ++++----
gdb/gdbserver/linux-arm-low.c | 2 +
gdb/gdbserver/linux-low.c | 12 +---
gdb/gdbserver/linux-low.h | 5 +-
gdb/gdbserver/linux-x86-low.c | 63 ++++++++----------
gdb/gdbserver/target.h | 26 ++++----
gdb/gdbserver/tracepoint.c | 131 +-------------------------------------
gdb/gdbserver/tracepoint.h | 125 ++++++++++++++++++++++++++++++++++++
8 files changed, 179 insertions(+), 211 deletions(-)