From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30489 invoked by alias); 16 Jul 2009 02:43:49 -0000 Received: (qmail 30413 invoked by uid 22791); 16 Jul 2009 02:43:48 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.170) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jul 2009 02:43:40 +0000 Received: by wf-out-1314.google.com with SMTP id 23so1414770wfg.24 for ; Wed, 15 Jul 2009 19:43:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.234.16 with SMTP id g16mr2088174wfh.310.1247712218069; Wed, 15 Jul 2009 19:43:38 -0700 (PDT) In-Reply-To: <4A5D2DE8.3010605@vmware.com> References: <4A5D2DE8.3010605@vmware.com> From: Hui Zhu Date: Thu, 16 Jul 2009 10:18:00 -0000 Message-ID: Subject: Re: [patch] reverse-finish.exp To: Michael Snyder Cc: "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-07/txt/msg00405.txt.bz2 Yes, It works very well. Thanks. Hui On Wed, Jul 15, 2009 at 09:16, Michael Snyder wrote: > I goofed when I wrote this test. =A0I was thinking that > reverse-finish would always bring us to the beginning > of the calling source line, but it won't. =A0Just like > forward finish, it may stop in the middle of the line. > > Hui, this should make this test pass on amd64. > > > 2009-07-14 =A0Michael Snyder =A0 > > =A0 =A0 =A0 =A0* gdb.reverse/finish-reverse.exp: Do not expect reverse-fi= nish > =A0 =A0 =A0 =A0to bring gdb to the beginning of the calling line. > > Index: gdb.reverse/finish-reverse.exp > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/testsuite/gdb.reverse/finish-reverse.exp,v > retrieving revision 1.1 > diff -u -p -r1.1 finish-reverse.exp > --- gdb.reverse/finish-reverse.exp =A0 =A0 =A027 Jun 2009 18:49:20 -0000 = =A0 =A0 =A01.1 > +++ gdb.reverse/finish-reverse.exp =A0 =A0 =A015 Jul 2009 01:17:58 -0000 > @@ -27,34 +27,6 @@ if { [prepare_for_testing $testfile.exp > =A0 =A0 return -1 > =A0} > > -proc test_start_of_line { line_text test_msg } { > - =A0 =A0global gdb_prompt > - =A0 =A0global decimal > - =A0 =A0global hex > - > - =A0 =A0send_gdb "info line\n" > - =A0 =A0gdb_expect { > - =A0 =A0 =A0 -re "Line $decimal of .* starts at address ($hex) .*$gdb_pr= ompt $" { > - =A0 =A0 =A0 =A0 =A0 set line_begin $expect_out(1,string) > - =A0 =A0 =A0 } > - =A0 =A0 =A0 default { > - =A0 =A0 =A0 =A0 =A0 fail "Get line address in test_start_of_line" > - =A0 =A0 =A0 } > - =A0 =A0} > - =A0 =A0send_gdb "info reg pc\n" > - =A0 =A0gdb_expect { > - =A0 =A0 =A0 -re ".*: ($hex)\r\n*$gdb_prompt $" { > - =A0 =A0 =A0 =A0 =A0 set stop_pc $expect_out(1,string) > - =A0 =A0 =A0 } > - =A0 =A0 =A0 default { > - =A0 =A0 =A0 =A0 =A0 fail"Get stop pc in test_start_of_line" > - =A0 =A0 =A0 } > - =A0 =A0} > - =A0 =A0gdb_test "print $line_begin =3D=3D $stop_pc" \ > - =A0 =A0 =A0 " =3D 1\[\r\n\]*" \ > - =A0 =A0 =A0 "test_start_of_line, $test_msg" > -} > - > =A0runto main > > =A0if [target_info exists gdb,use_precord] { > @@ -193,7 +165,7 @@ gdb_continue_to_breakpoint "long_long_fu > =A0set test_msg "reverse finish from long_long_func" > =A0gdb_test_multiple "finish" "$test_msg" { > =A0 =A0 -re ".* long_checkpoint.*$gdb_prompt $" { > - =A0 =A0 =A0 test_start_of_line "long_checkpoint" "$test_msg" > + =A0 =A0 =A0 pass "$test_msg" > =A0 =A0 } > =A0} > > @@ -205,7 +177,7 @@ gdb_continue_to_breakpoint "long_func" " > =A0set test_msg "reverse finish from long_func" > =A0gdb_test_multiple "finish" "$test_msg" { > =A0 =A0 -re ".* int_checkpoint.*$gdb_prompt $" { > - =A0 =A0 =A0 test_start_of_line "int_checkpoint" "$test_msg" > + =A0 =A0 =A0 pass "$test_msg" > =A0 =A0 } > =A0} > > @@ -217,7 +189,7 @@ gdb_continue_to_breakpoint "int_func" ". > =A0set test_msg "reverse finish from int_func" > =A0gdb_test_multiple "finish" "$test_msg" { > =A0 =A0 -re ".* short_checkpoint.*$gdb_prompt $" { > - =A0 =A0 =A0 test_start_of_line "short_checkpoint" "$test_msg" > + =A0 =A0 =A0 pass "$test_msg" > =A0 =A0 } > =A0} > > @@ -229,7 +201,7 @@ gdb_continue_to_breakpoint "short_func" > =A0set test_msg "reverse finish from short_func" > =A0gdb_test_multiple "finish" "$test_msg" { > =A0 =A0 -re ".* char_checkpoint.*$gdb_prompt $" { > - =A0 =A0 =A0 test_start_of_line "char_checkpoint" "$test_msg" > + =A0 =A0 =A0 pass "$test_msg" > =A0 =A0 } > =A0} > > @@ -241,7 +213,7 @@ gdb_continue_to_breakpoint "char_func" " > =A0set test_msg "reverse finish from char_func" > =A0gdb_test_multiple "finish" "$test_msg" { > =A0 =A0 -re ".* void_checkpoint.*$gdb_prompt $" { > - =A0 =A0 =A0 test_start_of_line "void_checkpoint" "$test_msg" > + =A0 =A0 =A0 pass "$test_msg" > =A0 =A0 } > =A0} > > @@ -253,7 +225,7 @@ gdb_continue_to_breakpoint "void_func" " > =A0set test_msg "reverse finish from void_func" > =A0gdb_test_multiple "finish" "$test_msg" { > =A0 =A0 -re ".* call to void_func.*$gdb_prompt $" { > - =A0 =A0 =A0 test_start_of_line "call to void_func" "$test_msg" > + =A0 =A0 =A0 pass "$test_msg" > =A0 =A0 } > =A0} > > >