Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: Testsuite FAIL which isn't a FAIL in chng-syms.exp
Date: Thu, 26 Feb 2004 17:07:00 -0000	[thread overview]
Message-ID: <20040226170704.GC1396@cygbert.vinschen.de> (raw)
In-Reply-To: <20040226163246.GB30921@nevyn.them.org>

Hi Daniel,

On Feb 26 11:32, Daniel Jacobowitz wrote:
> Take a look at gdb_run_cmd:
>     gdb_expect 60 {
>         -re "The program .* has been started already.*y or n. $" {
>             send_gdb "y\n"
>             exp_continue
>         }
>         -re "Starting program: \[^\r\n\]*" {}
>     }
> 
> It eats everything up to "Starting program" so the error has been
> hidden.  I'm not sure quite why this passes for me... aha, yes I am:
> 
> `/opt/src/binutils/x86-as/gdb/testsuite/gdb.base/chng-syms' has changed; re-reading symbols.
> Error in re-setting breakpoint 1:
> No symbol "var1" in current context.
> Starting program:
> /opt/src/binutils/x86-as/gdb/testsuite/gdb.base/chng-syms 
> Error in re-setting breakpoint 1:
> No symbol "var1" in current context.
> Error in re-setting breakpoint 1:
> No symbol "var1" in current context.
> Error in re-setting breakpoint 1:
> No symbol "var1" in current context.
> 
> The other copies of the message come at the shared library breakpoint
> when we try to reset shlib_disabled breakpoints.  You're probably
> running an embedded target that doesn't have a shared library event
> breakpoint.

Yes, that's right and...

> Not sure what the best fix is.  Might work as a hack to add -notransfer
> to gdb_run_cmd:
> 
>         -notransfer -re "Starting program: \[^\r\n\]*" {}

...this actually fixes it.

> That will leave the "Starting program" in the buffer, and anything else
> transfered for that match.  I'm not sure if this will break any other
> tests.

True, that looks a bit dangerous :-) 

> As an aside, in the original test:
> 
> >       -re "Error in re-setting .*No symbol .var1..*Program exited normally.*" {
> 
> is not a safe pattern; never suffix a pattern with .*.  The end should
> always be anchored, usually to "$gdb_prompt $".

Yes, I tried that as one of the first measurements against the FAIL but
it's clear now why that had no effect.

Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.


  reply	other threads:[~2004-02-26 17:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26 16:15 Corinna Vinschen
2004-02-26 16:32 ` Daniel Jacobowitz
2004-02-26 17:07   ` Corinna Vinschen [this message]
2004-02-26 19:08     ` Daniel Jacobowitz
2004-02-27 12:53       ` Corinna Vinschen

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=20040226170704.GC1396@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb@sources.redhat.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