This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] make "set debug target" take effect immediately


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]