This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]