This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [gdbserver] Problems trying to resume dead threads
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 4 Aug 2008 20:23:14 +0200 (CEST)
- Subject: Re: [gdbserver] Problems trying to resume dead threads
Daniel Jacobowitz wrote:
> I can reproduce this problem by using the binary from killed.exp and
> running strace on gdbserver. I can also reproduce it on an embedded
> ARM target by running killed.exp. I can't reproduce it on my desktop
> running killed.exp, which suggests this is normally hidden by
> scheduler decisions - you need a long enough gap between the two
> PTRACE_CONT's.
>
> What do you think of this change? Ideally, we could wait with WNOHANG
> at this point to check for the exit case, but we'd have to restructure
> a bit of the event loop to handle pending status == exited.
Hmm, still fails with my Cell test case like this:
writing register 25: No such process
ptrace(regsets_fetch_inferior_registers) PID=14241: No such process
reading register 0: No such process
The initial error happens in usr_store_inferior_registers called via
the regcache_invalidate_one call in linux_resume_one_process, just
before the location you modified. Whether this writes anything
probably depends on target properties like decr_pc_after_break ...
Ignoring ESRCH in usr_store_inferior_registers as well seems to
fix the problem for me.
In any case, I'm not sure why usr_store_inferior_registers errors
out ... the parallel regsets_store_inferior_registers only gives
a warning in this case.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com