This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] solib-svr4.c: Never attempt to place breakpoints on _start, __start, or main
> Date: Fri, 17 Sep 2010 16:40:15 -0700
> From: Kevin Buettner <kevinb@redhat.com>
>
> On Fri, 17 Sep 2010 10:10:18 +0200 (CEST)
> Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>
> > Obviously it is pointless to keep removing and reinserting these
> > breakpoints. Perhaps they should be disabled as soon as one of them
> > has been hit?
>
> That sounds like a good idea. It's not sufficient though for
> debugging scenarios in which one attaches to a program that's
> already gone past start or main. Perhaps we should skip the
> attempt to place a breakpoint on _start, __start, and main
> when attaching?
Probably. We attempt to read the list of shared libraries when we
attach, and I'd be impressed if somebody would be able to attach to a
process before it hits _start ;).