Re: [PATCH v2 10/17] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad

Antoine Tremblay
2016-06-15T15:42:08Z

Marcin KoÅ›cielnicki writes:

> 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.
>

Right, forgot to update the patchset with this.

Will do thx.

>> * 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(-)