Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Lassi Niemistö" <lassi.niemisto@wapice.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>,
	"xenomai@xenomai.org"	<xenomai@xenomai.org>
Subject: PowerPC hardware watchpoints unstable with GDB and Xenomai
Date: Mon, 13 Jun 2016 13:49:00 -0000	[thread overview]
Message-ID: <42c54218160e4143baa545e4ee994e81@EDB2.wapice.localdomain> (raw)
In-Reply-To: <20160430064939.GC1781@hermes.click-hack.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


           reply	other threads:[~2016-06-13 13:49 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20160430064939.GC1781@hermes.click-hack.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42c54218160e4143baa545e4ee994e81@EDB2.wapice.localdomain \
    --to=lassi.niemisto@wapice.com \
    --cc=gdb@sourceware.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox