From 92b0b82ea32982b94eb8bf19a0b498d92053fffe Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 18 Nov 2015 21:45:45 +0100 Subject: Add symbolizer (for mcode). Display a backtrace in case of failed check or assert failure. --- src/ortho/mcode/binary_file-memory.ads | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ortho/mcode/binary_file-memory.ads') diff --git a/src/ortho/mcode/binary_file-memory.ads b/src/ortho/mcode/binary_file-memory.ads index a205da5..cc2b7e3 100644 --- a/src/ortho/mcode/binary_file-memory.ads +++ b/src/ortho/mcode/binary_file-memory.ads @@ -15,6 +15,8 @@ -- along with GCC; see the file COPYING. If not, write to the Free -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. +with Ada.Unchecked_Conversion; + package Binary_File.Memory is -- Must be called before set_symbol_address. @@ -22,4 +24,13 @@ package Binary_File.Memory is procedure Set_Symbol_Address (Sym : Symbol; Addr : System.Address); procedure Write_Memory_Relocate (Error : out Boolean); + + function Get_Section_Base (Sect : Section_Acc) return System.Address; + function Get_Section_Size (Sect : Section_Acc) return Pc_Type; + + function To_Pc_Type is new Ada.Unchecked_Conversion + (Source => System.Address, Target => Pc_Type); + function To_Address is new Ada.Unchecked_Conversion + (Source => Pc_Type, Target => System.Address); + end Binary_File.Memory; -- cgit