[Lldb-commits] [lldb] r143659 - /lldb/trunk/tools/darwin-threads/examine-threads.c
Jim Ingham
jingham at apple.com
Thu Nov 3 14:43:55 PDT 2011
Author: jingham
Date: Thu Nov 3 16:43:55 2011
New Revision: 143659
URL: http://llvm.org/viewvc/llvm-project?rev=143659&view=rev
Log:
Print out the task suspend count as well.
Modified:
lldb/trunk/tools/darwin-threads/examine-threads.c
Modified: lldb/trunk/tools/darwin-threads/examine-threads.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/darwin-threads/examine-threads.c?rev=143659&r1=143658&r2=143659&view=diff
==============================================================================
--- lldb/trunk/tools/darwin-threads/examine-threads.c (original)
+++ lldb/trunk/tools/darwin-threads/examine-threads.c Thu Nov 3 16:43:55 2011
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <mach/mach.h>
+#include <mach/task_info.h>
#include <time.h>
#include <sys/sysctl.h>
#include <ctype.h>
@@ -309,6 +310,17 @@
exit (1);
}
+ struct task_basic_info info;
+ unsigned int info_count = TASK_BASIC_INFO_COUNT;
+
+ kr = task_info (task, TASK_BASIC_INFO, (task_info_t) &info, &info_count);
+ if (kr != KERN_SUCCESS)
+ {
+ printf ("Error - unable to call task_info.\n");
+ exit (1);
+ }
+ printf ("Task suspend count: %d.\n", info.suspend_count);
+
struct timespec *rqtp = (struct timespec *) malloc (sizeof (struct timespec));
rqtp->tv_sec = 0;
rqtp->tv_nsec = 150000000;
More information about the lldb-commits
mailing list