From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7740 invoked by alias); 24 Apr 2009 09:22:35 -0000 Received: (qmail 7728 invoked by uid 22791); 24 Apr 2009 09:22:34 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Apr 2009 09:22:26 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 793C3290046 for ; Fri, 24 Apr 2009 11:22:23 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hv+XTa9rNST4 for ; Fri, 24 Apr 2009 11:22:22 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id CD3BF290036 for ; Fri, 24 Apr 2009 11:22:22 +0200 (CEST) Message-Id: From: Tristan Gingold To: gdb-patches@sourceware.org In-Reply-To: <20090319141746.GA81236@ulanbator.act-europe.fr> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Ping - RFA: makes darwin-nat.c threads (and multi-processes) aware Date: Fri, 24 Apr 2009 09:22:00 -0000 References: <20090319141746.GA81236@ulanbator.act-europe.fr> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00688.txt.bz2 Ping... On Mar 19, 2009, at 3:17 PM, 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! > > As darwin-nat.c has been mostly rewritten, it is somewhat difficult to > write the ChangeLog. I have attached both the diff and the new > version > of darwin-nat.c > > Tristan. > > 2009-03-19 Tristan Gingold > > * darwin-nat.h (struct darwin_exception_msg): New type to describe > a mach exception. > (struct private_thread_info): New type to describe the state of the > thread. > (DEF_VEC_I thread_t): Removed, replaced by ... > (DEF_VEC_O darwin_thread_t): ... this new type. > (struct darwin_inferior): Renamed to ... > (struct private_inferior): ... this type. Fields added. > (darwin_not_port): Moved into the private inferior structure. > * darwin-nat.c: Add includes, improve comments. > Rewrite to handle multiple threads and processes. > (darwin_resume_to): New function and protype. > (darwin_resume, darwin_wait_to, darwin_wait): Ditto. > (darwin_kill_inferior): Add ops argument. > (darwin_pid_to_str): New function. > (darwin_thread_alive): Ditto. > (darwin_inf, darwin_not_port): Removed. > (darwin_inf_fake_stop): New variable. > (msgin, msgout, msg_state, exc_msg): Removed. > (mach_check_error): Use warning instead of error. > (darwin_ptrace): Adjust debug level. > (cmp_thread_t): Fix names (typo). > (darwin_check_new_threads): Argument is now an inferior, > adjust for new structures, add no change check, ignore dead ports, > handle first thread case. > (find_inferior_task_it): New function. > (find_inferior_notify_it): Ditto. > (darwin_find_inferior_by_task): Ditto. > (darwin_find_inferior_by_notify): Ditto. > (darwin_find_thread): Ditto. > (darwin_suspend_inferior): Ditto. > (darwin_resume_inferior): Ditto. > (catch_exception_raise_state): Removed. > (catch_exception_raise_state_identity): Removed. > (darwin_suspend_inferior_it): New function. > (darwin_resume_inferior_it): Ditto. > (darwin_dump_message): New function, extracted from darwin_wait. > (darwin_decode_exception_message): New function. > (darwin_encode_reply): New function. > (catch_exception_raise): Removed. > (darwin_send_reply): New function, extracted from darwin_resume. > (darwin_resume_thread): New function, extracted from darwin_resume. > (struct resume_inferior_threads_param): New type. > (darwin_resume_inferior_threads_it): New function. > (darwin_suspend_inferior_threads): New function. > (darwin_resume): Mostly rewritten to handle multiple threads and > some corner cases. > (darwin_decode_message): New function extracted from darwin_wait. > (cancel_breakpoint): New function. > (darwin_wait): Mostly rewritten. Handle multiple threads. > (darwin_mourn_inferior): Adjust for per process structures. > (darwin_reply_to_all_pending_messages): New function. > (darwin_stop_inferior): Adjust for per inferior structures. > (darwin_attach_pid): Ditto. > (darwin_init_thread_list): Ditto. > (darwin_attach): Ditto. > (darwin_detach): Ditto. > (darwin_files_info): Now empty. > (darwin_pid_to_str): Adjust returns string to match one expected by > the testsuite. > (darwin_read_write_inferior): Rename err variable to match other > uses. > Adjust debug message. Handle submaps. > (darwin_xfer_memory): Adjust for per inferior structures. > (set_enable_mach_exceptions): Ditto. > (darwin_pid_to_exec_file): New function. > (darwin_get_ada_task_ptid): Ditto. > (darwin_supports_multi_process): Ditto. > (_initialize_darwin_inferior): Remove useless assertion, adjust for > per inferior structures. Add new target operations. > >