PERFORCE change 55293 for review

Marcel Moolenaar marcel at FreeBSD.org
Sat Jun 19 07:10:32 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=55293

Change 55293 by marcel at marcel_nfs on 2004/06/19 07:09:11

	Cast td_tid to long for printing. This makes it easy to change
	lwpid_t to a pointer type later, if such would be beneficial.

Affected files ...

.. //depot/projects/gdb/sys/ddb/db_thread.c#7 edit

Differences ...

==== //depot/projects/gdb/sys/ddb/db_thread.c#7 (text+ko) ====

@@ -41,7 +41,7 @@
 void
 db_print_thread(void)
 {
-	db_printf("[thread %d]\n", kdb_thread->td_tid);
+	db_printf("[thread %ld]\n", (long)kdb_thread->td_tid);
 }
 
 void
@@ -65,8 +65,8 @@
 		if (thr != NULL) {
 			err = kdb_thr_select(thr);
 			if (err != 0) {
-				db_printf("unable to switch to thread %d\n",
-				    (int)thr->td_tid);
+				db_printf("unable to switch to thread %ld\n",
+				    (long)thr->td_tid);
 				return;
 			}
 			db_dot = PC_REGS();
@@ -93,7 +93,7 @@
 	pager_quit = 0;
 	thr = kdb_thr_first();
 	while (!pager_quit && thr != NULL) {
-		db_printf("  %6d (%p)  ", (int)thr->td_tid, thr);
+		db_printf("  %6ld (%p)  ", (long)thr->td_tid, thr);
 		prev_jb = kdb_jmpbuf(jb);
 		if (setjmp(jb) == 0) {
 			if (db_trace_thread(thr, 1) != 0)


More information about the p4-projects mailing list