From: Daniel Jacobowitz <drow@mvista.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/testsuite] attach.exp: Add small delay in busy loop...
Date: Wed, 19 Nov 2003 19:17:00 -0000 [thread overview]
Message-ID: <20031119191724.GA10982@nevyn.them.org> (raw)
In-Reply-To: <3FBBC16B.8020508@redhat.com>
On Wed, Nov 19, 2003 at 11:15:55AM -0800, Michael Snyder wrote:
> Daniel Jacobowitz wrote:
> >On Tue, Nov 18, 2003 at 04:26:07PM -0800, Michael Snyder wrote:
> >
> >>Joel Brobecker wrote:
> >>
> >>>Hello,
> >>>
> >>>The attach.exp sometimes fails on certain platforms (eg mips-irix),
> >>>and causes an attach process to be left behind. Since it is doing a busy
> >>>loop, this runaway process left behind consumes 99.9% of the CPU,
> >>>and considerably slows down the execution of the rest of the testsuite.
> >>>
> >>>I suggest the following change to add a small delay at each iteration
> >>>of the busy loop. I had to make some adjustments to attach.exp:
> >>>
> >>>a. Line number 19 became line 32.
> >>> Just like Elena recently upgraded a test to avoid hard-coded
> >>> line number, we should probably clean this up, someday. This can
> >>> be a separate patch, however.
> >>>
> >>>b. The program was attached to while inside the busy loop, so the
> >>> test was expecting the debugger to report that the inferior was
> >>> inside function main() after the attach command was performed.
> >>> This is no longer the case, since the inferior is most likely
> >>> inside a system call, doing the delay. I felt that it was not
> >>> a necessity to checke where the debugger thought the inferior
> >>> was stopped, so removed that part of the expected output. What
> >>> I can do is add an extra test that does a backtrace and verifies
> >>> that it contains a frame for function main().
> >>>
> >>>2003-11-18 J. Brobecker <brobecker@gnat.com>
> >>>
> >>> * gdb.base/attach.c: Add small delay in busy loop.
> >>> * gdb.base/attach.exp: Make some associated adjustments.
> >>>
> >>>OK to apply?
> >>
> >>Seems to work on Linux. I'd sure like to see that backtrace test,
> >>though, to confirm that we are able to build a meaningful machine
> >>state after we attach.
> >
> >
> >Seems reasonable to me. Warning: this will be yet another place we
> >backtrace from syscalls, and sometimes we just can't do that. We
> >already have a couple of configurations where GDB can't reasonably be
> >expected to backtrace out of nanosleep.
>
> Well, we could run to a known breakpoint and then backtrace --
> but that wouldn't test the state immediately after attach.
> Can you think of a good test for a valid state, other than
> a backtrace?
Not really. Let's not worry about the problem for now.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-11-19 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-18 23:00 Joel Brobecker
2003-11-19 0:26 ` Michael Snyder
2003-11-19 0:29 ` Daniel Jacobowitz
2003-11-19 19:16 ` Michael Snyder
2003-11-19 19:17 ` Daniel Jacobowitz [this message]
2003-11-20 6:25 ` Joel Brobecker
2003-11-20 20:20 ` 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=20031119191724.GA10982@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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