Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] make "set debug target" take effect immediately
Date: Tue, 29 Jul 2014 10:07:00 -0000	[thread overview]
Message-ID: <53D74AE0.3050404@codesourcery.com> (raw)
In-Reply-To: <1406574267-5212-1-git-send-email-tromey@redhat.com>

On 07/29/2014 03:04 AM, Tom Tromey wrote:
> diff --git a/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp b/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
> index a196f68..dd793bd 100644
> --- a/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
> +++ b/gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
> @@ -76,7 +76,7 @@ if { $hardware_step } {
>      return
>  }
>  
> -gdb_test_no_output "set debug target 0"
> +gdb_test "set debug target 0" "->to_log_command.*\\)"
>  
>  set line_re "\[^\r\n\]*"

Tom,
Beside this change, we still need to update the pattern to match the
output of "set debug target 1".  We match "target_resume " nowadays,
but it doesn't exist in the output at all, because of the recent target
delegation changes.  In sss-bp-on-user-bp-2.exp, we have

gdb_test_no_output "set debug target 1"
set hardware_step 0
set test "probe target hardware step"
gdb_test_multiple "si" $test {
    -re "target_resume \\(\[^\r\n\]+, step, .*$gdb_prompt $" {
         ^^^^^^^^^^^^^
	set hardware_step 1
	pass $test
    }
    -re "$gdb_prompt $" {
	pass $test
    }
}

We need to replace "target_resume" with "to_resume" in the pattern,
otherwise, hardware_step is always zero, which is wrong.  Even
hardware_step is zero on x86, the test only fails once in about 10 runs.
That may be the reason we didn't find the mistake before.

-- 
Yao (齐尧)


  parent reply	other threads:[~2014-07-29  7:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 19:18 Tom Tromey
2014-07-28 19:21 ` Eli Zaretskii
2014-07-28 19:34   ` Eli Zaretskii
2014-07-28 20:51   ` Tom Tromey
2014-08-04 14:09     ` Tom Tromey
2014-07-29 10:07 ` Yao Qi [this message]
2014-07-29 10:27   ` Pedro Alves
2014-07-29 20:05   ` Tom Tromey
2014-07-30  7:48     ` Yao Qi
2014-07-30 13:49       ` Tom Tromey
2014-08-04 14:09         ` Tom Tromey
2014-07-29 11:05 ` 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=53D74AE0.3050404@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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