From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2750 invoked by alias); 17 Jun 2014 18:13:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2733 invoked by uid 89); 17 Jun 2014 18:13:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-by2-obe.outbound.protection.outlook.com Received: from mail-by2lp0237.outbound.protection.outlook.com (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.163.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 17 Jun 2014 18:13:06 +0000 Received: from BN1AFFO11FD045.protection.gbl (10.58.52.30) by BN1AFFO11HUB040.protection.gbl (10.58.52.151) with Microsoft SMTP Server (TLS) id 15.0.959.15; Tue, 17 Jun 2014 18:13:03 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BN1AFFO11FD045.mail.protection.outlook.com (10.58.53.60) with Microsoft SMTP Server (TLS) id 15.0.959.15 via Frontend Transport; Tue, 17 Jun 2014 18:13:04 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1Wwxsh-0006X6-Bp; Tue, 17 Jun 2014 11:13:15 -0700 From: Ajit Kumar Agarwal 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. Date: Tue, 17 Jun 2014 18:13:00 -0000 References: <41df2189-0a72-4543-ba31-297f81e663d7@BN1AFFO11FD025.protection.gbl> <53A04753.5010102@redhat.com> <53A06E16.2020603@redhat.com> <6e827cdb-8f1d-4341-9891-78a471a4d14f@BY2FFO11FD033.protection.gbl> <53A07246.7010405@redhat.com> Content-Type: multipart/mixed; boundary="_002_37378DC5BCD0EE48BA4B082E0B55DFAA40B8B90EXAPPVEXMBX01xln_" MIME-Version: 1.0 X-RCIS-Action: ALLOW Message-ID: <9f804e53-b4a5-4f72-9260-cdacf4fb60c5@BN1AFFO11FD045.protection.gbl> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(6009001)(438001)(199002)(189002)(479174003)(377454003)(377424004)(51704005)(24454002)(13464003)(83322001)(19580405001)(6806004)(44976005)(21056001)(31966008)(19580395003)(81342001)(71186001)(70736001)(4396001)(81542001)(74502001)(74662001)(80022001)(46102001)(33646001)(85852003)(83072002)(77096002)(551934003)(53416004)(1496007)(93886003)(84326002)(87936001)(512954002)(2656002)(568964001)(104016002)(31696002)(99396002)(95666004)(86362001)(50986999)(77982001)(99936001)(76482001)(64706001)(92726001)(20776003)(92566001)(54356999)(79102001)(85306003)(74316001)(76176999);DIR:OUT;SFP:;SCL:1;SRVR:BN1AFFO11HUB040;H:xsj-pvapsmtpgw01;FPR:;MLV:sfv;PTR:unknown-60-83.xilinx.com;A:1;MX:1;LANG:en; X-OriginatorOrg: xilinx.onmicrosoft.com X-Microsoft-Antispam: BL:0;ACTION:Default;RISK:Low;SCL:0;SPMLVL:NotSpam;PCL:0;RULEID: X-Forefront-PRVS: 0245702D7B Received-SPF: Pass (: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=ajit.kumar.agarwal@xilinx.com; X-SW-Source: 2014-06/txt/msg00633.txt.bz2 --_002_37378DC5BCD0EE48BA4B082E0B55DFAA40B8B90EXAPPVEXMBX01xln_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-length: 4262 Sorry Pedro. The ChangeLog was missing. Could you please review and let m= e know if its okay. [Patch, microblaze]: Use target_read_code in microblaze_fetch_instructi= on =20=20=20=20 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. =20=20=20=20 ChangeLog: 2014-06-17 Ajit Agarwal =20=20=20=20 * microblaze-tdep.c (microblaze_fetch_instruction): Use of target_read_code. =20=20=20=20 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]; =20 /* 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; =20 return extract_unsigned_integer (buf, 4, byte_order); --=20 1.7.1 Thanks & Regards Ajit -----Original Message----- From: Ajit Kumar Agarwal=20 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 tar= get. Hello Pedro: Review feedback are incorporated. Could you please review and let me know i= f its okay. [Patch, microblaze]: Use target_read_code in microblaze_fetch_instruction This patch uses target_read_code instead of target_read_memory in microblaz= e_fetch instruction in order to use cache memory accesses requested in targ= et_read_code. ChangeLog: 2014-06-17 Ajit Agarwal --- 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..4= e5b2d5 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]; =20 /* 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; =20 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 tar= get. On 06/17/2014 05:49 PM, Ajit Kumar Agarwal wrote: >=20 >=20 > -----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=20 > Mekala > Subject: Re: [Patch, microblaze]: Communicate in larger blocks with the t= arget. >=20 > 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.=20=20=20=20 >>> >>> [Patch, microblaze]: Communicate in larger blocks with the target. >>>=20=20=20=20=20 >>> Communicate in larger blocks with the target. The chunk of memory >>> will be read from the target and then used in microblaze_analyze_pr= ologue. >>> The above process minimizes the transaction with the Debug Agent. >> >> We have core infrustructure for this now, in the form of a code cache=20 >> that reads ahead. Could you try using it? >> All you have to do is replace target_read_memory calls that are=20 >> actually reading code, with target_read_code calls. See i386-tdep.c=20 >> for example. >=20 >>> 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 nece= ssary. >=20 > Thanks Pedro !!. Would you mind explaining this in detail. See 0865b04a4dec8a458bee54081b5598a6268b0724. -- Pedro Alves --_002_37378DC5BCD0EE48BA4B082E0B55DFAA40B8B90EXAPPVEXMBX01xln_ Content-Type: application/octet-stream; name="0001-Patch-microblaze-Use-target_read_code-in-microblaze_.patch" Content-Description: 0001-Patch-microblaze-Use-target_read_code-in-microblaze_.patch Content-Disposition: attachment; filename="0001-Patch-microblaze-Use-target_read_code-in-microblaze_.patch"; size=1168; creation-date="Tue, 17 Jun 2014 18:06:40 GMT"; modification-date="Tue, 17 Jun 2014 18:03:21 GMT" Content-Transfer-Encoding: base64 Content-length: 1586 RnJvbSA5YzYyOWM1NTE3MGUwZjBhODE2NWQxMjQ1YjkzMjZhMDNhMGQzMjdi IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBaml0IEt1bWFyIEFn YXJ3YWwgPGFqaXRrdW1AeGhkc3BkZ251Lihub25lKT4KRGF0ZTogVHVlLCAx NyBKdW4gMjAxNCAyMzoyOTo0NCArMDUzMApTdWJqZWN0OiBbUEFUQ0hdIFtQ YXRjaCwgbWljcm9ibGF6ZV06IFVzZSB0YXJnZXRfcmVhZF9jb2RlIGluIG1p Y3JvYmxhemVfZmV0Y2hfaW5zdHJ1Y3Rpb24KClRoaXMgcGF0Y2ggdXNlcyB0 YXJnZXRfcmVhZF9jb2RlIGluc3RlYWQgb2YgdGFyZ2V0X3JlYWRfbWVtb3J5 IGluCm1pY3JvYmxhemVfZmV0Y2ggaW5zdHJ1Y3Rpb24gaW4gb3JkZXIgdG8g dXNlIGNhY2hlIG1lbW9yeSBhY2Nlc3NlcwpyZXF1ZXN0ZWQgaW4gdGFyZ2V0 X3JlYWRfY29kZS4KCkNoYW5nZUxvZzoKMjAxNC0wNi0xNyBBaml0IEFnYXJ3 YWwgPGFqaXRrdW1AeGlsaW54LmNvbT4KCgkqIG1pY3JvYmxhemUtdGRlcC5j IChtaWNyb2JsYXplX2ZldGNoX2luc3RydWN0aW9uKTogVXNlIG9mCgl0YXJn ZXRfcmVhZF9jb2RlLgoKU2lnbmVkLW9mZ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