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 21:45:46 +0200 (CEST)
- Subject: Re: [gdbserver] Problems trying to resume dead threads
Daniel Jacobowitz wrote:
> On Mon, Aug 04, 2008 at 08:23:14PM +0200, Ulrich Weigand wrote:
> > 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
>
> :-( It must depend on where you are in gdbserver when the process is
> killed. I hadn't thought about that.
>
> Perhaps we should downgrade all these errors to warnings for errno ==
> ESRCH?
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?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com