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: RFA: makes darwin-nat.c threads (and multi-processes) aware


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.

- 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.

Seeing all the inferior_debug calls with different args, while I'm working on fixing up tracepoints, gets me to thinking about whether we can use tracepoints instead of ever-more debug printfs in GDB (looks bad when the chefs in the kitchen send next door for takeout :-) ), but that's a subject of its own...

Stan



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