This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Delete struct inferior_suspend_state
- From: Doug Evans <dje at google dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 31 Jul 2014 19:03:19 -0700
- Subject: Re: [PATCH] Delete struct inferior_suspend_state
- Authentication-results: sourceware.org; auth=none
- References: <yjt2silh73aa dot fsf at ruffy dot mtv dot corp dot google dot com> <20140731193050 dot GA7927 at host2 dot jankratochvil dot net> <CADPb22TPw+9eOv2hna==EomvmNNyATTkqUvwyqKLU7V-L=PAEA at mail dot gmail dot com> <20140731200529 dot GG14672 at adacore dot com> <CADPb22Sb=LMc-2+gXugd+9CMcRR3KmgNRg_Sde2PaTqz8-VkZA at mail dot gmail dot com> <20140731204242 dot GH14672 at adacore dot com> <CADPb22TSKj2HmCfpHKgurARrq1AE5_6Mm4juGXqZ6O2wF1RUyQ at mail dot gmail dot com>
On Thu, Jul 31, 2014 at 1:58 PM, Doug Evans <dje@google.com> wrote:
> [...]
> It would be interesting to do an audit and see how many outdated
> comments gdb has.
> [...]
I'm happy to go with whatever the community wants (I want to be clear
that I'm not trying to advance any particular position on this patch -
I do have opinions on how to handle the various choices, but I don't
favor any particular choice).
But as a data point to the above comment, because I think it's an
important issue,
this comment in inf-loop.c is odd. I happened across it because I'm
trying to implement having the event loop handle waiting for all
threads to stop, instead of doing the waiting in a special loop apart
from the event loop.
inf-loop.c:
/* General function to handle events in the inferior. So far it just
takes care of detecting errors reported by select() or poll(),
otherwise it assumes that all is OK, and goes on reading data from
the fd. This however may not always be what we want to do. */
void
inferior_event_handler (enum inferior_event_type event_type,
gdb_client_data client_data)
{
...
AFAICT, it doesn't match what the function does at all.
inferior_event_handler + fetch_inferior_event is also a bit odd.
I see some cleanup potential here, more on that later (I hope, pending
finding the time :-)).