From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32486 invoked by alias); 8 Jun 2012 13:37:22 -0000 Received: (qmail 32289 invoked by uid 22791); 8 Jun 2012 13:37:20 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,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; Fri, 08 Jun 2012 13:37:06 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q58Dat4j031145; Fri, 8 Jun 2012 15:36:55 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q58Dar6Y019154; Fri, 8 Jun 2012 15:36:53 +0200 (CEST) Date: Fri, 08 Jun 2012 13:37:00 -0000 Message-Id: <201206081336.q58Dar6Y019154@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: palves@redhat.com CC: jan.kratochvil@redhat.com, macro@codesourcery.com, Joakim.Tjernlund@transmode.se, gdb-patches@sourceware.org In-reply-to: <4FD1F902.5000705@redhat.com> (message from Pedro Alves on Fri, 08 Jun 2012 14:07:14 +0100) Subject: Re: [PATCH] solib-svr4: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot References: <1338562868-22411-1-git-send-email-Joakim.Tjernlund@transmode.se> <4FC8EC08.1060609@redhat.com> <20120601172214.GA21236@host2.jankratochvil.net> <4FC8FDD2.7060407@redhat.com> <4FD1EB8C.1050407@redhat.com> <20120608123847.GA13337@host2.jankratochvil.net> <4FD1F902.5000705@redhat.com> 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: 2012-06/txt/msg00229.txt.bz2 > Date: Fri, 08 Jun 2012 14:07:14 +0100 > From: Pedro Alves > > On 06/08/2012 01:38 PM, Jan Kratochvil wrote: > > I still do not see why 'main' was not left there as it would not hurt and it > > could help. > > The original patch was trivial, and a one liner. I preferred not > requiring bigger changes and risk needing to require copyright > assignment for that patch. Then, GDB has not been trapping on > "main", but on "_start" for static binaries for a long time, so that > even feels like a separate "feature" to me. The problem here is that "_start" is by no means a standardized name, whereas "main" is (although there are some exceptions). > I even feel like we could/should drop the "_start/main" fallback > from svr4 handling. It's just historic at this point, as far as I > could ascertain. If those are really needed on some system, then a > comment in the code mentioning such system is warranted. Please don't do this. The fallback is useful when bringing up GDB on a new platform that decided to use yet another name for the ld.so state point "function". Or in other cases where for some reason placing breakpoints in ld.so doesn't work but putting them in the executable itself does work. I've been in that situation at least a couple of times in the past couple of years.