From: Joel Brobecker <brobecker@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Thread exit messages on MS-Windows
Date: Mon, 29 Apr 2013 17:31:00 -0000 [thread overview]
Message-ID: <20130429102100.GY3525@adacore.com> (raw)
In-Reply-To: <838v44tnf8.fsf@gnu.org>
> 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 <eliz@gnu.org>
>
> * 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
next prev parent reply other threads:[~2013-04-29 10:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <83obd1tyi7.fsf@gnu.org>
2013-04-28 16:24 ` Eli Zaretskii
2013-04-29 4:32 ` Eli Zaretskii
2013-04-29 8:21 ` Corinna Vinschen
2013-04-29 8:38 ` Eli Zaretskii
2013-04-29 5:09 ` asmwarrior
2013-04-29 6:30 ` Eli Zaretskii
2013-04-29 6:30 ` asmwarrior
2013-04-29 6:30 ` Eli Zaretskii
2013-04-29 17:31 ` Joel Brobecker [this message]
2013-04-29 20:27 ` Eli Zaretskii
2013-04-30 11:51 ` Joel Brobecker
2013-04-29 19:26 ` Tom Tromey
2013-04-30 0:58 ` Eli Zaretskii
2013-04-30 11:38 ` Joel Brobecker
[not found] ` <83obcwoubz.fsf@gnu.org>
2013-05-01 5:14 ` Joel Brobecker
2013-05-04 13:40 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130429102100.GY3525@adacore.com \
--to=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox