From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12378 invoked by alias); 30 Sep 2014 14:21:04 -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 12368 invoked by uid 89); 30 Sep 2014 14:21:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-by2-obe.outbound.protection.outlook.com Received: from mail-by2on0072.outbound.protection.outlook.com (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.100.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 30 Sep 2014 14:21:02 +0000 Received: from BL2FFO11FD015.protection.gbl (10.173.160.31) by BL2FFO11HUB011.protection.gbl (10.173.161.117) with Microsoft SMTP Server (TLS) id 15.0.1029.15; Tue, 30 Sep 2014 14:20:59 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2FFO11FD015.mail.protection.outlook.com (10.173.160.223) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 30 Sep 2014 14:20:59 +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 1XYyGv-0002bk-92; Tue, 30 Sep 2014 07:19:21 -0700 From: Ajit Kumar Agarwal To: Pedro Alves , Michael Eager , Joel Brobecker CC: "gdb-patches@sourceware.org" , Vinod Kathail , Vidhumouli Hunsigida , "Nagaraju Mekala" Subject: RE: [Patch, microblaze]: Port of Linux gdbserver Date: Tue, 30 Sep 2014 14:21:00 -0000 References: <2570e3c7-f55b-45cd-aa6e-7f4fa145f32a@BN1BFFO11FD002.protection.gbl> <541052B5.5080503@eagercon.com> <20140910134606.GO28404@adacore.com> <050c6461-c35c-441d-9b63-7636d9164e2e@BL2FFO11FD048.protection.gbl> <20140910144313.GP28404@adacore.com> <89d100d8-4ebd-4f50-b5e9-59312124db6a@BL2FFO11FD057.protection.gbl> <54131362.1050009@eagercon.com> <54186D95.4000301@redhat.com> <84be59b9-9f3c-4789-8313-ca3b6061cd1d@BY2FFO11FD003.protection.gbl> <54194300.5090908@redhat.com> <517d120e-6565-406f-acc6-186bb63342fe@BN1BFFO11FD026.protection.gbl> <542A9762.1060407@redhat.com> <908982d6-5edf-45ec-add7-87ae9aac8f95@BL2FFO11FD017.protection.gbl> <542AB217.9040307@redhat.com> In-Reply-To: <542AB217.9040307@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-RCIS-Action: ALLOW Message-ID: X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(438002)(199003)(377454003)(51704005)(164054003)(479174003)(24454002)(189002)(13464003)(77096002)(85852003)(86362001)(21056001)(76176999)(92726001)(2656002)(50986999)(53416004)(70736001)(1496007)(106466001)(87936001)(54356999)(92566001)(19580405001)(6806004)(44976005)(64706001)(19580395003)(31696002)(31966008)(10300001)(50466002)(20776003)(85306004)(46102003)(47776003)(93886004)(74316001)(107046002)(95666004)(23676002)(106116001)(120916001)(80022003)(4396001)(15975445006)(76482002)(104016003)(99396003)(107986001)(23106004);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2FFO11HUB011;H:xsj-pvapsmtpgw01;FPR:;MLV:sfv;PTR:unknown-60-83.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 0350D7A55D Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; 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-OriginatorOrg: xilinx.com X-SW-Source: 2014-09/txt/msg00897.txt.bz2 SGVsbG8gUGVkcm86DQoNCldlIGhhdmUgaG9saWRheXMgaW4gSW5kaWEgdGls bCBNb25kYXkuIEkgd2lsbCBzZW5kIHRoZSB1cGRhdGVkIGFuZCBuZXcgcGF0 Y2hlcyBieSBUdWVzZGF5KCA3dGggT2N0IDIwMTQpLg0KDQpUaGFua3MgJiBS ZWdhcmRzDQpBaml0DQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpG cm9tOiBQZWRybyBBbHZlcyBbbWFpbHRvOnBhbHZlc0ByZWRoYXQuY29tXSAN ClNlbnQ6IFR1ZXNkYXksIFNlcHRlbWJlciAzMCwgMjAxNCA3OjA3IFBNDQpU bzogQWppdCBLdW1hciBBZ2Fyd2FsOyBNaWNoYWVsIEVhZ2VyOyBKb2VsIEJy b2JlY2tlcg0KQ2M6IGdkYi1wYXRjaGVzQHNvdXJjZXdhcmUub3JnOyBWaW5v ZCBLYXRoYWlsOyBWaWRodW1vdWxpIEh1bnNpZ2lkYTsgTmFnYXJhanUgTWVr YWxhDQpTdWJqZWN0OiBSZTogW1BhdGNoLCBtaWNyb2JsYXplXTogUG9ydCBv ZiBMaW51eCBnZGJzZXJ2ZXINCg0KT24gMDkvMzAvMjAxNCAwMjoyNyBQTSwg QWppdCBLdW1hciBBZ2Fyd2FsIHdyb3RlOg0KPiANCj4gDQo+PiA+IGRpZmYg LS1naXQgYS9nZGIvcmVnZm9ybWF0cy9taWNyb2JsYXplLXdpdGgtc3RhY2st cHJvdGVjdC5kYXQNCj4+ID4gYi9nZGIvcmVnZm9ybWF0cy9taWNyb2JsYXpl LXdpdGgtc3RhY2stcHJvdGVjdC5kYXQNCj4+ID4gaW5k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o/PyAg Tm8sIHlvdSBoYXZlbid0IGNyZWF0ZWQgaXQuICBJdCdzIGFscmVhZHkgaW4g dGhlIHRyZWUuDQoNClBsZWFzZSBzZW5kIGEgc2VwYXJhdGUgcGF0Y2ggdGhh dCBlZGl0cyBnZGIvZmVhdHVyZXMvTWFrZWZpbGUsIHdoZXJlIGl0IHJlYWRz Og0KDQogbWljcm9ibGF6ZS1leHBlZGl0ZSA9IHIxLHBjDQoNCmFuZCB0aGF0 IHJlZ2VuZXJhdGVzIHRoZSAuZGF0IGZpbGUgd2l0aCB0aGF0IE1ha2VmaWxl Lg0KDQo+IA0KPiBUaGFua3MgICYgUmVnYXJkcw0KPiBBaml0DQo+IA0KPj4g PiAgbmFtZTptaWNyb2JsYXplX3dpdGhfc3RhY2tfcHJvdGVjdA0KPj4gPiAg eG1sdGFyZ2V0Om1pY3JvYmxhemUtd2l0aC1zdGFjay1wcm90ZWN0LnhtbA0K Pj4gPiAtZXhwZWRpdGU6cjEscGMNCj4+ID4gK2V4cGVkaXRlOnIxLHJwYw0K Pj4gPiAgMzI6cjANCj4+ID4gIDMyOnIxDQo+PiA+ICAzMjpyMg0KPj4gPiAt LSAxLjcuMQ0KPj4gPiANCg0KDQpUaGFua3MsDQpQZWRybyBBbHZlcw0K >From gdb-patches-return-116307-listarch-gdb-patches=sources.redhat.com@sourceware.org Tue Sep 30 14:24:36 2014 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 17288 invoked by alias); 30 Sep 2014 14:24:35 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 17272 invoked by uid 89); 30 Sep 2014 14:24:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Sep 2014 14:24:34 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 30 Sep 2014 07:24:07 -0700 X-ExtLoop1: 1 Received: from wtedesch-mobl2.ger.corp.intel.com (HELO [172.28.205.47]) ([172.28.205.47]) by fmsmga002.fm.intel.com with ESMTP; 30 Sep 2014 07:24:04 -0700 Message-ID: <542ABD03.7060707@intel.com> Date: Tue, 30 Sep 2014 14:24:00 -0000 From: Walfred Tedeschi User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Eli Zaretskii CC: palves@redhat.com, mark.kettenis@xs4all.nl, gdb-patches@sourceware.org Subject: Re: [PATCH] Add support for bound table in the Intel MPX context. References: <1412062148-22808-1-git-send-email-walfred.tedeschi@intel.com> <83vbo5kxal.fsf@gnu.org> In-Reply-To: <83vbo5kxal.fsf@gnu.org> Content-Type: text/plain; charset="iso-8859-15"; format="flowed" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00898.txt.bz2 Content-length: 4424 Am 9/30/2014 4:17 PM, schrieb Eli Zaretskii: Eli, Thank you very much for your prompt review. See my answers below: >> From: Walfred Tedeschi >> Cc: gdb-patches@sourceware.org, Walfred Tedeschi >> Date: Tue, 30 Sep 2014 09:29:08 +0200 >> >> In order to investigate the contents of the MPX boundary table two new c= ommands >> are added to GDB. "mpx-info-bounds" and "mpx-set-bounds" are used to di= splay >> and set values on the MPX bound table. > Thanks. > >> * NEWS: List new commands for MPX support. > I don't see this part in the changeset you've sent. I think it has got lost will add it! >> doc: >> * gdb.texinfo: Add documentation about "mpx-info-bounds" >> and "mpx-set-bounds" > Please state the name of the node in which you make the changes (as if > it were a function). Ok! >> --- a/gdb/doc/gdb.texinfo >> +++ b/gdb/doc/gdb.texinfo >> @@ -21482,6 +21482,16 @@ be returned in a register. >> @kindex show struct-convention >> Show the current setting of the convention to return @code{struct}s >> from functions. >> + >> +@item mpx-info-bound @var{pointer storage} > Shouldn't this go into the next subsection, which describes features > specific to the MPX support? Yes it should! Will move. >> +@kindex mpx-info-bound >> +Displays the bounds of a pointer given its storage. > What is a "pointer's storage"? We should explain that here, otherwise > this text is entirely unclear. I also think that we should say a bit > more about the bounds, so that readers will understand what this > feature is about and how to use it to their advantage. > >> +@item mpx-set-bound @var{storage} @var{lbound} @var{ubound} >> +@kindex mpx-set-bound >> +Set the bounds of a pointer in the map given its storage. This command = takes > ^^ > Two spaces between sentences, please. Sorry! >> +three parameters @var{storage} is the pointers storage and @var{lbound}= and > Please add a colon ":" after "parameters", and a comma "," between > "storage" and "and". > >> +@var{ubound} are lower and upper bounds new values respectivelly. > "are the new values for the lower and the upper bound, respectively" > > (Only 1 'l' in "respectively".) > >> +static void >> +i386_mpx_set_bounds (char *args, int from_tty) >> +{ >> + CORE_ADDR bd_base =3D 0; >> + CORE_ADDR addr, lower, upper; >> + CORE_ADDR bt_entry_addr =3D 0; >> + CORE_ADDR bt_entry[4]; >> + int ret; >> + char *addr_str, *lower_str, *upper_str, *tmp; >> + >> + if (!i386_mpx_enabled ()) >> + error ("MPX not supported on this target."); >> + >> + if (!args) >> + error ("Address of pointer variable expected."); >> + >> + addr_str =3D strtok (args, " "); >> + if (!addr_str) >> + error ("Missing address of the pointer in the command."); >> + >> + lower_str =3D strtok (NULL, " "); >> + if (!lower_str) >> + error ("Missing lower bound in the command."); >> + >> + upper_str =3D strtok (NULL, " "); >> + if (!upper_str) >> + error ("Missing upper bound in the command."); >> + >> + addr =3D parse_and_eval_address (addr_str); >> + lower =3D parse_and_eval_address (lower_str); >> + upper =3D parse_and_eval_address (upper_str); >> + >> + bd_base =3D i386_mpx_bd_base (); >> + bt_entry_addr =3D i386_mpx_get_bt_entry (addr, bd_base); >> + >> + ret =3D target_read_memory (bt_entry_addr, (gdb_byte *) bt_entry, >> + sizeof (bt_entry)); >> + if (ret) >> + error ("Cannot read bounds table entry at 0x%lx", (long) bt_entry_a= ddr); >> + >> + bt_entry[0] =3D (uint64_t) lower; >> + bt_entry[1] =3D ~(uint64_t) upper; >> + >> + ret =3D target_write_memory (bt_entry_addr, (gdb_byte *) bt_entry, >> + sizeof (bt_entry)); >> + >> + if (ret) >> + error ("Cannot write bounds table entry at 0x%lx", (long) bt_entry_= addr); >> + else >> + i386_mpx_print_bounds (bt_entry); >> +} > Why aren't error messages in this function inside _() ? Have to fix it! Thanks a lot again! For the next review you will see all those changes addressed. Best regards, -Fred Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052