Multithreaded debugging of kernel using kgdb

Hi List,

I am debugging Linux kernel using gdb (KGDB patch). I am successsfully
able to set breakpoints in the kernel and step though the code as far
as a single thread of execution is concerned.

However, I was curious so as to how can I simulate and debug a race
condition that involves multiple threads?

For e.g., I want to simulate and analyse the state of some data structures when:

Process P1 takes a semaphore S.
.......
(At certain time) Process P2 becomes runnable and preempts P1

How do I perform a context switch and simulate that "while P1 is
executing this instruction, P2 preempts it". Is it possible?

Thanks,

Rick
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Rick Brown [ Do, 10 Mai 2007 14:41 ] [ ID #1708744 ]
Linux » gmane.linux.newbie » Multithreaded debugging of kernel using kgdb

Vorheriges Thema: "BUG: soft lockup detected on CPU#0!"
Nächstes Thema: [newbie]socket in kernel land