summaryrefslogtreecommitdiff
path: root/src/ortho/mcode/binary_file-memory.ads
diff options
context:
space:
mode:
authorTristan Gingold2015-11-18 21:45:45 +0100
committerTristan Gingold2015-11-19 05:47:59 +0100
commit92b0b82ea32982b94eb8bf19a0b498d92053fffe (patch)
tree70b04f103d145dc01d31870e50b5e6a654dc20e0 /src/ortho/mcode/binary_file-memory.ads
parentff4bc5fb13a997a1d00596578b6d7deb5c0b0da6 (diff)
downloadghdl-92b0b82ea32982b94eb8bf19a0b498d92053fffe.tar.gz
ghdl-92b0b82ea32982b94eb8bf19a0b498d92053fffe.tar.bz2
ghdl-92b0b82ea32982b94eb8bf19a0b498d92053fffe.zip
Add symbolizer (for mcode).
Display a backtrace in case of failed check or assert failure.
Diffstat (limited to 'src/ortho/mcode/binary_file-memory.ads')
-rw-r--r--src/ortho/mcode/binary_file-memory.ads11
1 files changed, 11 insertions, 0 deletions
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;