This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdb.base, f*.exp to l*.exp, send_gdb vs. gdb_test
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>
- Date: Sat, 22 May 2010 00:01:21 +0100
- Subject: Re: [RFA] gdb.base, f*.exp to l*.exp, send_gdb vs. gdb_test
- References: <4BF6E9FC.8000503@vmware.com>
On Friday 21 May 2010 21:15:56, Michael Snyder wrote:
> + set test "unpatch child, unpatched parent breakpoints from child"
> + gdb_test_multiple "continue" $test {
> + -re "at exit.*$gdb_prompt $" {
> + pass "$test"
> + }
> + -re "SIGTRAP.*$gdb_prompt $" {
> + fail "$test"
> +
> + # Explicitly kill this child, so we can continue gracefully
> + # with further testing...
> + send_gdb "kill\n"
> + gdb_expect {
> + -re ".*Kill the program being debugged.*y or n. $" {
> + send_gdb "y\n"
> + gdb_expect -re "$gdb_prompt $" {}
> + }
> + }
> + }
> + -re ".*$gdb_prompt $" {
> + fail "$test (unknown output)"
> + }
> + timeout {
> + fail "$test (timeout)"
> + }
I guess these last two cases could be deleted too? Doesn't
matter much --- okay anyway.
> --- long_long.exp 1 Jan 2010 07:32:01 -0000 1.30
> +++ long_long.exp 21 May 2010 20:12:01 -0000
> @@ -61,15 +61,9 @@ if { ![runto known_types] } then {
...
> -set target_bigendian_p 1
I think you should still set this, so if the test fails,
the following tests referencing this don't error out reading
a non-existing variable. Wait, the gdb_test_bi function in
this file, the only user of this variable, isn't itself used
anywhere. Huh? This means the variable could be garbage
collected instead, and this gdb_test_multiple below simplified.
> -send_gdb "show endian\n"
> -gdb_expect {
> +gdb_test_multiple "show endian" "getting target endian" {
> -re "little endian.*$gdb_prompt $" { set target_bigendian_p 0 }
> - -re "big endian.*$gdb_prompt $" { }
> - -re "$gdb_prompt $" {
> - fail "getting target endian"
> - }
> - default { fail "(timeout) getting target endian" }
> + -re "big endian.*$gdb_prompt $" { set target_bigendian_p 1 }
> }
Otherwise, it looked fine. Thanks for all this.
--
Pedro Alves