public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* PowerPC hardware watchpoints unstable with GDB and Xenomai
       [not found]   ` <20160430064939.GC1781@hermes.click-hack.org>
@ 2016-06-13 13:49     ` Lassi Niemistö
  0 siblings, 0 replies; only message in thread
From: Lassi Niemistö @ 2016-06-13 13:49 UTC (permalink / raw)
  To: gdb, 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-13 13:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <47132d04b76942d8bd15c82a5a460f7b@EDB3.wapice.localdomain>
     [not found] ` <20160403190948.GC20399@hermes.click-hack.org>
     [not found]   ` <20160430064939.GC1781@hermes.click-hack.org>
2016-06-13 13:49     ` PowerPC hardware watchpoints unstable with GDB and Xenomai Lassi Niemistö

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).