From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10952 invoked by alias); 18 Sep 2010 09:25:18 -0000 Received: (qmail 10940 invoked by uid 22791); 18 Sep 2010 09:25:17 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Sep 2010 09:25:11 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o8I9OpfE004251; Sat, 18 Sep 2010 11:24:51 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o8I9OnM9008112; Sat, 18 Sep 2010 11:24:49 +0200 (CEST) Date: Sat, 18 Sep 2010 16:03:00 -0000 Message-Id: <201009180924.o8I9OnM9008112@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: kevinb@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20100917164015.69011490@mesquite.lan> (message from Kevin Buettner on Fri, 17 Sep 2010 16:40:15 -0700) Subject: Re: [RFC] solib-svr4.c: Never attempt to place breakpoints on _start, __start, or main References: <20100916152334.7e4f1ee5@mesquite.lan> <201009170810.o8H8AITW028258@glazunov.sibelius.xs4all.nl> <20100917164015.69011490@mesquite.lan> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00327.txt.bz2 > Date: Fri, 17 Sep 2010 16:40:15 -0700 > From: Kevin Buettner > > On Fri, 17 Sep 2010 10:10:18 +0200 (CEST) > Mark Kettenis 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 ;).