This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Reporting 'out of hardware breakpoints' situation
> Date: Wed, 24 Jun 2009 13:46:54 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Vladimir Prus <vladimir@codesourcery.com>, gdb@sources.redhat.com
>
> So figuring out how many breakpoints are available is pretty
> complex.
I think it's pretty much impossible. (We have a similar problem with
hardware watchpoints.) Several breakpoints can be set to the same
address, in which case a single register can serve all of them, but
deciding that this is the case is tricky at best.
I think the way of throwing an exception and then handling it to
revert to the original state is much more promising.