Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>,
	       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 14:06:00 -0000	[thread overview]
Message-ID: <537CB29E.6060909@redhat.com> (raw)
In-Reply-To: <f074d924-496d-4c10-97e4-0e6e3d069039@BY2FFO11FD034.protection.gbl>

On 05/21/2014 02:40 PM, Ajit Kumar Agarwal wrote:
> 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

> ChangeLog:
> 2014-05-20 Ajit Agarwal <ajitkum@xilinx.com>
> 
> 	* gdb/gdbserver/Makefile.in (microblaze-linux.c): New rule.

gdb and gdbserver each have their own ChangeLog files.  Filenames
in entries should be relative to the corresponding ChangeLog file.

So:

 	* Makefile.in (microblaze-linux.c): New rule.

But looks like microblaze-linux.c is missing from the patch?

> 
> 	* gdb/microblaze-tdep.c (microblaze_register_names): Added
> 	the rshr and rslr register names.

And:
 	* microblaze-tdep.c (microblaze_register_names): Added
 	the rshr and rslr register names.

But use present tense "Add".

> 
> 	* gdb/microblaze-tdep.h (microblaze_reg_num): Addition of
> 	field MICROBLAZE_SLR_REGNUM and MICROBLAZE_SHR_REGNUM.

	* microblaze-tdep.h (microblaze_reg_num): Add
	MICROBLAZE_SLR_REGNUM and MICROBLAZE_SHR_REGNUM.


> 	(microblaze_frame_cache): Change in the index of
> 	register_offsets.

What change?

> 
> 	* gdb/regformats/reg-microblaze.dat: New Register data file.

What for upper/lower case mixups.  "New file." is sufficient though:

 	* regformats/reg-microblaze.dat: New file.

>    /* Offsets to saved registers.  */
> -  int register_offsets[57];	/* Must match MICROBLAZE_NUM_REGS.  */
> +  int register_offsets[59];	/* Must match MICROBLAZE_NUM_REGS.  */

How about we let the compiler worry about this?

Define MICROBLAZE_NUM_REGS like:

enum microblaze_regnum
...
  MICROBLAZE_RTLBX_REGNUM,
  MICROBLAZE_RTLBSX_REGNUM,
  MICROBLAZE_RTLBLO_REGNUM,
  MICROBLAZE_RTLBHI_REGNUM
  MICROBLAZE_RTLBHI_REGNUM,
  MICROBLAZE_SLR_REGNUM,
  MICROBLAZE_SHR_REGNUM
+
+  MICROBLAZE_NUM_REGS

And then you can write:

  int register_offsets[MICROBLAZE_NUM_REGS];

But, most importantly, I've no clue what these slr and
shr registers are, but, do all microblaze cpus have those?

-- 
Pedro Alves


      reply	other threads:[~2014-05-21 14:06 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
2014-05-21 14:06         ` Pedro Alves [this message]

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=537CB29E.6060909@redhat.com \
    --to=palves@redhat.com \
    --cc=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