public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: [PATCH v3 03/18] arm-tdep.c: Move debug printout from decode to copy function
Date: Tue, 05 Jul 2016 13:41:00 -0000	[thread overview]
Message-ID: <1467726030-13020-4-git-send-email-antoine.tremblay@ericsson.com> (raw)
In-Reply-To: <1467726030-13020-1-git-send-email-antoine.tremblay@ericsson.com>

From: Simon Marchi <simon.marchi@ericsson.com>

To be consistent with the rest of the code, the debug printout should be
in thumb_copy_pc_relative_16bit.  Also, thumb_decode_pc_relative_16bit
will be move out of arm-tdep.c to common code, so it can't contain
anything gdb-specific.

	* arm-tdep.c (thumb_decode_pc_relative_16bit): Move debug print
	from here...
	(thumb_copy_pc_relative_16bit): ... to here.
---
 gdb/arm-tdep.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 5a0e247..0c05aae 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -6972,9 +6972,13 @@ install_pc_relative (struct arm_insn_reloc_data *data, int rd)
 }
 
 static int
-thumb_copy_pc_relative_16bit (struct arm_insn_reloc_data *data, int rd,
-			      unsigned int imm)
+thumb_copy_pc_relative_16bit (uint16_t insn, struct arm_insn_reloc_data *data,
+			      int rd, unsigned int imm)
 {
+  if (debug_displaced)
+    fprintf_unfiltered (gdb_stdlog,
+			"displaced: copying thumb adr r%d, #%d insn %.4x\n",
+			rd, imm, insn);
 
   /* Encoding T2: ADDS Rd, #imm */
   data->dsc->modinsn[0] = (0x3000 | (rd << 8) | imm);
@@ -6990,12 +6994,7 @@ thumb_decode_pc_relative_16bit (uint16_t insn, struct arm_insn_reloc_data *data)
   unsigned int rd = bits (insn, 8, 10);
   unsigned int imm8 = bits (insn, 0, 7);
 
-  if (debug_displaced)
-    fprintf_unfiltered (gdb_stdlog,
-			"displaced: copying thumb adr r%d, #%d insn %.4x\n",
-			rd, imm8, insn);
-
-  return thumb_copy_pc_relative_16bit (data, rd, imm8);
+  return thumb_copy_pc_relative_16bit (insn, data, rd, imm8);
 }
 
 static int
-- 
2.8.1

  parent reply	other threads:[~2016-07-05 13:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 13:41 [PATCH v3 00/18] Fast tracepoint support for ARMv7 Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 16/18] arm: Move insn_references_pc to common code Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 13/18] Export tracing control breakpoints functions via global function pointers Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 11/18] Use software single step to step out of a fast tracepoint jump pad Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 15/18] JIT conditions support for ARM tracepoints Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 02/18] arm-tdep.c: Refactor displaced stepping relocation functions Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 06/18] arm-tdep.c: Use relocation visitor in Thumb 16-bits instruction decoding Antoine Tremblay
2016-07-05 13:41 ` [PATCH v3 08/18] Move Thumb 32 bits instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-07-05 13:41 ` Antoine Tremblay [this message]
2016-07-05 13:41 ` [PATCH v3 12/18] Add ARM/Thumb instruction assembler for fast tracepoints Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 17/18] arm fast tracepoints: Relocation of ARM instructions Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 07/18] Move ARM instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 09/18] Move Thumb 16 bits " Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 18/18] arm fast tracepoints: Relocation of Thumb 32-bits instructions Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 14/18] Fast tracepoint support for ARM on Linux Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 01/18] arm-tdep.c: Replace arguments to decode function by a structure Antoine Tremblay
2016-07-05 13:42 ` [PATCH v3 10/18] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad Antoine Tremblay
2016-07-05 13:56 ` [PATCH v3 04/18] arm-tdep.c: Use relocation visitor in ARM instruction decoding Antoine Tremblay
2016-07-05 13:56 ` [PATCH v3 05/18] arm-tdep.c: Use relocation visitor in Thumb 32-bits " Antoine Tremblay

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=1467726030-13020-4-git-send-email-antoine.tremblay@ericsson.com \
    --to=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).