[Ada] armhf-linux: symbolic tracebacks
authorDoug Rupp <rupp@adacore.com>
Mon, 30 Nov 2020 19:09:58 +0000 (11:09 -0800)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Dec 2020 13:01:04 +0000 (08:01 -0500)
gcc/ada/

* libgnat/s-objrea.ads (Object_Arch): Add ARM enum
* libgnat/s-objrea.adb (Initialize): Add EM_ARM case.
(Read_Address): Add ARM case to 32bit read.
* Makefile.rtl: Add trasym units to the runtime for armhf-linux.

gcc/ada/Makefile.rtl
gcc/ada/libgnat/s-objrea.adb
gcc/ada/libgnat/s-objrea.ads

index 8c99258f7b828fff2c398f8d5902a31356da695f..22336e1524936b6866fe781f0c717ea9cd0ccada 100644 (file)
@@ -2381,12 +2381,14 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
   s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
   s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
   s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
+  $(TRASYM_DWARF_UNIX_PAIRS) \
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS) \
   system.ads<libgnat/system-linux-arm.ads
 
   TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
 
+  EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
   EH_MECHANISM=-arm
   THREADSLIB = -lpthread
index d64e2859bec1cb32e9a32396146adaf624384964..0cfa522ab30f5a96f82691cdda48ba668c1d037b 100644 (file)
@@ -645,6 +645,9 @@ package body System.Object_Reader is
             when EM_X86_64 =>
                Res.Arch := x86_64;
 
+            when EM_ARM =>
+               Res.Arch := ARM;
+
             when others =>
                raise Format_Error with "unrecognized architecture";
          end case;
@@ -2030,6 +2033,7 @@ package body System.Object_Reader is
             | MIPS
             | PPC
             | SPARC
+            | ARM
          =>
             Address_32 := Read (S);
             return uint64 (Address_32);
index bd4fbd50260aa53bae014509e4b4747f83a48fe9..b3cfe13ab0672d0ad153fcf414e7e0a74bb36ada 100644 (file)
@@ -117,9 +117,12 @@ package System.Object_Reader is
       PPC,
       --  32-bit PowerPC
 
-      PPC64);
+      PPC64,
       --  64-bit PowerPC
 
+      ARM);
+      --  32-bit ARM
+
    ------------------
    -- Target types --
    ------------------