From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4108 invoked by alias); 31 Oct 2009 15:41:35 -0000 Received: (qmail 4098 invoked by uid 22791); 31 Oct 2009 15:41:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 31 Oct 2009 15:41:30 +0000 Received: (qmail 9891 invoked from network); 31 Oct 2009 15:41:28 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 Oct 2009 15:41:28 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] cleanup: Remove INVALID_ENTRY_POINT (+FR-V modification) Date: Sat, 31 Oct 2009 15:41:00 -0000 User-Agent: KMail/1.9.10 Cc: Jan Kratochvil References: <20091031150829.GA27608@host0.dyn.jankratochvil.net> In-Reply-To: <20091031150829.GA27608@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910311542.13318.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2009-10/txt/msg00707.txt.bz2 On Saturday 31 October 2009 15:08:29, Jan Kratochvil wrote: > @@ -316,7 +320,7 @@ entry_point_address (void) > =A0 =A0struct gdbarch *gdbarch; > =A0 =A0CORE_ADDR entry_point; > =A0 > - =A0if (symfile_objfile =3D=3D NULL) > + =A0if (symfile_objfile =3D=3D NULL || !symfile_objfile->ei.entry_point_= p) > =A0 =A0 =A0return 0; Previously, when we had a main symbol file, but the entry point was invalid (how common is that?), we'd return ~0 here, but now we'll return 0. Is there potential for breakage? inside_entry_func for instance could trigger false positives more often. Makes me wonder about exposing the invalid-entry-point-ity to callers. Say, by adding a new entry_point_address_p(), or better, adjusting the interface to: /* If there's a valid and known entry point, fills ENTRY_P with it and return true; otherwise return false. */ int entry_point_address (CORE_ADDR *entry_p); Otherwise looks ok to me. --=20 Pedro Alves