This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [resubmit] gdb.base, r*.exp thru w*.exp
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 20 May 2010 14:07:18 -0700
- Subject: Re: [resubmit] gdb.base, r*.exp thru w*.exp
- References: <4BF59BBB.8020603@vmware.com>
On Thu, May 20, 2010 at 01:29:47PM -0700, Michael Snyder wrote:
> Incorporating suggestions and changes, including Joel's new function.
>
> 2010-05-20 Michael Snyder <msnyder@vmware.com>
>
> * gdb.base/relational.exp: Replace send_gdb with gdb_test.
> * gdb.base/relocate.exp: Replace send_gdb with gdb_test.
> * gdb.base/return.exp: Replace send_gdb with gdb_test.
> * gdb.base/return2.exp: Replace send_gdb with gdb_test.
> * gdb.base/sepdebug.exp: Replace send_gdb with gdb_test.
> * gdb.base/setvar.exp: Replace send_gdb with gdb_test.
> * gdb.base/shlib-call.exp: Replace send_gdb with gdb_test.
> * gdb.base/shreloc.exp: Replace send_gdb with gdb_test.
> * gdb.base/sigall.exp: Replace send_gdb with gdb_test.
> * gdb.base/sigbpt.exp: Replace send_gdb with gdb_test.
> * gdb.base/signull.exp: Replace send_gdb with gdb_test.
> * gdb.base/so-impl-ld.exp:Replace send_gdb with gdb_test.
> * gdb.base/varargs.exp: Replace send_gdb with gdb_test.
> * gdb.base/volatile.exp: Replace send_gdb with gdb_test.
> * gdb.base/watch_thread_num.exp: Replace send_gdb with gdb_test.
> * gdb.base/watchpoint.exp: Replace send_gdb with gdb_test.
> * gdb.base/whatis.exp: Replace send_gdb with gdb_test.
Looks good overall. It's a long patch, so I only skimmed it.
Just a couple of comments...
> -set name "set catch vfork, never expected to trigger"
> -send_gdb "catch vfork\n"
> -
> # If we are on HP-UX 10.20, we expect an error message to be
> # printed if we type "catch vfork" at the gdb gdb_prompt. This is
> # because on HP-UX 10.20, we cannot catch vfork events.
>
> -if [istarget "hppa*-hp-hpux10.20"] then {
> - gdb_expect {
> - -re "Catch of vfork events not supported on HP-UX 10.20..*$gdb_prompt $"
> - {pass $name}
> - -re "$gdb_prompt $"
> - {fail $name}
> - timeout {fail "(timeout) $name"}
> +set name "set catch vfork, never expected to trigger"
> +gdb_test_multiple "catch vfork" $name {
> + -re "Catch of vfork events not supported on HP-UX 10.20.*" {
> + pass $name
> }
> -} else {
> - gdb_expect {
> - -re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $"
> - {pass $name}
> - -re "Catch of vfork not yet implemented.*$gdb_prompt $"
> - {pass $name}
> - -re "$gdb_prompt $"
> - {fail $name}
> - timeout {fail "(timeout) $name"}
> + -re "Catchpoint \[0-9\]* .vfork.*$gdb_prompt $" {
> + pass $name
> + }
> + -re "Catch of vfork not yet implemented.*$gdb_prompt $" {
> + pass $name
> }
> }
You slightly changed the implementation, but I think that in practice
this is going to be the same, so I'm OK with that.
> +gdb_test "break 999" "No line 999 in file .*" \
> + pass "break on non-existent source line"
^^^^ ???
> +gdb_test_multiple "break $bp_location1" \
> + "set to-be-silent break bp_location1" {
> + -re "Breakpoint (\[0-9\]*) at .*, line $bp_location1.*$gdb_prompt $" {
> + pass "set to-be-silent break bp_location1"
> + }
How about using test_gdb in this case?
--
Joel