* detecting breakpoint type and number
@ 2004-07-14 23:09 Charlls Quarra
2004-07-15 1:27 ` Daniel Jacobowitz
2004-07-15 6:42 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: Charlls Quarra @ 2004-07-14 23:09 UTC (permalink / raw)
To: gdb
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
cheers
___________________________________________________________
100mb gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: detecting breakpoint type and number
2004-07-14 23:09 detecting breakpoint type and number Charlls Quarra
@ 2004-07-15 1:27 ` Daniel Jacobowitz
2004-07-15 6:42 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-07-15 1:27 UTC (permalink / raw)
To: Charlls Quarra; +Cc: gdb
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: detecting breakpoint type and number
2004-07-14 23:09 detecting breakpoint type and number Charlls Quarra
2004-07-15 1:27 ` Daniel Jacobowitz
@ 2004-07-15 6:42 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2004-07-15 6:42 UTC (permalink / raw)
To: charlls_quarra; +Cc: gdb
> Date: Wed, 14 Jul 2004 20:01:07 -0300 (ART)
> From: =?iso-8859-1?q?Charlls=20Quarra?= <charlls_quarra@yahoo.com.ar>
>
> 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
I don't understand why you need this. You could simply specify the
condition when you set the watchpoint:
(gdb) watch *(int*)$address if *(int*)$address == <expected_value>
or use the `condition' command (which see) for an already existing
watchpoint.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-15 3:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-14 23:09 detecting breakpoint type and number Charlls Quarra
2004-07-15 1:27 ` Daniel Jacobowitz
2004-07-15 6:42 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox