From: Yao Qi <yao@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
Hui Zhu <teawater@gmail.com>,
gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [obv] Fix unused-but-set-variable error [Re: [OB] Fix linux-low.c build error]
Date: Mon, 19 Dec 2011 08:13:00 -0000 [thread overview]
Message-ID: <4EEEEE57.90901@codesourcery.com> (raw)
In-Reply-To: <20111219065002.GQ21915@adacore.com>
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 (é½å°§)
next prev parent reply other threads:[~2011-12-19 7:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-18 16:05 [OB] Fix linux-low.c build error Hui Zhu
2011-12-18 20:58 ` Jan Kratochvil
2011-12-18 22:55 ` [obv] Fix unused-but-set-variable error [Re: [OB] Fix linux-low.c build error] Jan Kratochvil
2011-12-19 3:22 ` Hui Zhu
2011-12-19 3:34 ` Joel Brobecker
2011-12-19 6:50 ` Yao Qi
2011-12-19 6:53 ` Joel Brobecker
2011-12-19 8:13 ` Yao Qi [this message]
2011-12-19 9:32 ` Joel Brobecker
2011-12-19 10:23 ` Jan Kratochvil
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=4EEEEE57.90901@codesourcery.com \
--to=yao@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=teawater@gmail.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