Skip to contentSkip to conversation

c debugging w/ gdb revisited

DISCUSSION jnf 3 participants 3 messages Jun 14, 2002

lore
Share & tools
lore
#1 lore raw
In reply to jnf

just a quick question, does anyone know if its possible to set a break/watchpoint in gdb when a register points to a certain location? i own the gdb manual, and have been playing in it for a bit and just cant seem to figure it out, is it possible?

I don't believe that could be done at all, the machine would have to stop whenever it mov'd a value to the register so the debugger could examine it. I don't think that's possible on Intel machines, anyway.

--
Billy O'Connor

jnf

author
#0 lore raw

just a quick question, does anyone know if its possible to set a break/watchpoint in gdb when a register points to a certain location? i own the gdb manual, and have been playing in it for a bit and just cant seem to figure it out, is it possible?

_____________________________________________________________
Sign up for FREE email from DoItYourself.com at http://doityourself.com

_____________________________________________________________
Promote your group and strengthen ties to your members with [email protected] by Everyone.net http://www.everyone.net/?btn=tag

#2 lore raw

On Thu, 13 Jun 2002 23:52:35 -0700 (PDT)
jnf <[email protected]> wrote:

J> just a quick question, does anyone know if its possible to set a break/watchpoint in gdb when a register points to a certain location? J> i own the gdb manual, and have been playing in it for a bit and just cant seem to figure it out, is it possible?

No, you can't (x86 at least).

What you can do is to watch the contents of the registers constantly and then manually stop your program.

Felipe