Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] maint.exp miscexprs.exp nodebug.exp send_gdb / gdb_test
Date: Tue, 25 May 2010 17:27:00 -0000	[thread overview]
Message-ID: <20100525172332.GX3019@adacore.com> (raw)
In-Reply-To: <4BF5CF46.4000105@vmware.com>

> 2010-05-20  Michael Snyder  <msnyder@vmware.com>
> 
> 	* gdb.base/maint.exp: Replace send_gdb with gdb_test.
> 	* gdb.base/miscexprs.exp: Replace send_gdb with gdb_test.
> 	* gdb.base/nodebug.exp: Replace send_gdb with gdb_test.

I only spotted one issue... The rest looked ok to me.


> +gdb_test "maint space 0" "maint space 0"

Shouldn't this one be gdb_test_no_output?

> +    -re "^maint print psymbols psymbols_output \[^\n\]*\r\n$gdb_prompt $" {
> +	send_gdb "shell ls psymbols_output\n"
> +	gdb_expect {
> +	    -re "psymbols_output\r\n$gdb_prompt $" {
> +		# We want this grep to be as specific as possible,
> +		# so it's less likely to match symbol file names in
> +		# psymbols_output.  Yes, this actually happened;
> +		# poor expect got tons of output, and timed out
> +		# trying to match it.   --- Jim Blandy <jimb@cygnus.com>
> +		send_gdb "shell grep 'main.*function' psymbols_output\n"
> +		gdb_expect {
> +		    -re ".main., function, $hex.*$gdb_prompt $" {
> +			pass "maint print psymbols 1"
> +		    }
> +		    -re ".*main.  .., function, $hex.*$gdb_prompt $" {
> +			pass "maint print psymbols 2"
> +		    }
> +		    -re ".*$gdb_prompt $" { fail "maint print psymbols" }
> +		    timeout     { fail "(timeout) maint print psymbols" }
> +		}
> +		gdb_test "shell rm -f psymbols_output" ""
> +	    }
> +	    -re ".*$gdb_prompt $"       { fail "maint print psymbols" }
> +	    timeout           { fail "(timeout) maint print psymbols" }
> +	}
> +    }
> +    -re ".*$gdb_prompt $"       { fail "maint print psymbols" }
> +    timeout           { fail "(timeout) maint print psymbols" }

Ugh! I understand that this is not the objective of this patch, but
I think that this could be greatly simplified by rewriting this using
pure tcl, and without using GDB as the gateway to a shell interpreter.

-- 
Joel


  reply	other threads:[~2010-05-25 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  3:01 Michael Snyder
2010-05-25 17:27 ` Joel Brobecker [this message]
2010-05-25 19:17   ` 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=20100525172332.GX3019@adacore.com \
    --to=brobecker@adacore.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