From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Michael Snyder <msnyder@vmware.com>
Subject: Re: [RFA] gdb.base, f*.exp to l*.exp, send_gdb vs. gdb_test
Date: Fri, 21 May 2010 23:32:00 -0000 [thread overview]
Message-ID: <201005220001.21966.pedro@codesourcery.com> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2010-05-21 23:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 20:28 Michael Snyder
2010-05-21 23:32 ` Pedro Alves [this message]
2010-05-22 1:55 ` Michael Snyder
2010-05-24 22:40 ` Michael Snyder
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=201005220001.21966.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.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