This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Microblaze: Replace microblaze-expedite from pc to rpc.



-----Original Message-----
From: Pedro Alves [mailto:palves@redhat.com] 
Sent: Wednesday, October 15, 2014 8:36 PM
To: Ajit Kumar Agarwal; gdb-patches@sourceware.org
Cc: Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [PATCH] Microblaze: Replace microblaze-expedite from pc to rpc.

On 10/13/2014 10:15 AM, Ajit Kumar Agarwal wrote:
> Please find the patch below based on Pedro suggestions.  
> 
>   Microblaze: Replace microblaze-expedite from pc to rpc.
>     
>     Replace microblaze-expedite from pc to rpc. The makefile and
>     the following commands are used to create microblaze-with-stack-protect.dat.

>>I'd like it that the commit log mentions _why_ this was necessary.


>     
>     make ../regformats/microblaze-with-stack-protect.dat
>     
>     gdb/
>     2014-10-13  Ajit Agarwal  <ajitkum@xilinx.com>
>     
>         * features/Makefile (microblaze-expedite): Replace
>         microblaze-expediate from pc to rpc.

>>typo: "expediate", but, the ()'s bit already gave the context.


>         * regformats/microblaze-with-stack-protect.dat: Created
>         using Makefile.

>>Please present tense.

Thanks Pedro for the suggestions.

>>I've fixed up these issues for you and pushed the patch as below.

>>gdb/features/microblaze.dat has the same problem...  But, AFAICS, your GDBserver port doesn't use that file, I'll just delete it.

Thanks Pedro for pushing in the patch.

>>Is there no way GDBserver could tell whether the machine has the stack protect registers?

Microblaze Linux Kernel doesn't have support for this like other Architectures.  If permissible would like to incorporate this feature in gdbserver later  once the Kernel support for this is done. In the meanwhile Can we goahead with this gdbserver patch if permissible.
-------
From 449aa9dfd1505925a4a5dfff470f24a17699b5bc Mon Sep 17 00:00:00 2001
From: Ajit Kumar Agarwal <Agarwalajitkum@xilinx.com>
Date: Mon, 13 Oct 2014 14:28:22 +0530
Subject: [PATCH] Microblaze: Replace microblaze-expedite from pc to rpc

The Microblaze PC register is called "rpc", not "pc", as can be seen in microblaze-core.xml.  Fix this, so GDBserver can find the register in the regcache.

gdb/
2014-10-15  Ajit Agarwal  <ajitkum@xilinx.com>

	* features/Makefile (microblaze-expedite): Replace pc with rpc.
	* regformats/microblaze-with-stack-protect.dat: Regenerate.
---
 gdb/ChangeLog                                    | 5 +++++
 gdb/features/Makefile                            | 2 +-
 gdb/regformats/microblaze-with-stack-protect.dat | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c4f0437..0d22b51 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-15  Ajit Agarwal  <ajitkum@xilinx.com>
+
+	* features/Makefile (microblaze-expedite): Replace pc with rpc.
+	* regformats/microblaze-with-stack-protect.dat: Regenerate.
+
 2014-10-15  Siva Chandra Reddy  <sivachandra@google.com>

 	* gnu-v3-abi.c (gnuv3_pass_by_reference): Treat dynamic classes diff --git a/gdb/features/Makefile b/gdb/features/Makefile index c17157b..7708f5b 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -103,7 +103,7 @@ mips-expedite = r29,pc  mips-dsp-expedite = r29,pc  mips64-expedite = r29,pc  mips64-dsp-expedite = r29,pc -microblaze-expedite = r1,pc
+microblaze-expedite = r1,rpc
 nios2-linux-expedite = sp,pc
 powerpc-expedite = r1,pc
 rs6000/powerpc-cell32l-expedite = r1,pc,r0,orig_r3,r4 diff --git a/gdb/regformats/microblaze-with-stack-protect.dat b/gdb/regformats/microblaze-with-stack-protect.dat
index 5ce0c24..8040a7b 100644
--- a/gdb/regformats/microblaze-with-stack-protect.dat
+++ b/gdb/regformats/microblaze-with-stack-protect.dat
@@ -2,7 +2,7 @@
 # Generated from: microblaze-with-stack-protect.xml  name:microblaze_with_stack_protect
 xmltarget:microblaze-with-stack-protect.xml
-expedite:r1,pc
+expedite:r1,rpc
 32:r0
 32:r1
 32:r2
--
1.9.3



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]