This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Software watchpoint breakage on SuperH
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- To: Paul Mundt <lethal at ChaoticDreams dot ORG>
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 9 Jun 2002 08:08:33 +0300 (IDT)
- Subject: Re: Software watchpoint breakage on SuperH
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).