home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / atlinuta.ads < prev    next >
Encoding:
Text File  |  1996-09-19  |  2.8 KB  |  84 lines

  1. --
  2. -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
  3. -- Author: Gilles Demailly
  4. --
  5. --
  6. -- Permission to use, copy, modify, and distribute this software and its
  7. -- documentation for any purpose and without fee is hereby granted,
  8. -- provided that the above copyright and authorship notice appear in all
  9. -- copies and that both that copyright notice and this permission notice
  10. -- appear in supporting documentation.
  11. -- 
  12. -- The ARA makes no representations about the suitability of this software
  13. -- for any purpose.  It is provided "as is" without express
  14. -- or implied warranty.
  15. -- 
  16.  
  17. -- This child package provides the class Line_Number_Table_Attribute :
  18. --  this attribute is used by debuggers and the exception handler to
  19. --  determine which part of the virtual machine code corresponds to
  20. --  a given location in the source.
  21. --
  22. -- For more information about Java Class file format check :
  23. --    The Java Virtual Machine Specification
  24. --    (Release 1.0 Beta - Draft - August 21, 1995)
  25.  
  26.  
  27. with Basic_Definitions;
  28. use Basic_Definitions;
  29.  
  30. with Byte_Utilities;
  31.  
  32. with CP;
  33.  
  34.  
  35. package Attribute.Line_Number_Table is
  36.  
  37.    -- This class attribute name in Java files
  38.    ------------------------------------------
  39.    C_Class_Name : constant Wide_String := "LineNumberTable";
  40.  
  41.    -- type Line_Number_Table_Attribute (subclass of Attribute)
  42.    -----------------------------------------------------------
  43.    type Line_Number_Table_Attribute is new Attribute with private;
  44.       
  45.    -- Access to Line_Number_Table_Attribute
  46.    ----------------------------------------
  47.    type Acc_Line_Number_Table_Attribute
  48.      is access all Line_Number_Table_Attribute'Class;
  49.      
  50.    -- Decode informations of the attribute from a file
  51.    ---------------------------------------------------
  52.    procedure Decode (This      : access Line_Number_Table_Attribute;
  53.                      From_File : in Byte_Utilities.File_Type;
  54.                      Context   : in CP.Acc_CP_Infos);
  55.  
  56.    -- Display the attribute
  57.    ------------------------
  58.    procedure Display (This    : access Line_Number_Table_Attribute;
  59.                       Context : in CP.Acc_CP_Infos);
  60.  
  61. private
  62.  
  63.    -- one association between a code line and a source line
  64.    --------------------------------------------------------
  65.    type Table_Info is
  66.       record
  67.          Start_Pc    : Unsigned_16;
  68.          Line_Number : Unsigned_16;
  69.       end record;
  70.  
  71.    type Table_Infos is array (Unsigned_16 range <>) of Table_Info;
  72.  
  73.    type Acc_Table_Infos is access Table_Infos;
  74.    
  75.    -- adds a table of associations between code and source lines
  76.    -------------------------------------------------------------
  77.    type Line_Number_Table_Attribute is new Attribute with
  78.       record
  79.          Line_Number_Table_Length : Unsigned_16;
  80.          Line_Number_Table        : Acc_Table_Infos;
  81.       end record;
  82.  
  83. end Attribute.Line_Number_Table;
  84.