Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagercon.com>
To: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>,
	 "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Vinod Kathail <vinodk@xilinx.com>,
	 Vidhumouli Hunsigida <vidhum@xilinx.com>,
	Nagaraju Mekala <nmekala@xilinx.com>
Subject: Re: [Patch, microblaze]: Communicate in larger blocks with the target.
Date: Wed, 23 Jul 2014 18:56:00 -0000	[thread overview]
Message-ID: <53D0043D.6030601@eagercon.com> (raw)
In-Reply-To: <41df2189-0a72-4543-ba31-297f81e663d7@BN1AFFO11FD025.protection.gbl>

On 06/17/14 02:03, Ajit Kumar Agarwal wrote:
> Please find the following patch.
>
>   [Patch, microblaze]: Communicate in larger blocks with the target.
>
>      Communicate in larger blocks with the target. The chunk of memory
>      will be read from the target and then used in microblaze_analyze_prologue.
>      The above process minimizes the transaction with the Debug Agent.
>
>      ChangeLog:
>      2014-06-17 Ajit Agarwal <ajitkum@xilinx.com>
>
>          * microblaze-tdep.c (microblaze_analyze_prologue): Use of
>          target_read_memory. Populate insn_block. Use of insn_block.
>
>      Signed-off-by:Ajit Agarwal ajitkum@xilinx.com

Please follow GNU coding conventions:

Remove trailing whitespace.

+  /*Do a block read to minimize the transaction with the Debug Agent */

Comments need space after /* and period and two spaces before */.

+  n_insns = (stop == func_addr) ? 1 : ((stop - func_addr) / INST_WORD_SIZE);

Recommend parens around conditional expression.

+  insn_block = (unsigned long *)calloc(n_insns, sizeof(unsigned long));
+  buf_block = (gdb_byte *)calloc(n_insns * INST_WORD_SIZE, sizeof(gdb_byte));

Spaces before function name.

+  for (ti = 0; ti < n_insns; ti++) {
+    insn_block[ti] = 0;
+    for (tj = ti * INST_WORD_SIZE; tj < (ti + 1) * INST_WORD_SIZE; tj++)
+      insn_block[ti] = (insn_block[ti] << 8) | buf_block[tj];
+  }

GNU does not use the "one true brace" format.  Please use GNU brace
and indent format.

+  free(insn_block);
+  free(buf_block);

Spaces before function name.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


  parent reply	other threads:[~2014-07-23 18:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17  9:03 Ajit Kumar Agarwal
2014-06-17 13:49 ` Pedro Alves
2014-06-17 16:34   ` Pedro Alves
2014-06-17 16:49     ` Ajit Kumar Agarwal
2014-06-17 16:52       ` Pedro Alves
2014-06-17 18:09         ` Ajit Kumar Agarwal
2014-06-17 18:13         ` Ajit Kumar Agarwal
2014-06-18  9:28           ` Pedro Alves
2014-07-24  2:39           ` Michael Eager
2014-06-17 14:47 ` Michael Eager
2014-06-17 16:32 ` Tom Tromey
2014-07-23 18:56 ` Michael Eager [this message]
2014-07-23 20:04   ` Michael Eager

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=53D0043D.6030601@eagercon.com \
    --to=eager@eagercon.com \
    --cc=ajit.kumar.agarwal@xilinx.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