public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Ajit Kumar Agarwal <ajit.kumar.agarwal@xilinx.com>
To: Pedro Alves <palves@redhat.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Cc: Michael Eager <eager@eagercon.com>,
	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 18:13:00 -0000	[thread overview]
Message-ID: <9f804e53-b4a5-4f72-9260-cdacf4fb60c5@BN1AFFO11FD045.protection.gbl> (raw)
In-Reply-To: <53A07246.7010405@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4274 bytes --]

Sorry Pedro. The ChangeLog  was missing. Could you please review  and let me know if its okay.

    [Patch, microblaze]: Use target_read_code in microblaze_fetch_instruction
    
    This patch uses target_read_code instead of target_read_memory in
    microblaze_fetch instruction in order to use cache memory accesses
    requested in target_read_code.
    
    ChangeLog:
    2014-06-17 Ajit Agarwal <ajitkum@xilinx.com>
    
        * microblaze-tdep.c (microblaze_fetch_instruction): Use of
        target_read_code.
    
    Signed-off-by:Ajit Agarwal ajitkum@xilinx.com

---
 gdb/microblaze-tdep.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 14c1b52..4e5b2d5 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -126,7 +126,7 @@ microblaze_fetch_instruction (CORE_ADDR pc)
   gdb_byte buf[4];
 
   /* If we can't read the instruction at PC, return zero.  */
-  if (target_read_memory (pc, buf, sizeof (buf)))
+  if (target_read_code (pc, buf, sizeof (buf)))
     return 0;
 
   return extract_unsigned_integer (buf, 4, byte_order);
-- 
1.7.1

Thanks & Regards
Ajit
-----Original Message-----
From: Ajit Kumar Agarwal 
Sent: Tuesday, June 17, 2014 11:40 PM
To: 'Pedro Alves'; gdb-patches@sourceware.org
Cc: Michael Eager; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: RE: [Patch, microblaze]: Communicate in larger blocks with the target.

Hello Pedro:

Review feedback are incorporated. Could you please review and let me know if its okay.

[Patch, microblaze]: Use target_read_code in microblaze_fetch_instruction

This patch uses target_read_code instead of target_read_memory in microblaze_fetch instruction in order to use cache memory accesses requested in target_read_code.

ChangeLog:
2014-06-17 Ajit Agarwal <ajitkum@xilinx.com>

---
 gdb/microblaze-tdep.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 14c1b52..4e5b2d5 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -126,7 +126,7 @@ microblaze_fetch_instruction (CORE_ADDR pc)
   gdb_byte buf[4];
 
   /* If we can't read the instruction at PC, return zero.  */
-  if (target_read_memory (pc, buf, sizeof (buf)))
+  if (target_read_code (pc, buf, sizeof (buf)))
     return 0;
 
   return extract_unsigned_integer (buf, 4, byte_order);
--
1.7.1
-----Original Message-----
From: Pedro Alves [mailto:palves@redhat.com]
Sent: Tuesday, June 17, 2014 10:22 PM
To: Ajit Kumar Agarwal; gdb-patches@sourceware.org
Cc: Michael Eager; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze]: Communicate in larger blocks with the target.

On 06/17/2014 05:49 PM, Ajit Kumar Agarwal wrote:
> 
> 
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Tuesday, June 17, 2014 10:05 PM
> To: Pedro Alves; Ajit Kumar Agarwal; gdb-patches@sourceware.org
> Cc: Michael Eager; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju 
> Mekala
> Subject: Re: [Patch, microblaze]: Communicate in larger blocks with the target.
> 
> On 06/17/2014 02:49 PM, Pedro Alves wrote:
>> On 06/17/2014 10:03 AM, 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.
>>
>> We have core infrustructure for this now, in the form of a code cache 
>> that reads ahead.  Could you try using it?
>> All you have to do is replace target_read_memory calls that are 
>> actually reading code, with target_read_code calls.  See i386-tdep.c 
>> for example.
> 
>>> To be clear, I'm not talking about changing the new calls in your patch, but instead, to change the existing calls.  Then your patch won't be necessary.
> 
> Thanks Pedro !!.  Would you mind explaining this in detail.

See 0865b04a4dec8a458bee54081b5598a6268b0724.

--
Pedro Alves

[-- Attachment #2: 0001-Patch-microblaze-Use-target_read_code-in-microblaze_.patch --]
[-- Type: application/octet-stream, Size: 1168 bytes --]

From 9c629c55170e0f0a8165d1245b9326a03a0d327b Mon Sep 17 00:00:00 2001
From: Ajit Kumar Agarwal <ajitkum@xhdspdgnu.(none)>
Date: Tue, 17 Jun 2014 23:29:44 +0530
Subject: [PATCH] [Patch, microblaze]: Use target_read_code in microblaze_fetch_instruction

This patch uses target_read_code instead of target_read_memory in
microblaze_fetch instruction in order to use cache memory accesses
requested in target_read_code.

ChangeLog:
2014-06-17 Ajit Agarwal <ajitkum@xilinx.com>

	* microblaze-tdep.c (microblaze_fetch_instruction): Use of
	target_read_code.

Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
---
 gdb/microblaze-tdep.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 14c1b52..4e5b2d5 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -126,7 +126,7 @@ microblaze_fetch_instruction (CORE_ADDR pc)
   gdb_byte buf[4];
 
   /* If we can't read the instruction at PC, return zero.  */
-  if (target_read_memory (pc, buf, sizeof (buf)))
+  if (target_read_code (pc, buf, sizeof (buf)))
     return 0;
 
   return extract_unsigned_integer (buf, 4, byte_order);
-- 
1.7.1


  parent reply	other threads:[~2014-06-17 18:13 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 [this message]
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
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=9f804e53-b4a5-4f72-9260-cdacf4fb60c5@BN1AFFO11FD045.protection.gbl \
    --to=ajit.kumar.agarwal@xilinx.com \
    --cc=eager@eagercon.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nmekala@xilinx.com \
    --cc=palves@redhat.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).