Breakpoint 1 at 0x80acf43: file ./machine/thread.h, line 83.
(gdb)
-Next type 'c' in the gdb prompt to resume vkernel execution:
+Next we type 'c' in the gdb prompt to resume vkernel execution:
(gdb) c
Continuing.
83 __asm ("movl %%fs:globaldata,%0" : "=r" (gd) : "m"(__mycpu__dummy));
(gdb)
-We navigate through source code with the 'step' and 'next' gdb commands. They are identical, except that 'step' follows function calls. We
+We navigate through source code with the 'step' and 'next' gdb commands. They are identical, except that 'step' follows function calls. When we meet this call:
-276 allproc_scan(ktrace_clear_callback, &info);
+ 276 allproc_scan(ktrace_clear_callback, &info);
+
+we 'step' inside it. alloproc_scan() iterates through the process list and applies the ktrace_clear_callback() to each one of them.
+Later we see this:
+
+ 347 if (p->p_tracenode->kn_vp == info->tracenode->kn_vp) {
+
+Here p is a pointer to the current process:
+ (gdb) print p
+ $1 = (struct proc *) 0x57098c00
+
+Let's see if this process is traced:
+ (gdb) print p->p_tracenode
+ $2 = (struct ktrace_node *) 0x0
+ (gdb)
+
+Oops. There is no trace to a vnode for this process.