* [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
* Re: [Patch, microblaze] Add little-endian breakpoint
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
1 sibling, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2014-06-17 16:36 UTC (permalink / raw)
To: Ajit Kumar Agarwal
Cc: gdb-patches, Michael Eager, Vinod Kathail, Vidhumouli Hunsigida,
Nagaraju Mekala
>>>>> "Ajit" == Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com> writes:
Ajit> static gdb_byte break_insn[] = MICROBLAZE_BREAKPOINT;
Ajit> + static gdb_byte break_insn_le[] = MICROBLAZE_BREAKPOINT_LE;
Not really your problem, since you're just following the existing code,
but it seems like both of these could be "const".
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch, microblaze] Add little-endian breakpoint
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
1 sibling, 1 reply; 5+ messages in thread
From: Michael Eager @ 2014-07-23 18:51 UTC (permalink / raw)
To: Ajit Kumar Agarwal, gdb-patches
Cc: Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala
On 06/16/14 12:02, Ajit Kumar Agarwal wrote:
> 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
Please update this patch to add a test case to the gdb test suite.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Patch, microblaze] Add little-endian breakpoint
2014-07-23 18:51 ` Michael Eager
@ 2014-09-17 8:48 ` Ajit Kumar Agarwal
2014-09-17 14:09 ` Michael Eager
0 siblings, 1 reply; 5+ messages in thread
From: Ajit Kumar Agarwal @ 2014-09-17 8:48 UTC (permalink / raw)
To: Michael Eager, gdb-patches
Cc: Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala
-----Original Message-----
From: Michael Eager [mailto:eager@eagercon.com]
Sent: Thursday, July 24, 2014 12:10 AM
To: Ajit Kumar Agarwal; gdb-patches@sourceware.org
Cc: Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze] Add little-endian breakpoint
On 06/16/14 12:02, Ajit Kumar Agarwal wrote:
> 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
>>Please update this patch to add a test case to the gdb test suite.
The existing gdb testsuite if compiled and tested with little endian binaries will fail.
Hence the existing testsuite is sufficient and we don’t see a need for a new testcase.
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch, microblaze] Add little-endian breakpoint
2014-09-17 8:48 ` Ajit Kumar Agarwal
@ 2014-09-17 14:09 ` Michael Eager
0 siblings, 0 replies; 5+ messages in thread
From: Michael Eager @ 2014-09-17 14:09 UTC (permalink / raw)
To: Ajit Kumar Agarwal, gdb-patches
Cc: Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala
On 09/17/14 01:48, Ajit Kumar Agarwal wrote:
>
>>> Please update this patch to add a test case to the gdb test suite.
>
> The existing gdb testsuite if compiled and tested with little endian binaries will fail.
> Hence the existing testsuite is sufficient and we don’t see a need for a new testcase.
Which test cases failure is corrected by this patch?
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ 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).