From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25690 invoked by alias); 18 Jun 2013 17:29:41 -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 25679 invoked by uid 89); 18 Jun 2013 17:29:41 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 18 Jun 2013 17:29:40 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Uozit-0003Ug-8q from Luis_Gustavo@mentor.com ; Tue, 18 Jun 2013 10:29:39 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 18 Jun 2013 10:29:39 -0700 Received: from [172.30.14.165] ([172.30.14.165]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 Jun 2013 10:29:38 -0700 Message-ID: <51C098FD.30008@codesourcery.com> Date: Tue, 18 Jun 2013 17:53:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Nicolas Blanc CC: gdb-patches@sourceware.org, Hafiz_Abid@mentor.com, palves@redhat.com, tromey@redhat.com, eliz@gnu.org, yao@codesourcery.com, dje@google.com Subject: Re: [patch v9 5/5] Test 'info files' after 'add-symbol-file' and 'remove-symbol-file'. References: <1371566833-4713-1-git-send-email-nicolas.blanc@intel.com> <1371566833-4713-6-git-send-email-nicolas.blanc@intel.com> In-Reply-To: <1371566833-4713-6-git-send-email-nicolas.blanc@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00443.txt.bz2 I don't have comments on this one. On 06/18/2013 11:47 AM, Nicolas Blanc wrote: > 2013-17-06 Nicolas Blanc > > gdb/testsuite > * gdb.base/sym-file.exp: Test 'info files'. > > Signed-off-by: Nicolas Blanc > --- > gdb/testsuite/gdb.base/sym-file.exp | 44 ++++++++++++++++++++++------------ > 1 files changed, 28 insertions(+), 16 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp > index 873e488..9387b95 100644 > --- a/gdb/testsuite/gdb.base/sym-file.exp > +++ b/gdb/testsuite/gdb.base/sym-file.exp > @@ -17,14 +17,16 @@ > # 1) Run to gdb_add_symbol_file in $srcfile. > # 2) Set a pending breakpoint at bar in $libsrc. > # 3) Load $shlib_name using 'add-symbol-file'. > -# 4) Continue to bar in $libsrc. > -# 5) Set a breakpoint at foo in $librc. > -# 6) Continue to foo in $libsrc. > -# 7) Set a breakpoint at gdb_remove_symbol_file. > -# 8) Continue to gdb_remove_symbol_file in $srcfile. > -# 9) Remove $shlib_name using 'remove-symbol-file'. > -# 10) Check that the breakpoints at foo and bar are pending. > -# 11) Check that the execution can continue without error. > +# 4) 'info files' must display $libname. > +# 5) Continue to bar in $libsrc. > +# 6) Set a breakpoint at foo in $librc. > +# 7) Continue to foo in $libsrc. > +# 8) Set a breakpoint at gdb_remove_symbol_file. > +# 9) Continue to gdb_remove_symbol_file in $srcfile. > +# 10) Remove $shlib_name using 'remove-symbol-file'. > +# 11) 'info files' must not display $libname, anymore. > +# 12) Check that the breakpoints at foo and bar are pending. > +# 13) Check that the execution can continue without error. > > if [skip_shlib_tests] { > return 0 > @@ -91,33 +93,38 @@ if { $result != 0 } then { > return > } > > -# 4) Continue to bar in $libsrc to ensure that the breakpoint > +# 4) 'info files' must display $libname. > +gdb_test "info files" \ > + "^(?=(.*${libname})).*" \ > + "info files must display $libname" > + > +# 5) Continue to bar in $libsrc to ensure that the breakpoint > # was bound correctly after adding $shilb_name. > set lnum_bar [gdb_get_line_number "break at bar" ${libfile}.c] > gdb_continue_to_breakpoint bar ".*$libfile\\.c:$lnum_bar.*" > > -# 5) Set a breakpoint at foo in $libsrc. > +# 6) Set a breakpoint at foo in $libsrc. > set result [gdb_breakpoint foo] > if { !$result } then { > return > } > > -# 6) Continue to foo in $libsrc to ensure that the breakpoint > +# 7) Continue to foo in $libsrc to ensure that the breakpoint > # was bound correctly. > set lnum_foo [gdb_get_line_number "break at foo" ${libfile}.c] > gdb_continue_to_breakpoint foo ".*$libfile\\.c:$lnum_foo.*" > > -# 7) Set a breakpoint at gdb_remove_symbol_file in $srcfile for > +# 8) Set a breakpoint at gdb_remove_symbol_file in $srcfile for > # removing $shlib_name. > set result [gdb_breakpoint gdb_remove_symbol_file] > if { !$result } then { > return > } > > -# 8) Continue to gdb_remove_symbol_file in $srcfile. > +# 9) Continue to gdb_remove_symbol_file in $srcfile. > gdb_continue_to_breakpoint gdb_remove_symbol_file > > -# 9) Remove $shlib_name using 'remove-symbol-file'. > +# 10) Remove $shlib_name using 'remove-symbol-file'. > set result [gdb_test "remove-symbol-file -a addr" \ > ""\ > "remove-symbol-file -a addr" \ > @@ -128,7 +135,12 @@ if { $result != 0 } then { > return > } > > -# 10) Check that the breakpoints at foo and bar are pending after removing > +# 11) 'info files' must not display $libname, anymore. > +gdb_test "info files" \ > + "^(?!(.*${libname})).*" \ > + "info files must not display ${libname}" > + > +# 12) Check that the breakpoints at foo and bar are pending after removing > # $shlib_name. > gdb_test "info breakpoints 2" \ > ".*PENDING.*" \ > @@ -138,6 +150,6 @@ gdb_test "info breakpoints 3" \ > ".*PENDING.*" \ > "check if Breakpoint 3 is pending." > > -# 11) Check that the execution can continue without error. > +# 13) Check that the execution can continue without error. > gdb_continue_to_end > >