This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: makes darwin-nat.c threads (and multi-processes) aware
- From: Tristan Gingold <gingold at adacore dot com>
- To: Stan Shebs <stan at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 19 Jun 2009 16:35:11 +0200
- Subject: Re: RFA: makes darwin-nat.c threads (and multi-processes) aware
- References: <20090319141746.GA81236@ulanbator.act-europe.fr> <4A11BE08.3090900@codesourcery.com>
On May 18, 2009, at 9:59 PM, Stan Shebs wrote:
Tristan Gingold wrote:
Hi,
at AdaCore we have an improved version of darwin-nat.[ch] that is
in use for a
few months. It is mostly rewritten to handle threads and multi-
processes. It
also handles more corner cases in breakpoints handling.
The number of regression is about 220 (to be compared to about 600
for the
original version). Good progress!
Indeed! I've reviewed this (sorry about the delay) and it looks
generally good for committing. I just have a couple nits.
+ /* Current message state.
+ If the kernel has sent a message it expects a reply and the
inferior + can't be killed
before. */
+ enum darwin_msg_state { DARWIN_RUNNING,
+ DARWIN_STOPPED,
+ DARWIN_MESSAGE } msg_state;
I'm not sure if there's official style on this point, but I think
it's better to make enums globally visible. It generally seems to be
the case that someone somewhere will eventually find multiple uses
for the enum values, might as well accommodate them.
Now defined globally.
- darwin_ops->to_has_thread_control = tc_schedlock /*| tc_switch
*/; + /* darwin_ops-
>to_has_thread_control = tc_schedlock | tc_switch */;
Might as well just whack the whole line. If someone really wants to
know what happened, CVS has the record.
Removed (in a later commit - sorry).
I have also adjusted machoread.c because one Mach-O bfd declaration
has been changed - as obvious.
The port has slightly bit-rotten (the number of regressions has
increased); I will try to fix that in the
following weeks.
Thanks,
Tristan.