This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] testsuite/gdb.base/bang.exp: Allow trailing text after "Program exited normally"
On Mon, Sep 08, 2003 at 09:27:17AM -0400, Daniel Jacobowitz wrote:
> On Mon, Sep 08, 2003 at 01:42:01PM +0200, Corinna Vinschen wrote:
> > Hi,
> >
> > while testing I found that a test for ending the program in
> > gdb.base/bang.exp failed, even though the target had actually
> > exited normally. The cause of the FAIL is that bang.exp doesn't
> > expect anything after the string "Program exited normally.".
> > On the sh target at least, the output after exiting contains a
> > bit more text:
> >
> > Program exited normally.
> > [Switching to process 0]
> >
> > Since that trailing output after a normal exit doesn't change
> > anything with respect to the testresult, I propose to allow
> > trailing characters:
>
> But isn't the [Switching to process 0] a bug? We aren't switching
> processes, the inferior is dead.
Actually I don't understand where's the bug. The above string is
printed if previous_inferior_ptid != inferior_ptid in normal_stop().
previous_inferior_ptid is reproducible == {pid = 42, lwp = 0, tid = 0}
while inferior_pid is set to all zero. The pid 42 is coming from
remote-sim.c, function gdbsim_create_inferior, which always generates
a pid 42. What's the exact problem with this?
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.