This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
PowerPC hardware watchpoints unstable with GDB and Xenomai
- From: Lassi Niemistö <lassi dot niemisto at wapice dot com>
- To: "gdb at sourceware dot org" <gdb at sourceware dot org>, "xenomai at xenomai dot org" <xenomai at xenomai dot org>
- Date: Mon, 13 Jun 2016 13:49:25 +0000
- Subject: PowerPC hardware watchpoints unstable with GDB and Xenomai
- Authentication-results: sourceware.org; auth=none
- References: <47132d04b76942d8bd15c82a5a460f7b at EDB3 dot wapice dot localdomain> <20160403190948 dot GC20399 at hermes dot click-hack dot org> <20160430064939 dot GC1781 at hermes dot click-hack dot org>
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