* [RFA]: windows: always use %x to print thread id
@ 2010-01-12 15:55 Tristan Gingold
2010-01-15 6:35 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Tristan Gingold @ 2010-01-12 15:55 UTC (permalink / raw)
To: gdb-patches ml
Hi,
also this is a not for the user, tid in messages displayed by 'set debugevents 1' are often in decimal
and sometimes in hexadecimal. But windows_pid_to_str prints the tid in hexa.
As this is slightly confusing, with this patch the tid is always printed in hexadecimal.
Tristan.
2010-01-12 gingold <gingold@adacore.com>
* 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;
- DEBUG_EVENTS (("ContinueDebugEvent (cpid=%ld, ctid=%ld, %s);\n",
+ DEBUG_EVENTS (("ContinueDebugEvent (cpid=%ld, ctid=%lx, %s);\n",
current_event.dwProcessId, current_event.dwThreadId,
continue_status == DBG_CONTINUE ?
"DBG_CONTINUE" : "DBG_EXCEPTION_NOT_HANDLED"));
@@ -1361,7 +1361,7 @@ get_windows_debug_event (struct target_ops *ops,
break;
case EXIT_THREAD_DEBUG_EVENT:
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%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;
case CREATE_PROCESS_DEBUG_EVENT:
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%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;
case EXIT_PROCESS_DEBUG_EVENT:
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%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;
case LOAD_DLL_DEBUG_EVENT:
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%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;
case UNLOAD_DLL_DEBUG_EVENT:
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%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;
case EXCEPTION_DEBUG_EVENT:
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%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;
case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */
- DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
+ DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%s)\n",
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"OUTPUT_DEBUG_STRING_EVENT"));
--
1.6.0.2
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFA]: windows: always use %x to print thread id
2010-01-12 15:55 [RFA]: windows: always use %x to print thread id Tristan Gingold
@ 2010-01-15 6:35 ` Joel Brobecker
2010-01-15 19:21 ` Christopher Faylor
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2010-01-15 6:35 UTC (permalink / raw)
To: Tristan Gingold; +Cc: gdb-patches ml
> also this is a not for the user, tid in messages displayed by 'set
> debugevents 1' are often in decimal and sometimes in hexadecimal. But
> windows_pid_to_str prints the tid in hexa. As this is slightly
> confusing, with this patch the tid is always printed in hexadecimal.
I think this makes sense, and since Chris hasn't answered yet:
> 2010-01-12 gingold <gingold@adacore.com>
>
> * windows-nat.c (windows_continue): Use %x to print thread id.
> (get_windows_debug_event): Ditto.
This is OK.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA]: windows: always use %x to print thread id
2010-01-15 6:35 ` Joel Brobecker
@ 2010-01-15 19:21 ` Christopher Faylor
2010-01-25 10:55 ` Tristan Gingold
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Faylor @ 2010-01-15 19:21 UTC (permalink / raw)
To: gdb-patches ml, Tristan Gingold, Joel Brobecker
On Fri, Jan 15, 2010 at 10:35:23AM +0400, Joel Brobecker wrote:
>> also this is a not for the user, tid in messages displayed by 'set
>> debugevents 1' are often in decimal and sometimes in hexadecimal. But
>> windows_pid_to_str prints the tid in hexa. As this is slightly
>> confusing, with this patch the tid is always printed in hexadecimal.
>
>I think this makes sense, and since Chris hasn't answered yet:
>
>> 2010-01-12 gingold <gingold@adacore.com>
>>
>> * windows-nat.c (windows_continue): Use %x to print thread id.
>> (get_windows_debug_event): Ditto.
>
>This is OK.
Sorry, yes, this is ok.
cgf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA]: windows: always use %x to print thread id
2010-01-15 19:21 ` Christopher Faylor
@ 2010-01-25 10:55 ` Tristan Gingold
0 siblings, 0 replies; 4+ messages in thread
From: Tristan Gingold @ 2010-01-25 10:55 UTC (permalink / raw)
To: Christopher Faylor; +Cc: gdb-patches ml, Joel Brobecker
On Jan 15, 2010, at 8:21 PM, Christopher Faylor wrote:
> On Fri, Jan 15, 2010 at 10:35:23AM +0400, Joel Brobecker wrote:
>>> also this is a not for the user, tid in messages displayed by 'set
>>> debugevents 1' are often in decimal and sometimes in hexadecimal. But
>>> windows_pid_to_str prints the tid in hexa. As this is slightly
>>> confusing, with this patch the tid is always printed in hexadecimal.
>>
>> I think this makes sense, and since Chris hasn't answered yet:
>>
>>> 2010-01-12 gingold <gingold@adacore.com>
>>>
>>> * windows-nat.c (windows_continue): Use %x to print thread id.
>>> (get_windows_debug_event): Ditto.
>>
>> This is OK.
>
> Sorry, yes, this is ok.
Thanks, committed.
Tristan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-25 10:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-12 15:55 [RFA]: windows: always use %x to print thread id Tristan Gingold
2010-01-15 6:35 ` Joel Brobecker
2010-01-15 19:21 ` Christopher Faylor
2010-01-25 10:55 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox