From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21790 invoked by alias); 28 Aug 2009 01:57:12 -0000 Received: (qmail 21459 invoked by uid 22791); 28 Aug 2009 01:57:10 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f194.google.com (HELO mail-px0-f194.google.com) (209.85.216.194) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Aug 2009 01:57:05 +0000 Received: by pxi32 with SMTP id 32so1565772pxi.25 for ; Thu, 27 Aug 2009 18:57:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.74.16 with SMTP id w16mr26763wfa.200.1251424623070; Thu, 27 Aug 2009 18:57:03 -0700 (PDT) In-Reply-To: <4A97345F.1010508@vmware.com> References: <4A7BA1DE.6010103@vmware.com> <83eir1dnqw.fsf@gnu.org> <8363cbenvt.fsf@gnu.org> <4A95C927.8020607@vmware.com> <4A95D342.6070304@vmware.com> <4A97345F.1010508@vmware.com> From: Hui Zhu Date: Fri, 28 Aug 2009 02:14:00 -0000 Message-ID: Subject: Re: Bug in i386_process_record? To: Michael Snyder Cc: Eli Zaretskii , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2009-08/txt/msg00505.txt.bz2 On Fri, Aug 28, 2009 at 09:35, Michael Snyder wrote: > Hui Zhu wrote: >> >> On Thu, Aug 27, 2009 at 09:43, Hui Zhu wrote: >>> >>> On Thu, Aug 27, 2009 at 08:28, Michael Snyder wrote: >>>> >>>> Do you think you could add some new tests to i386-reverse.exp, >>>> to verify the string instructions? >>>> >>>> Thanks, >>>> Michael >>>> >>> OK. I will do it. >>> >>> Thanks, >>> Hui >>> >> >> Hi Michael, >> >> I make a patch to add the test for string insn. >> >> Please help me review it. > > Good start -- but you need to write some expect script to go with it! > ;-) Hi Michael, This patch can make inferior without string_insn_patch get fail in: gdb_test "continue" \ " end of main .*" \ "continue to end of main" Prec will get error in asm volatile("rep\n" line when continue. Do you think I need make string_insn test divide with inc_test in expect script? Thanks, Hui > > >> 2009-08-27 =A0Hui Zhu =A0 >> >> =A0 =A0 =A0 =A0* gdb.reverse/i386-reverse.c (string_insn_tests): New fun= ction. >> =A0 =A0 =A0 =A0(main): Call "string_insn_tests". >> >> --- >> =A0testsuite/gdb.reverse/i386-reverse.c | =A0 16 ++++++++++++++++ >> =A01 file changed, 16 insertions(+) >> >> --- a/testsuite/gdb.reverse/i386-reverse.c >> +++ b/testsuite/gdb.reverse/i386-reverse.c >> @@ -38,9 +38,25 @@ inc_dec_tests (void) >> =A0 asm ("dec %edi"); >> =A0} /* end inc_dec_tests */ >> >> +void >> +string_insn_tests (void) >> +{ >> + =A0register char x asm("ax"); >> + =A0char *dstp =3D (char *) 1; >> + =A0int d0; >> + =A0int len =3D 0; >> + >> + =A0asm volatile("rep\n" >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0"stosb" /* %0, %2, %3 */ : >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0"=3DD" (dstp), "=3Dc" (d0) : >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0"0" (dstp), "1" (len), "a" (x) : >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0"memory"); >> +} >> + >> =A0int >> =A0main () >> =A0{ >> =A0 inc_dec_tests (); >> + =A0string_insn_tests (); >> =A0 return 0; =A0 =A0/* end of main */ >> =A0} > >