Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 5/6] Test tracepoints are installed or not
Date: Fri, 07 Dec 2012 12:39:00 -0000	[thread overview]
Message-ID: <50C1E38F.2020108@redhat.com> (raw)
In-Reply-To: <1354596282-32526-6-git-send-email-yao@codesourcery.com>

On 12/04/2012 04:44 AM, Yao Qi wrote:
> Test the state of field 'installed'.  This patch should be applied on
> top of this one,
> 
>   [PATCH] Test on =breakpoint-created when reconnect
>   http://sourceware.org/ml/gdb-patches/2012-12/msg00019.html
> 
> gdb/testsuite:
> 
> 2012-12-03  Yao Qi  <yao@codesourcery.com>
> 
> 	* gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check
> 	'installed' field in '=breakpoint-modified'.
> 	(test_reconnect): Check 'installed' field in
> 	'=breakpoint-modified' and '=breakpoint-created'.
> ---
>  gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp |   20 +++++++++++++++++---
>  1 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
> index a4cef0a..f20ea74 100644
> --- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
> +++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
> @@ -130,10 +130,20 @@ proc test_reconnect { } { with_test_prefix "reconnect" {
>  	    fail "$test: 2"
>  	    exp_continue
>  	}
> -	-re ".*=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*${mi_gdb_prompt}" {
> +	-re ".*=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*installed=\"y\"" {
>  	    # Tracepoint on main is created because it is not defined
>  	    # before and it is from remote stub.
>  	    pass $test
> +	    exp_continue
> +	}
> +	-re ".*=breakpoint-modified,bkpt=\{number=\"2\".*,func=\"marker\".*installed=\"y\"" {
> +	    # Tracepoint on marker is defined.  After the sync, we
> +	    # know that the tracepoint is in remote stub.  Mark it
> +	    # 'installed'.
> +	    pass "tracepoint on marker is installed"
> +	    exp_continue
> +	}
> +	-re ".*${mi_gdb_prompt}" {
>  	}
>  	timeout {
>  	    fail $test
> @@ -187,8 +197,12 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
>  
>      set test "tracepoint on pendfunc2 resolved"
>      gdb_expect {
> -	-re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\"" {
> +	-re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"n\"" {
>  	    pass "$test"
> +	    exp_continue
> +	}
> +	-re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"y\"" {
> +	    pass "tracepoint on pendfunc2 installed"
>  	}

I don't understand this part.  Why do we get two notifications?  Different calls to the
breakpoint_modified observers?  This also relates to the "installed" field being present
or not for pending breakpoints issue I pointed out in a previous patch.  It'd be good to
see (and test perhaps) this field is output correctly in the case of a tracepoint with multiple
locations.

>  	-re ".*${mi_gdb_prompt}$" {
>  	    fail $test
> @@ -210,7 +224,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
>      mi_send_resuming_command "exec-continue" "continuing to exit"
>      set test "tracepoint on pendfunc2 becomes pending again"
>      gdb_expect {
> -	-re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"<PENDING>\",.*times=\"0\"" {
> +	-re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"<PENDING>\",.*times=\"0\".*installed=\"n\"" {
>  	    pass "$test"
>  	}

Also related.  It very much feels to me that installed or not is a location property, not a
breakpoint property.  So if the breakpoint is pending, it doesn't have any location at all,
and then it feels strange to me to include an "installed" attribute.  WDYT?

>  	-re ".*${mi_gdb_prompt}$" {
> 

-- 
Pedro Alves


  reply	other threads:[~2012-12-07 12:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04  4:45 [PATCH 0/6] Add a new field 'installed' when reporting tracepoint Yao Qi
2012-12-04  4:45 ` [PATCH 1/6] Add a field 'installed' for each location of tracepoint Yao Qi
2012-12-06 20:56   ` Pedro Alves
2012-12-07 13:49     ` Yao Qi
2012-12-09 12:49     ` Yao Qi
2012-12-09 16:57       ` Eli Zaretskii
2012-12-11 17:26       ` Pedro Alves
2012-12-12  1:54         ` Yao Qi
2012-12-12 12:03           ` Pedro Alves
2012-12-04  4:45 ` [PATCH 4/6] Notify breakpoint-modified when uploaded tracepoints are merged Yao Qi
2012-12-06 20:57   ` Pedro Alves
2012-12-04  4:45 ` [PATCH 5/6] Test tracepoints are installed or not Yao Qi
2012-12-07 12:39   ` Pedro Alves [this message]
2012-12-07 13:55     ` Yao Qi
2012-12-07 14:20       ` Pedro Alves
2012-12-09 12:53         ` Yao Qi
2012-12-11 17:53           ` Pedro Alves
2012-12-12  2:59             ` Yao Qi
2012-12-12 12:24               ` Pedro Alves
2012-12-12 15:00                 ` Yao Qi
2012-12-04  4:45 ` [PATCH 6/6] Update test cases for 'installed' field Yao Qi
2012-12-07 12:42   ` Pedro Alves
2012-12-13 12:07     ` Yao Qi
2012-12-13 17:13       ` Pedro Alves
2012-12-04  4:45 ` [PATCH 2/6] Iterate over ALL_TRACEPOINTS first Yao Qi
2012-12-06 20:56   ` Pedro Alves
2012-12-04  4:45 ` [PATCH 3/6] Notify breakpoint-modified when tracepoints are downloaded Yao Qi
2012-12-06 20:56   ` Pedro Alves
2012-12-06 20:55 ` [PATCH 0/6] Add a new field 'installed' when reporting tracepoint Pedro Alves

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=50C1E38F.2020108@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --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