This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [obv] Fix unused-but-set-variable error [Re: [OB] Fix linux-low.c build error]
On 12/19/2011 02:50 PM, Joel Brobecker wrote:
> Thanks! This begs the question, though: Why is it OK to ignore
> the error?
>
> I am looking at the code and, not knowing much about tracepoints, I don't
> understand well the prupose of gdb_ust_thread (hint: No function
> description). As far as I can tell, the write is simply writing the byte
> that was read from the connection back to it. What will happen if
> we fail to write, and should the user be warned, for instance?
>
This native socket is used for synchronization between gdbserver and
libinproctrace.so agent. gdbserver puts command into cmd_buf, writes
one byte in socket to notify gdb_ust_thread (a dedicated thread) and
wait. gdb_ust_thread picks up command from cmd_buf. When process is
done, gdb_ust_thread writes one byte again to notify gdbserver and close
socket. I don't think we have to do something w.r.t write failure. The
description above is quite user-invisible, so a warning may confuse
users to some extent, IMO.
--
Yao (éå)