From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15667 invoked by alias); 12 Jan 2010 15:55:22 -0000 Received: (qmail 15638 invoked by uid 22791); 12 Jan 2010 15:55:20 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_SUB_PCT_LETTER 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; Tue, 12 Jan 2010 15:55:14 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 636DCCB01EB for ; Tue, 12 Jan 2010 16:55:11 +0100 (CET) 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 c3lKImHo1aUN for ; Tue, 12 Jan 2010 16:55:11 +0100 (CET) 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 4D5CECB016C for ; Tue, 12 Jan 2010 16:55:11 +0100 (CET) From: Tristan Gingold Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [RFA]: windows: always use %x to print thread id Date: Tue, 12 Jan 2010 15:55:00 -0000 Message-Id: <476393A3-DFE0-487B-9976-6F7F9939E1E5@adacore.com> To: gdb-patches ml Mime-Version: 1.0 (Apple Message framework v1077) 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: 2010-01/txt/msg00304.txt.bz2 Hi, also this is a not for the user, tid in messages displayed by 'set debugeve= nts 1' are often in decimal and sometimes in hexadecimal. But windows_pid_to_str prints the tid in hex= a. As this is slightly confusing, with this patch the tid is always printed in= hexadecimal. Tristan. 2010-01-12 gingold * windows-nat.c (windows_continue): Use %x to print thread id. (get_windows_debug_event): Ditto. --- gdb/windows-nat.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 58670c8..f91ca32 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -1128,7 +1128,7 @@ windows_continue (DWORD continue_status, int id) thread_info *th; BOOL res; =20 - DEBUG_EVENTS (("ContinueDebugEvent (cpid=3D%ld, ctid=3D%ld, %s);\n", + DEBUG_EVENTS (("ContinueDebugEvent (cpid=3D%ld, ctid=3D%lx, %s);\n", current_event.dwProcessId, current_event.dwThreadId, continue_status =3D=3D DBG_CONTINUE ? "DBG_CONTINUE" : "DBG_EXCEPTION_NOT_HANDLED")); @@ -1361,7 +1361,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case EXIT_THREAD_DEBUG_EVENT: - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "EXIT_THREAD_DEBUG_EVENT")); @@ -1374,7 +1374,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case CREATE_PROCESS_DEBUG_EVENT: - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "CREATE_PROCESS_DEBUG_EVENT")); @@ -1395,7 +1395,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case EXIT_PROCESS_DEBUG_EVENT: - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "EXIT_PROCESS_DEBUG_EVENT")); @@ -1407,7 +1407,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case LOAD_DLL_DEBUG_EVENT: - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "LOAD_DLL_DEBUG_EVENT")); @@ -1421,7 +1421,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case UNLOAD_DLL_DEBUG_EVENT: - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "UNLOAD_DLL_DEBUG_EVENT")); @@ -1434,7 +1434,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case EXCEPTION_DEBUG_EVENT: - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "EXCEPTION_DEBUG_EVENT")); @@ -1456,7 +1456,7 @@ get_windows_debug_event (struct target_ops *ops, break; =20 case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */ - DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%d code=3D%s)\n= ", + DEBUG_EVENTS (("gdb: kernel event for pid=3D%d tid=3D%x code=3D%s)\n= ", (unsigned) current_event.dwProcessId, (unsigned) current_event.dwThreadId, "OUTPUT_DEBUG_STRING_EVENT")); --=20 1.6.0.2