From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10254 invoked by alias); 29 Apr 2013 10:21:08 -0000 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 Received: (qmail 10243 invoked by uid 89); 29 Apr 2013 10:21:08 -0000 X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_05,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Apr 2013 10:21:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4A1CC2EB4F; Mon, 29 Apr 2013 06:21:06 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VtsmSEZpm6nr; Mon, 29 Apr 2013 06:21:06 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D3CFB2E9AB; Mon, 29 Apr 2013 06:21:05 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 62D95C3E3B; Mon, 29 Apr 2013 03:21:00 -0700 (PDT) Date: Mon, 29 Apr 2013 17:31:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Thread exit messages on MS-Windows Message-ID: <20130429102100.GY3525@adacore.com> References: <83obd1tyi7.fsf@gnu.org> <838v44tnf8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <838v44tnf8.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-04/txt/msg00866.txt.bz2 > No one replied, so I'm now converting this into an RFA. The patch > below causes GDB on Windows to display thread exit messages like this: > > [Thread 5920.0x13e4 exited with code 0] > [Thread 5920.0x12d0 exited with code 0] > [Thread 5920.0x1cbc exited with code 0] > 2013-04-27 Eli Zaretskii > > * windows-nat.c (windows_delete_thread): Accept an additional > argument, the thread's exit code, and announce thread death when > print_thread_events is non-zero and we are deleting a thread that > is not the main thread. > (get_windows_debug_event): Pass thread exit code to > windows_delete_thread. Looks good to me, modulo the comments already made. It's a little unusual to see an exit code for a thread, but it could be useful information, and it does not unnecessarily clutter the output. > @@ -1513,7 +1517,7 @@ get_windows_debug_event (struct target_o > current_process_handle = current_event.u.CreateProcessInfo.hProcess; > if (main_thread_id) > windows_delete_thread (ptid_build (current_event.dwProcessId, 0, > - main_thread_id)); > + main_thread_id), 0); One tiny nitpick, very possibly influenced by personal preferences, so feel free to ignore... I think that the code would be faster to read if the added parameter was moved to the next line. That way, all parameters in call to windows_delete_thread would have the same indentation level. -- Joel