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: Tue, 17 Jun 2014 14:47:00 -0000 [thread overview]
Message-ID: <53A054ED.1010509@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.
There are coding standard issues:
1. Comments have space after opening /*, end with a period, two spaces, */.
2. Space before left paren in function call.
3. Space after cast.
There may be others. Please review GDB/GNU coding standards:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
+ n_insns = (stop == func_addr) ? 1 : ((stop - func_addr) / INST_WORD_SIZE);
...
for (addr = func_addr; addr < stop; addr += INST_WORD_SIZE)
It looks to me that if (stop == func_addr), this loop will not be executed.
If that's as intended, then there's no need for the conditional expression, and
likely execution of the function can be terminated early. If this is not intended,
then a gdb_assert (stop != func_addr) can be inserted and the conditional
expression removed.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
next prev parent reply other threads:[~2014-06-17 14:47 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 [this message]
2014-06-17 16:32 ` Tom Tromey
2014-07-23 18:56 ` Michael Eager
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=53A054ED.1010509@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).