Multithreaded debugging of kernel using kgdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux