This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PowerPC hardware watchpoints unstable with GDB and Xenomai


Hello,

I am trying to debug (applications, not kernel) using hardware watchpoints (memory breakpoints) with 

GDB: 7.10.1 and 7.11 (local mode)
Processor: PowerPC e300c3 (MPC8309E)
Xenomai: 2.6.1
Linux: 3.1.10-ipipe

I have two issues:

1) If I set up a while(1) loop with (a global) counter and sleep, and place the watchpoint on the counter variable, I get GDB to break nicely to each increment if I use usleep() in my loop. Instead, if I use rt_task_sleep(), the watchpoint may go unnoticed for up to 100 loops, then trigger, then again go unnoticed for 5 loops and so on. Triggering happens on correct line, though. This is reproducable with a simple C main with only rt_task_shadow and the loop. 

2) The watchpoint seems to go broken (at least sometimes) when new (rt) threads are being created. The GDB still thinks the watchpoint exists, but it never gets triggered. If I remove the wp and create it again, it starts triggering. This finding I will investigate further and see if it is reproducable with simple test code.

Are these known issues? I found only little information about using watchpoints on xenomai, so is it something rarely used? Or is the PowerPC integration the broken part here? GDB, in turn, has had some patches on the hardware-watchpoint inheritance at thread creation, so I would assume that it at least "should work". Any hints for debugging the issue further?

BR,
Lassi Niemistö
Wapice Oy
Vaasa, Finland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]