From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6903 invoked by alias); 4 Dec 2011 07:09:18 -0000 Received: (qmail 6839 invoked by uid 22791); 4 Dec 2011 07:09:17 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm4-vm2.bullet.mail.ne1.yahoo.com (HELO nm4-vm2.bullet.mail.ne1.yahoo.com) (98.138.90.152) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sun, 04 Dec 2011 07:09:03 +0000 Received: from [98.138.90.50] by nm4.bullet.mail.ne1.yahoo.com with NNFMP; 04 Dec 2011 07:09:01 -0000 Received: from [98.138.89.175] by tm3.bullet.mail.ne1.yahoo.com with NNFMP; 04 Dec 2011 07:09:01 -0000 Received: from [127.0.0.1] by omp1031.mail.ne1.yahoo.com with NNFMP; 04 Dec 2011 07:09:01 -0000 Received: (qmail 75667 invoked by uid 60001); 4 Dec 2011 07:09:01 -0000 Received: from [49.249.176.38] by web112517.mail.gq1.yahoo.com via HTTP; Sat, 03 Dec 2011 23:09:00 PST References: <998639.46560.qm@web112516.mail.gq1.yahoo.com> <321260.58442.qm@web112504.mail.gq1.yahoo.com> <1316327455.23344.YahooMailNeo@web112509.mail.gq1.yahoo.com> <1316404058.27177.YahooMailNeo@web112502.mail.gq1.yahoo.com> <1318650316.91503.YahooMailNeo@web112508.mail.gq1.yahoo.com> <1322975560.12415.YahooMailNeo@web112518.mail.gq1.yahoo.com> Message-ID: <1322982540.64860.YahooMailNeo@web112517.mail.gq1.yahoo.com> Date: Sun, 04 Dec 2011 07:09:00 -0000 From: paawan oza Reply-To: paawan oza Subject: Re: [PATCH] arm reversible : To: =?iso-8859-1?Q?Petr_Hluz=EDn?= , oza Pawandeep Cc: Tom Tromey , "gdb-patches@sourceware.org" , chandra krishnappa In-Reply-To: <1322975560.12415.YahooMailNeo@web112518.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2011-12/txt/msg00093.txt.bz2 Hi Tom, Petr and Yao, I am working on following: 1) petr's comments, which I am planning to make new function now. 2) yao's comment on Changelog detailed stuff which I shall prepare seeing t= he guidelines. 3) Tom's comments are already fixed =A0(hope there are not much formatting = issues). will post the patch in a day or so.=A0 Thanks for your comments to make this patch look ok. Regards, Oza. ________________________________ From: Petr Hluz=EDn To: oza Pawandeep =20 Cc: Tom Tromey ; paawan oza ; "gdb= -patches@sourceware.org" ; chandra krishnappa <= chandra_roadking@yahoo.com>=20 Sent: Sunday, 4 December 2011 2:00 AM Subject: Re: [PATCH] arm reversible : On 3 December 2011 20:01, oza Pawandeep wrote: > Hi Tom and Petr, > > This patch includes both of your comments; I have worked both on > formatting and comments, and try to make the patch look ok. > the patch is derived from gdb-7.3.50.20111203 current snapshot. > In function decode_insn: > + > + =A0struct > + =A0 =A0{ > + =A0 =A0 =A0gdb_byte buf[insn_size]; > + =A0 =A0} u_buf; > + > + =A0uint32_t ret=3D0, insn_id =3D 0; > + > + =A0memset (&u_buf, 0, sizeof(u_buf)); > + =A0if (target_read_memory (arm_record->this_addr, &u_buf.buf[0], insn_s= ize)) I wonder why is there a `struct u_buf'. Having local variable `buf[insn_size];' would be sufficient and obvious. I am sorry to not discover that earlier. The same thing applies to arm_process_record(). In arm_process_record () > + > + =A0struct > + =A0 =A0 =A0{ > + =A0 =A0 =A0 =A0gdb_byte buf[2]; > + =A0 =A0 =A0} u_buf; > + > + =A0... > + > + =A0arm_record.arm_insn =3D (uint32_t) extract_unsigned_integer (&u_buf.= buf[0], > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 THU= MB_INSN_SIZE_BYTES , > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gdb= arch_byte_order (arm_record.gdbarch)); Well, when I said that you probably forgot to copy extract_unsigned_integer() I should have also said that you should have also copied the line target_read_memory (arm_record->this_addr, &u_buf.buf[0], insn_size) Right now extract_unsigned_integer() reads an uninitialized buffer. :-T --=20 Petr Hluzin