From: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>
To: Michael Eager <eager@eagerm.com>,
Michael Eager <eager@eagercon.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Joel Brobecker <brobecker@adacore.com>
Cc: Vinod Kathail <vinodk@xilinx.com>,
Vidhumouli Hunsigida <vidhum@xilinx.com>,
Nagaraju Mekala <nmekala@xilinx.com>
Subject: RE: [Patch, microblaze]: Add slr and shr regs and little-endian breakpoint
Date: Wed, 21 May 2014 13:41:00 -0000 [thread overview]
Message-ID: <f074d924-496d-4c10-97e4-0e6e3d069039@BY2FFO11FD034.protection.gbl> (raw)
In-Reply-To: <537C5A25.9000003@eagerm.com>
[-- Attachment #1: Type: text/plain, Size: 3420 bytes --]
Based on the feedback I have splitted the patch and the following is the patch for Add slr and shr regs support.
[Patch, microblaze]: Add slr and shr regs
ChangeLog:
2014-05-20 Ajit Agarwal <ajitkum@xilinx.com>
* gdb/gdbserver/Makefile.in (microblaze-linux.c): New rule.
* gdb/microblaze-tdep.c (microblaze_register_names): Added
the rshr and rslr register names.
* gdb/microblaze-tdep.h (microblaze_reg_num): Addition of
field MICROBLAZE_SLR_REGNUM and MICROBLAZE_SHR_REGNUM.
(microblaze_frame_cache): Change in the index of
register_offsets.
* gdb/regformats/reg-microblaze.dat: New Register data file.
Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
Thanks & Regards
Ajit
-----Original Message-----
From: Ajit Kumar Agarwal
Sent: Wednesday, May 21, 2014 6:25 PM
To: 'Michael Eager'; Michael Eager; gdb-patches@sourceware.org; Joel Brobecker
Cc: Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: RE: [Patch, microblaze]: Add slr and shr regs and little-endian breakpoint
-----Original Message-----
From: Michael Eager [mailto:eager@eagerm.com]
Sent: Wednesday, May 21, 2014 1:18 PM
To: Ajit Kumar Agarwal; Michael Eager; gdb-patches@sourceware.org; Joel Brobecker
Cc: Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze]: Add slr and shr regs and little-endian breakpoint
On 05/20/14 23:20, Ajit Kumar Agarwal wrote:
>
>
> On 05/20/14 09:25, Ajit Kumar Agarwal wrote:
>> Hello Joel:
>>
>> I have split the patches as you have recommended and the following is the first of the patch.
>>
>> [Patch, microblaze]: Add slr and shr regs and little-endian
>> breakpoint
>
>>> What is the relationship between adding slr/shr registers and little-endian breapoints?
>
> The shr/slr registers and little endian breakpoints are related as it
> fixed the common problem of Packet Transfer error when connecting to the target remote host through tar remote in gdb for microblaze.
>>>What "common" problem? How do either of these changes related to a packet transfer error?
Here is the problem description. The problem is related to process_g_packet where the buf_len > 2 * rsa->sizeof_g_packet and throwing the Error that 'g' packet message reply is too long. This is because the buf_len calculated in the init_remote_state function for microblaze target is based On the sizeof_g_packet and remote_packet_size and the memory_packet_config->size. The sizeof_g_packet is 236 because the number of reg num is 59 and 2* sizeof_g_packet comes to 472 .With shr and shl entry and the buf_len is 472. This does not match the greater than conditional statement and works fine. Without shr and shl entry,the sizeof_g_packets comes to 57*4 *2 = 456. This doesn't match the criteria in the process_g_packet function leading to throwing of error message as " 'g' packet message reply is too long".
This is happening when tar remote machine:1234 command is run in gdb.
>>>These changes don't appear related. Split independent changes in to separate patches.
I will split the changes and send the separate patch with shr and shl reg changes and the little endian breakpoint support.
Thanks & Regards
Ajit
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
[-- Attachment #2: 0001-Patch-microblaze-Add-slr-and-shr-regs.patch --]
[-- Type: application/octet-stream, Size: 4179 bytes --]
From 1c7e6cf6490caee5c01c32ba21f01e3c0ce0d01e Mon Sep 17 00:00:00 2001
From: Ajit Kumar Agarwal <ajitkum@xhdspdgnu.(none)>
Date: Wed, 21 May 2014 18:55:23 +0530
Subject: [PATCH] [Patch, microblaze]: Add slr and shr regs
ChangeLog:
2014-05-20 Ajit Agarwal <ajitkum@xilinx.com>
* gdb/gdbserver/Makefile.in (microblaze-linux.c): New rule.
* gdb/microblaze-tdep.c (microblaze_register_names): Added
the rshr and rslr register names.
* gdb/microblaze-tdep.h (microblaze_reg_num): Addition of
field MICROBLAZE_SLR_REGNUM and MICROBLAZE_SHR_REGNUM.
(microblaze_frame_cache): Change in the index of
register_offsets.
* gdb/regformats/reg-microblaze.dat: New Register data file.
Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
---
gdb/gdbserver/Makefile.in | 5 +++-
gdb/microblaze-tdep.c | 3 +-
gdb/microblaze-tdep.h | 6 +++-
gdb/regformats/reg-microblaze.dat | 41 +++++++++++++++++++++++++++++++++++++
4 files changed, 51 insertions(+), 4 deletions(-)
create mode 100644 gdb/regformats/reg-microblaze.dat
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index f773fa2..2454003 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -348,7 +348,8 @@ clean:
rm -f amd64-avx.c amd64-avx-linux.c
rm -f amd64-mpx.c amd64-mpx-linux.c
rm -f amd64-avx512.c amd64-avx512-linux.c
- rm -f i386-mmx.c i386-mmx-linux.c
+ rm -f i386-mmx.c i386-mmx-linux.c
+ rm -f microblaze-linux.c
rm -f x32.c x32-linux.c
rm -f x32-avx.c x32-avx-linux.c
rm -f x32-avx512.c x32-avx512-linux.c
@@ -614,6 +615,8 @@ reg-cf.c : $(srcdir)/../regformats/reg-cf.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-cf.dat reg-cf.c
mips-linux.c : $(srcdir)/../regformats/mips-linux.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/mips-linux.dat mips-linux.c
+microblaze-linux.c : $(srcdir)/../regformats/reg-microblaze.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-microblaze.dat mips-linux.c
mips-dsp-linux.c : $(srcdir)/../regformats/mips-dsp-linux.dat $(regdat_sh)
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/mips-dsp-linux.dat mips-dsp-linux.c
mips64-linux.c : $(srcdir)/../regformats/mips64-linux.dat $(regdat_sh)
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 14c1b52..4d63909 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -73,7 +73,8 @@ static const char *microblaze_register_names[] =
"rpc", "rmsr", "rear", "resr", "rfsr", "rbtr",
"rpvr0", "rpvr1", "rpvr2", "rpvr3", "rpvr4", "rpvr5", "rpvr6",
"rpvr7", "rpvr8", "rpvr9", "rpvr10", "rpvr11",
- "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi"
+ "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi",
+ "rslr", "rshr"
};
#define MICROBLAZE_NUM_REGS ARRAY_SIZE (microblaze_register_names)
diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h
index a532092..f7acfd6 100644
--- a/gdb/microblaze-tdep.h
+++ b/gdb/microblaze-tdep.h
@@ -42,7 +42,7 @@ struct microblaze_frame_cache
int fp_regnum;
/* Offsets to saved registers. */
- int register_offsets[57]; /* Must match MICROBLAZE_NUM_REGS. */
+ int register_offsets[59]; /* Must match MICROBLAZE_NUM_REGS. */
/* Table of saved registers. */
struct trad_frame_saved_reg *saved_regs;
@@ -107,7 +107,9 @@ enum microblaze_regnum
MICROBLAZE_RTLBX_REGNUM,
MICROBLAZE_RTLBSX_REGNUM,
MICROBLAZE_RTLBLO_REGNUM,
- MICROBLAZE_RTLBHI_REGNUM
+ MICROBLAZE_RTLBHI_REGNUM,
+ MICROBLAZE_SLR_REGNUM,
+ MICROBLAZE_SHR_REGNUM
};
/* All registers are 32 bits. */
diff --git a/gdb/regformats/reg-microblaze.dat b/gdb/regformats/reg-microblaze.dat
new file mode 100644
index 0000000..936bc44
--- /dev/null
+++ b/gdb/regformats/reg-microblaze.dat
@@ -0,0 +1,41 @@
+name:microblaze
+expedite:r1,pc
+32:r0
+32:r1
+32:r2
+32:r3
+32:r4
+32:r5
+32:r6
+32:r7
+32:r8
+32:r9
+32:r10
+32:r11
+32:r12
+32:r13
+32:r14
+32:r15
+32:r16
+32:r17
+32:r18
+32:r19
+32:r20
+32:r21
+32:r22
+32:r23
+32:r24
+32:r25
+32:r26
+32:r27
+32:r28
+32:r29
+32:r30
+32:r31
+32:pc
+32:msr
+32:ear
+32:esr
+32:fsr
+32:slr
+32:shr
--
1.7.1
next prev parent reply other threads:[~2014-05-21 13:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 16:25 Ajit Kumar Agarwal
2014-05-20 21:14 ` Michael Eager
2014-05-21 6:20 ` Ajit Kumar Agarwal
2014-05-21 7:47 ` Michael Eager
2014-05-21 12:55 ` Ajit Kumar Agarwal
2014-05-21 13:45 ` Joel Brobecker
2014-05-22 17:58 ` Ajit Kumar Agarwal
2014-05-22 19:44 ` Michael Eager
2014-05-23 4:17 ` Ajit Kumar Agarwal
2014-05-23 5:57 ` Eli Zaretskii
2014-05-23 7:21 ` Michael Eager
2014-05-23 7:35 ` Eli Zaretskii
2014-05-21 13:41 ` Ajit Kumar Agarwal [this message]
2014-05-21 14:06 ` Pedro Alves
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=f074d924-496d-4c10-97e4-0e6e3d069039@BY2FFO11FD034.protection.gbl \
--to=ajit.kumar.agarwal@xilinx.com \
--cc=brobecker@adacore.com \
--cc=eager@eagercon.com \
--cc=eager@eagerm.com \
--cc=gdb-patches@sourceware.org \
--cc=nmekala@xilinx.com \
--cc=vidhum@xilinx.com \
--cc=vinodk@xilinx.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