From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: [PATCH 0/2] Decouple ARM instruction decoding/relocating from GDB
Date: Thu, 25 Feb 2016 15:47:00 -0000 [thread overview]
Message-ID: <1456415245-24005-1-git-send-email-simon.marchi@ericsson.com> (raw)
As part of the upcoming ARM fast tracepoint support, we need to have some code
in gdbserver that decodes the relocated instructions, to check whether they
need to be modified or not (whether the result of their execution depends on
their particular PC). Instead of writing new code from scratch, we should take
advantage of the code already written for the displaced stepping feature in
GDB, as AArch64 does. To make this possible, we first need to decouple the
instruction decoding part from GDB, so that the code can eventually be moved to
a shared location.
Patch 1 replaces the GDB-specific arguments of the instruction decoding
functions by a pointer to a structure/closure, so that different contexts can
provide different parameters.
Patch 2 refactors the functions in arm-tdep.c to isolate the instruction
decoding bits specific to displaced stepping in a single function. It renames
the other functions to show that they are not specific to displaced stepping
anymore.
Future patches will complete this work by implementing a visitor pattern
similar to AArch64 and moving the code to the arch/ directory.
Simon Marchi (2):
arm-tdep.c: Replace arguments to relocation functions by a structure
arm-tdep.c: Refactor displaced stepping relocation functions
gdb/arm-tdep.c | 947 +++++++++++++++++++++++++++------------------------------
1 file changed, 456 insertions(+), 491 deletions(-)
--
2.5.1
next reply other threads:[~2016-02-25 15:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 15:47 Simon Marchi [this message]
2016-02-25 15:47 ` [PATCH 1/2] arm-tdep.c: Replace arguments to relocation functions by a structure Simon Marchi
2016-02-26 16:12 ` Luis Machado
2016-02-26 16:25 ` Simon Marchi
2016-02-26 16:26 ` Simon Marchi
2016-02-25 15:47 ` [PATCH 2/2] arm-tdep.c: Refactor displaced stepping relocation functions Simon Marchi
2016-02-26 16:11 ` Luis Machado
2016-02-26 16:23 ` Simon Marchi
2016-02-26 16:50 ` Luis Machado
2016-03-04 12:03 ` [PATCH 0/2] Decouple ARM instruction decoding/relocating from GDB Yao Qi
2016-03-04 18:42 ` Simon Marchi
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=1456415245-24005-1-git-send-email-simon.marchi@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
/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