[mi] watchpoint-scope exec async command

Daniel Jacobowitz drow@false.org
Mon Mar 28 22:40:00 GMT 2005


On Mon, Mar 28, 2005 at 05:56:19PM -0500, Bob Rossi wrote:
>    (gdb) n
>    Hardware watchpoint 2 deleted because the program has left the block
>    in which its expression is valid.
>    Segmentation fault
> 
> The crash only happens sometimes. Although when I run it over and over,
> I will eventually get it.
> 
> Here is the problem I found,
> 
>    (gdb) n
>    Hardware watchpoint 2 deleted because the program has left the block
>    in which its expression is valid.
>    ==26644== Invalid write of size 4
>    ==26644==    at 0x80D9B32: insert_bp_location (breakpoint.c:1022)
>    ==26644==    by 0x80D9EDA: insert_breakpoints (breakpoint.c:1151)
>    ==26644==    by 0x8119620: proceed (infrun.c:774)

I envy you.  I can't get valgrind to work with GDB; once I try to run a
child process, it falls over.

> So, basically, I can't figure out why the breakpoint field
> 'related_breakpoint' became in valid. I believe it was valid when the
> breakpoint was created, since the memset is there. However, at some
> point, it must have become invalid ...

The related breakpoint is supposed to be the scope breakpoint; I can't
see how they could become unpaired.  You may want to run a debugger on
GDB, using a watchpoint to see what changes it?

-- 
Daniel Jacobowitz
CodeSourcery, LLC



More information about the Gdb mailing list