Software watchpoint breakage on SuperH

Eli Zaretskii eliz@is.elta.co.il
Sat Jun 8 22:10:00 GMT 2002


On Thu, 6 Jun 2002, Paul Mundt wrote:

> Watchpoint 3 deleted because the program has left the block in
> which its expression is valid.
> printf (format=3D0x4005dc "%d\n") at printf.c:33
> 33      printf.c: No such file or directory.
> 	in printf.c
> (gdb) c
> Continuing.
> 10
> 
> Program exited normally.
> (gdb)=20
> 
> Everything looks fine up until the point it tries to do the printf().
> 
> Is there something that needs to be implemented per target to support softw=
> are
> watchpoints properly? If not, does anyone have any suggestions as to what
> could be going wrong in the above, and better yet, suggestions for possible
> fixes?

It's not necessarily a problem with watchpoint support.  It could be that 
GDB cannot reliably detect where the current value of PC belong, so it 
mistakenly reports it's inside printf while in fact it's after `main' 
returns.

Another possibility is that the code which determines the current stack 
frame is faulty (that's the code GDB runs to know whether the watchpoint 
is in scope).



More information about the Gdb mailing list