This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about watchpoint


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]