This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix inferior restart problem in gdb.base/commands.exp


On Sat, Sep 07, 2002 at 09:04:45AM -0500, Fred Fish wrote:
> When running the gdb testsuite with an external simulator like "sid", if the
> inferior is allowed to run to completion and exit, a simple gdb_run_cmd may
> have problems rerunning the inferior since it doesn't do a complete restart.
> 
> An alternative to gdb_run_cmd is to do the following prior to setting up
> the test and then later do just a continue instead of gdb_run_cmd:
> 
>   gdb_exit
>   gdb_start
>   delete_breakpoints
>   gdb_reinitialize_dir $srcdir/$subdir
>   gdb_load ${binfile}
> 
> but that is much more expensive.  It is sufficient to just not allow the
> inferior to run to completion.  This patch does that.
> 
> Also, to avoid having to specifically test for noinferiorio we don't
> check for output from the test case, it is not relevant to the given
> test anyway.

I don't really like this.  Isn't there some way you can make re-issuing
gdb_run_cmd work for sid?  It works for gdbserver, I believe, though I
have to play some games to do it.  (The test itself fails but due to a
bad regular expression construct, I think - not sure why.  The desired
behavior is indeed there.)  I don't like having to work around all
sorts of targets in the testsuite more than necessary.

I've had a kernel bug this week that only showed up when GDB ran a
program multiple times.  Is there anywhere else in the testsuite that
continues to cover that?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]