comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: stacktrace gan on raspberry pi
Date: Tue, 11 May 2021 10:27:15 +0200	[thread overview]
Message-ID: <s7df54$hmg$1@dont-email.me> (raw)
In-Reply-To: <ly5yzpvhzo.fsf@pushface.org>

Den 2021-05-11 kl. 09:37, skrev Simon Wright:

> 
> I think you need to compile and link your code with -g to rsp generate &
> preserve symbol information. In a GPR, this should do the trick:
> 
>     package Builder is
>        for Default_Switches ("ada") use ("-g");
>     end Builder;
> 
> Also, -gnateE should "generate extra information in exception messages".
> 


Hmm, I do.

If I run with -v for gprbuild I get

ubuntu@ubuntu:~/svn/wcs-std/target/core$ gprbuild -v -j0 -p 
-XUse_Data_Base=1 -P core.gpr "chain2xml"
Changing to object directory of "Core": 
"/home/ubuntu/svn/wcs-std/target/adalib/global_gpr/core/"
/usr/bin/aarch64-linux-gnu-gnatgcc -c -x ada -gnatA -g -gnatoU -gnat12 
-Os -funwind-tables -fstack-check -gnata -gnatw.d -gnatH -gnatJ -gnatwla 
-gnatwJ -gnatwK -gnatwW -gnatye -gnatec=/tmp/GNAT-TEMP-000011.TMP 
-gnatem=/tmp/GNAT-TEMP-000012.TMP 
/home/ubuntu/svn/wcs-std/source/kernel/core/local/chain2xml.adb
chain2xml.adb:47:01: warning: variable "a" is never read and never 
assigned [-gnatwv]
/usr/lib/gprbuild/gprbind chain2xml.bexch
/usr/bin/aarch64-linux-gnu-gnatbind -shared -o b__chain2xml.adb 
/home/ubuntu/svn/wcs-std/target/adalib/global_gpr/core/chain2xml.ali -E 
-x -O
/usr/bin/aarch64-linux-gnu-gnatgcc -c -x ada -gnatA -c -gnatA -gnatWb 
-gnatiw -gnatws -Os -g -funwind-tables -fstack-check=specific 
-mlittle-endian -mabi=lp64 b__chain2xml.adb -o b__chain2xml.o
aarch64-linux-gnu-gnatgcc chain2xml.o @/tmp/GNAT-TEMP-000016.TMP


which saya I use both '-g' and '-E' for compiler and binder.




I have the below (exerp) switches on - which inclues -g and -gnateE in 
the gpr file

On win86/win64/lnx86/lnx64/mac64/aix32 I get the traceback




Platform_Independent_Compiler_Switches :=
                                           ("-g", -- debug
                                            "-gnatoU",
                                            "-gnat12",
                                            "-Os", -- to reduce size
                                            "-funwind-tables",
                                            "-fstack-check",
                                            "-gnata"); --assertions on



Compiler_Dependent_Compiler_Switches := ("-gnatw.d","-gnatH","-gnatJ");


  Simple_Style_Check_Compiler_Switches :=
      ("-gnatye"     --require 'end procedurename'
      );

  Low_Warnings_Compiler_Switches :=
      ("-gnatwla",
       "-gnatwJ",   -- Suppress warnings on obsolescent features
       "-gnatwK",   -- no warnings like '... could be declared constant'
       "-gnatwW"    -- Suppress warnings on wrong low bound assumption
      );

Warning_Switches := Low_Warnings_Compiler_Switches & 
Simple_Style_Check_Compiler_Switches;


  Platform_Dependent_Compiler_Switches := ();

   package Compiler is
      for Default_Switches ("Ada") use
            Platform_Independent_Compiler_Switches &
            Compiler_Dependent_Compiler_Switches &
            Warning_Switches &
            Platform_Dependent_Compiler_Switches;
    end Compiler;


    package Binder is
     case Compiler_Version is
        when others => for Default_Switches ("Ada") use ("-E");
      end case;
    end Binder;



-- 
Björn

  reply	other threads:[~2021-05-11  8:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 16:01 stacktrace gan on raspberry pi Björn Lundin
2021-05-10 16:53 ` Joakim Strandberg
2021-05-11  8:28   ` Björn Lundin
2021-05-11  7:37 ` Simon Wright
2021-05-11  8:27   ` Björn Lundin [this message]
2021-05-11  9:51     ` Simon Wright
2021-05-11 11:17       ` Dmitry A. Kazakov
2021-05-11 16:32         ` Björn Lundin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox