This is the mail archive of the gdb-patches@sources.redhat.com 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] New thread test to exercise Daniel's Patch


On Fri, Mar 26, 2004 at 04:13:18PM -0500, Jeff Johnston wrote:
> See the attached test.  There was some stuff in pthreads.exp about Crtl-C 
> and alpha-*-osf*.  Do I need to account for this platform?

Well, it's still supported, but I have no idea whether the bit in that
test is necessary - or what it's supposed to accomplish.  So let's
ignore it.

> +# This only works with native configurations
> +if ![isnative] then {
> +    return
> +}

This shouldn't be necessary.

> +set testfile "manythreads"
> +set srcfile ${testfile}.c
> +set binfile ${objdir}/${subdir}/${testfile}
> +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug libs=-lpthread}] != ""} {

See gdb_compile_pthreads.

> +send_gdb "set print sevenbit-strings\n" ; gdb_expect -re "$gdb_prompt $"

gdb_test "set print sevenbit-strings" ""

> +send_gdb "continue\n"
> +gdb_expect {

Everywhere you're using gdb_expect, please use gdb_test_multiple
instead.  For the "after" tests, you can use gdb_test_multiple with
"" as the first argument.

> +# Send a Ctrl-C and verify that we can do info threads and continue
> +after 100 {send_gdb "\003"}

Is 100 ms enough to be interesting?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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