Re: gdb 6.3 misses breakpoint on Linux when inferior does clone()

Daniel Jacobowitz
2005-05-26T19:43:45Z

On Thu, May 26, 2005 at 12:40:39PM -0700, Satish Mohan wrote:
> Hi Â If the inferior does a clone(...,CLONE_VM,...) on Linux, then gdb
> deletes breakpoints in the child which indirectly affects the parent
> because of CLONE_VM. The following sample code illustrates the
> problem:

The kernel does not provide any interface for GDB to know whether or
not a clone syscall has used CLONE_VM. Until it does, there's very
little that GDB can do about this. It assumes that clone using SIGCHLD
is not sharing a VM space, and clone using a different signal is.