Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Steven Johnson <sjohnson@neurizon.net>
To: cerickson@mvista.com
Cc: Wolfgang Schmieder <wolfgang.schmieder@onlinehome.de>,
	 gdb@sources.redhat.com
Subject: Re: hardware watchpoints for ppc
Date: Wed, 07 Jul 2004 00:28:00 -0000	[thread overview]
Message-ID: <40EB43B0.5070009@neurizon.net> (raw)
In-Reply-To: <40EABB0E.7080309@mvista.com>

Cal,

The MPC855, being a varient of the MPC860 Family does have hardware 
watchpoint support.  If you debug stub doesnt support it, you are going 
to have to program the registers up manually. (It can be done, but you 
will need to trial and error it).  I suggest reading the section of the 
MPC855 Manual (or MPC860 Manual) on the Breakpoint/Watchpoint 
registers.  It is with the stuff on BDM Debugging.  I have a custom GDB 
Stub that uses BDM to debug the target, it supports it, but I dont know 
anything about commercial stubs or non BDM Stubs support for it.  If you 
are using your own custom stub, or have the code of your stub, you could 
always implement it.

For a once off, I would just manually tweak the SPR registers. 
[CMPA/B/C/D ICR DER COUNTA/B CMPE/F/G/H LCTRL1/2 and ICTRL] to achieve 
what you want.  In my MPC862 book, it is documented in section 45.5 
Development Support Programming Model.  All of these should be able to 
be set from GDB like any other register, if your target is an MPC8XX 
(and not Generic PowerPC).

Steven


Cal Erickson wrote:

> Wolfgang,
> From what I know there are no hardware watchpoints available on the PPC
> target boards. You might just try watch which will create a software
> watchpoint. These do work on PPC processors.
>
> Cal
>
> Wolfgang Schmieder wrote:
>
>> Hello,
>>
>> is there anybody who knows how I can set hardware watchpoints on ppc 
>> boards ? I have a mpc855 board running a multithreaded application. 
>> It appears that one thread (always the same thread) has a corrupted 
>> stack (always at the same address). I guess I need to set a hardware 
>> watchpoint in a remote debugging session to find the piece of code 
>> which is corrupting the stack.
>>
>> There is one gdb mailing list thread about "supporting hw break/watch 
>> for embedded ppc", which makes me think that there is at least a 
>> patch or workaround available to set hardware watchpoints on a ppc 
>> board.
>>
>> Thanks,
>>
>> Wolfgang
>>
>>
>
>


  reply	other threads:[~2004-07-07  0:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-04  9:06 Wolfgang Schmieder
2004-07-06 14:51 ` Cal Erickson
2004-07-07  0:28   ` Steven Johnson [this message]
     [not found] ` <200407062229.18395.wolfgang.schmieder@onlinehome.de>
     [not found]   ` <40EB0C0D.8020806@mvista.com>
2004-07-12 20:38     ` Wolfgang Schmieder
2004-07-12 23:15       ` Steven Johnson
2004-09-25 15:08         ` Wolfgang Schmieder

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=40EB43B0.5070009@neurizon.net \
    --to=sjohnson@neurizon.net \
    --cc=cerickson@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=wolfgang.schmieder@onlinehome.de \
    /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