Why no hwatch command in gdb ?
robert song
robertsong.japan@gmail.com
Thu Mar 10 10:09:00 GMT 2011
Hi, Jan,
On 3/10/11, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> Watchpoints are normally created by default as hardware ones. They should
> fallback to their software variants when you get out of the number of debug
> registers but that does not work well now.
>
"does not work well now" means ?
> You can request hardware vs. software watchpoints by using:
> (gdb) help set can-use-hw-watchpoints
> Set debugger's willingness to use watchpoint hardware.
> If zero, gdb will not use hardware for new watchpoints, even if
> such is available. (However, any hardware watchpoints that were
> created before setting this to nonzero, will continue to use watchpoint
> hardware.)
>
> The difference is that software breakpoints are very cheap so GDB does not
> even
> attempt to create hardware breakpoints. While software watchpoints are very
> expensive so - in fact GDB does not normally try to fallback to software
> ones.
> When you have to use software watchpoints it is commonly even not viable to
> wait for so long.
The problem is that sometimes I just want to set only hardware
watchpoints, and don't want to set software watchpoints. But the
watchpoint will be changed to software ones if hardware watchpoints
are exceeded, and if I have command like hwatch, I can avoid it.
Regards,
robert
More information about the Gdb
mailing list