This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: detecting breakpoint type and number
- From: Daniel Jacobowitz <drow at false dot org>
- To: Charlls Quarra <charlls_quarra at yahoo dot com dot ar>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 14 Jul 2004 20:47:27 -0400
- Subject: Re: detecting breakpoint type and number
- References: <20040714230107.40234.qmail@web41813.mail.yahoo.com>
On Wed, Jul 14, 2004 at 08:01:07PM -0300, Charlls Quarra wrote:
>
> Hi,
>
> I have a script that continues on a watchpointed
> variable untils its value becomes something expected.
> the script looks like this:
>
> define bla
> set $conti=1
> while $conti==1
> set $u=*(int*)$address
> if $u==<expected_value>
> set $conti=0
> else
> cont
> end
> end
> end
>
> note the cont command in the else subclause; the
> problem is that i dont know how to detect if the stop
> was due to my watchpointed variable at $address, or
> some other breakpoint/watchpoint occuring
> simultaneously.
>
> can i attach procedures to particular
> watchpoints/breakpoints that get called when they are
> triggered? apparently the only way to figure out what
> type of break occurred is to have breaks/watchs to
> modify dedicated variables
Take a look at the "commands" command.
--
Daniel Jacobowitz