public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Decouple ARM instruction decoding/relocating from GDB
@ 2016-02-25 15:47 Simon Marchi
  2016-02-25 15:47 ` [PATCH 2/2] arm-tdep.c: Refactor displaced stepping relocation functions Simon Marchi
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Simon Marchi @ 2016-02-25 15:47 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-03-04 18:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 15:47 [PATCH 0/2] Decouple ARM instruction decoding/relocating from GDB 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-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-03-04 12:03 ` [PATCH 0/2] Decouple ARM instruction decoding/relocating from GDB Yao Qi
2016-03-04 18:42   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).