public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [Patch, microblaze] Add little-endian breakpoint
@ 2014-06-16 19:02 Ajit Kumar Agarwal
  2014-06-17 16:36 ` Tom Tromey
  2014-07-23 18:51 ` Michael Eager
  0 siblings, 2 replies; 5+ messages in thread
From: Ajit Kumar Agarwal @ 2014-06-16 19:02 UTC (permalink / raw)
  To: gdb-patches
  Cc: Michael Eager, Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

Hello All:

The following Patch add the little-endian breakpoint.
  
 [Patch,microblaze] Add little-endian breakpoint
    
    Add little-endian breakpoint.
    
    ChangeLog:
    2014-06-16 Ajit Agarwal <ajitkum@xilinx.com>
    
        * microblaze-tdep.c (microblaze_breakpoint_from_pc): Use
        of gdbarch_byte_order. Initialize break_insn_le to
        MICROBLAZE_BREAKPOINT_LE. Check byte_order with
        BFD_ENDIAN_BIG.
    
        * microblaze-tdep.h (MICROBLAZE_BREAKPOINT_LE): New Macro.
    
    Signed-off-by:Ajit Agarwal ajitkum@xilinx.com

Thanks & Regards
Ajit

[-- Attachment #2: 0001-Patch-microblaze-Add-little-endian-breakpoint.patch --]
[-- Type: application/octet-stream, Size: 1869 bytes --]

From a5477f17a3dfe21a3a09c736c8a6628c3f3fe4ae Mon Sep 17 00:00:00 2001
From: Ajit Agarwal <aagarwa@Ajits-MacBook-Air.local>
Date: Tue, 17 Jun 2014 00:08:37 +0530
Subject: [PATCH] [Patch,microblaze] Add little-endian breakpoint

Add little-endian breakpoint.

ChangeLog:
2014-06-16 Ajit Agarwal <ajitkum@xilinx.com>

	* microblaze-tdep.c (microblaze_breakpoint_from_pc): Use
	of gdbarch_byte_order. Initialize break_insn_le to
	MICROBLAZE_BREAKPOINT_LE. Check byte_order with
	BFD_ENDIAN_BIG.

	* microblaze-tdep.h (MICROBLAZE_BREAKPOINT_LE): New Macro.

Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
---
 gdb/microblaze-tdep.c | 7 ++++++-
 gdb/microblaze-tdep.h | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 14c1b52..1c2135f 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -160,10 +160,15 @@ static const gdb_byte *
 microblaze_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, 
 			       int *len)
 {
+  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);  
   static gdb_byte break_insn[] = MICROBLAZE_BREAKPOINT;
+  static gdb_byte break_insn_le[] = MICROBLAZE_BREAKPOINT_LE;
 
   *len = sizeof (break_insn);
-  return break_insn;
+  if (byte_order == BFD_ENDIAN_BIG)
+    return break_insn;
+  else
+    return break_insn_le;
 }
 \f
 /* Allocate and initialize a frame cache.  */
diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h
index a532092..6d90762 100644
--- a/gdb/microblaze-tdep.h
+++ b/gdb/microblaze-tdep.h
@@ -116,5 +116,6 @@ enum microblaze_regnum
 /* MICROBLAZE_BREAKPOINT defines the breakpoint that should be used.
    Only used for native debugging.  */
 #define MICROBLAZE_BREAKPOINT {0xb9, 0xcc, 0x00, 0x60}
+#define MICROBLAZE_BREAKPOINT_LE {0x18, 0x00, 0x0c, 0xba}
 
 #endif /* microblaze-tdep.h */
-- 
1.8.5.2 (Apple Git-48)


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

end of thread, other threads:[~2014-09-17 14:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-16 19:02 [Patch, microblaze] Add little-endian breakpoint Ajit Kumar Agarwal
2014-06-17 16:36 ` Tom Tromey
2014-07-23 18:51 ` Michael Eager
2014-09-17  8:48   ` Ajit Kumar Agarwal
2014-09-17 14:09     ` Michael Eager

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