Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: Nicolas Blanc <nicolas.blanc@intel.com>
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'.
Date: Tue, 18 Jun 2013 17:53:00 -0000	[thread overview]
Message-ID: <51C098FD.30008@codesourcery.com> (raw)
In-Reply-To: <1371566833-4713-6-git-send-email-nicolas.blanc@intel.com>

I don't have comments on this one.

On 06/18/2013 11:47 AM, Nicolas Blanc wrote:
> 2013-17-06  Nicolas Blanc  <nicolas.blanc@intel.com>
>
> gdb/testsuite
> 	* gdb.base/sym-file.exp: Test 'info files'.
>
> Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
> ---
>   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
>
>


  reply	other threads:[~2013-06-18 17:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 14:47 [patch v9 0/5] remove-symbol-file Nicolas Blanc
2013-06-18 14:47 ` [patch v9 1/5] New remove-symbol-file command Nicolas Blanc
2013-06-18 17:26   ` Luis Machado
2013-06-19 12:23     ` Blanc, Nicolas
2013-06-19 13:07       ` Luis Machado
2013-06-18 14:47 ` [patch v9 3/5] Documentation for the " Nicolas Blanc
2013-06-18 16:23   ` Eli Zaretskii
2013-06-18 14:47 ` [patch v9 5/5] Test 'info files' after 'add-symbol-file' and 'remove-symbol-file' Nicolas Blanc
2013-06-18 17:53   ` Luis Machado [this message]
2013-06-18 14:47 ` [patch v9 2/5] Test adding and removing a symbol file at runtime Nicolas Blanc
2013-06-18 17:28   ` Luis Machado
2013-06-18 15:04 ` [patch v9 4/5] 'add-symbol-file' should update the current target sections Nicolas Blanc
2013-06-18 17:29   ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C098FD.30008@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=Hafiz_Abid@mentor.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nicolas.blanc@intel.com \
    --cc=palves@redhat.com \
    --cc=tromey@redhat.com \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox