From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6198 invoked by alias); 4 Aug 2011 12:59:06 -0000 Received: (qmail 6185 invoked by uid 22791); 4 Aug 2011 12:59:05 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_SUB_GETRID X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Aug 2011 12:58:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DAD462BB382; Thu, 4 Aug 2011 08:58:45 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tMOMqPQt+1hT; Thu, 4 Aug 2011 08:58:45 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id B15442BB16B; Thu, 4 Aug 2011 08:58:45 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id AB34F3FEE8; Thu, 4 Aug 2011 08:58:45 -0400 (EDT) Date: Thu, 04 Aug 2011 12:59:00 -0000 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Tristan Gingold Subject: [Ada] Get rid of break_start Message-ID: <20110804125845.GA7406@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg00466.txt.bz2 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 410 This could be used by the debugger to stop the execution before starting the main subprogram, but no debugger use it. No testcase as there is no functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Tristan Gingold * bindgen.adb: Remove code the reference or create the Break_Start/__gnat_break_start procedure. * s-stalib.adb (Break_Start): Removed. --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=difs Content-length: 3870 Index: bindgen.adb =================================================================== --- bindgen.adb (revision 177366) +++ bindgen.adb (working copy) @@ -2301,7 +2301,6 @@ WBI (" " & Ada_Init_Name.all & ";"); if not No_Main_Subprogram then - WBI (" Break_Start;"); if CodePeer_Mode then @@ -2477,7 +2476,6 @@ WBI (" " & Ada_Init_Name.all & " ();"); if not No_Main_Subprogram then - WBI (" __gnat_break_start ();"); -- Output main program name @@ -3059,21 +3057,8 @@ if Bind_Main_Program and then VM_Target = No_VM then - -- If we have the standard library, then Break_Start is defined - -- there, but when the standard library is suppressed, Break_Start - -- is defined here. - WBI (""); - WBI (" procedure Break_Start;"); - if Suppress_Standard_Library_On_Target then - WBI (" pragma Export (C, Break_Start, ""__gnat_break_start"");"); - else - WBI (" pragma Import (C, Break_Start, ""__gnat_break_start"");"); - end if; - - WBI (""); - if Exit_Status_Supported_On_Target then Set_String (" function "); else @@ -3232,18 +3217,6 @@ Gen_Adainit_Ada; if Bind_Main_Program and then VM_Target = No_VM then - - -- When suppressing the standard library then generate dummy body - -- for Break_Start - - if Suppress_Standard_Library_On_Target then - WBI (""); - WBI (" procedure Break_Start is"); - WBI (" begin"); - WBI (" null;"); - WBI (" end;"); - end if; - Gen_Main_Ada; end if; @@ -3321,7 +3294,6 @@ WBI ("extern void exit (int);"); end if; - WBI ("extern void __gnat_break_start (void);"); Set_String ("extern "); if ALIs.Table (ALIs.First).Main_Program = Proc then @@ -3417,14 +3389,6 @@ WBI (""); end if; - -- When suppressing the standard library, the __gnat_break_start routine - -- (for the debugger to get initial control) is defined in this file. - - if Suppress_Standard_Library_On_Target then - WBI ("void __gnat_break_start (void) {}"); - WBI (""); - end if; - -- Generate the __gnat_version and __gnat_ada_main_program_name info -- only for the main program. Otherwise, it can lead under some -- circumstances to a symbol duplication during the link (for instance Index: s-stalib.adb =================================================================== --- s-stalib.adb (revision 177274) +++ s-stalib.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -94,7 +94,8 @@ pragma Export (C, Break_Start, "__gnat_break_start"); -- This is a dummy procedure that is called at the start of execution. -- Its sole purpose is to provide a well defined point for the placement - -- of a main program breakpoint. + -- of a main program breakpoint. This is not used anymore but kept for + -- bootstrapping issues (still referenced by old gnatbind generated files). procedure Break_Start is begin --BXVAT5kNtrzKuDFl--