From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [gdbserver] Problems trying to resume dead threads
Date: Mon, 04 Aug 2008 19:55:00 -0000 [thread overview]
Message-ID: <20080804195434.GA28917@caradoc.them.org> (raw)
In-Reply-To: <200808041945.m74Jjkcf028811@d12av02.megacenter.de.ibm.com>
On Mon, Aug 04, 2008 at 09:45:46PM +0200, Ulrich Weigand wrote:
> It seems the "read" errors are just artifacts: because of the first
> error (on writing the register), the "error" call performs a longjmp
> to the toplevel, which leaves things in a somewhat strange state.
>
> The only "real" errors I see (in addition to the one in
> linux_resume_one_process) are the cases in regsets_store_inferior_registers
> (which is already a warning) and usr_store_inferior_registers (which
> is not).
>
> In any case, I don't think these should be even warnings for ESRCH:
> showing a warning in a situation that is completely normal and in
> fact handled correctly would just confuse users IMO.
>
> I'd propose to just silently ignore ESRCH errors while writing registers
> (in addition to your patch). What do you think?
I think that's acceptable, though not ideal. ESRCH can mean "the
program is gone", or for ptrace it can mean "the program is not
stopped". So there are a class of bugs in gdbserver which can lead to
the ESRCH error path. But distinguishing them from this case is quite
difficult.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-08-04 19:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-19 17:17 Ulrich Weigand
2008-08-04 13:40 ` Daniel Jacobowitz
2008-08-04 18:25 ` Ulrich Weigand
2008-08-04 18:30 ` Daniel Jacobowitz
2008-08-04 19:46 ` Ulrich Weigand
2008-08-04 19:55 ` Daniel Jacobowitz [this message]
2008-08-05 21:06 ` Ulrich Weigand
2008-08-05 21:59 ` Daniel Jacobowitz
2008-08-05 22:15 ` Ulrich Weigand
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=20080804195434.GA28917@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.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