This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Question about watchpoint
- From: Andrew Cagney <cagney at gnu dot org>
- To: Lan Zhang <Lan dot Zhang at Zoran dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 18:15:22 -0400
- Subject: Re: Question about watchpoint
- References: <E65CD2CAB74C80498703D6EF7624BB4C01E63B09@zmaex.zma.zoran.com>
Hi,
I have another question about set watchpoint, the embedded system I used
is ARM7TDMI, and it support 2 watchpoints. When I set wathcpoint on the
GDB host said, why it read lots of memory?
The target lacks hardware watchpoint support -> you'd otherwize see `Z4'
packets going by. Consequently, GDB does a brute force implementation
of watchpoints using single-step and memory reads.
> And the last two are weird,
> one is the last saved pc, and other is the address saved in that pc
> subtracts 4. And after continue, it will set breakpoint in that address
> saved in pc!
It sounds like GDB unwinding the stack to find the caller frame.
Andrew
> I think the answer is very easy for you. But I spend a lot of time on
> that, and still not understand. Could anybody give me an answer?
Thanks a lot.
Regards,
Lan