Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
em_dwarf.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 #ifndef em_dwarf_INCLUDED
00037 #define em_dwarf_INCLUDED
00038 
00039 
00040 #include <dwarf.h>
00041 #include <libdwarf.h>
00042 #include "srcpos.h"
00043 #include "targ_em_dwarf.h"
00044 
00045 #if defined(__cplusplus)
00046 extern Dwarf_P_Debug Em_Dwarf_Begin (BOOL is_64bit,
00047                                      BOOL dwarf_trace,
00048                                      BOOL is_cplus,
00049                                      symbol_index_recorder record_symidx = NULL);
00050 
00051 extern void Em_Dwarf_Write_Scns (Cg_Dwarf_Sym_To_Elfsym_Ofst translate_elfsym = NULL);
00052 #else
00053 extern Dwarf_P_Debug Em_Dwarf_Begin (BOOL is_64bit,
00054                                      BOOL dwarf_trace,
00055                                      BOOL is_cplus);
00056 
00057 extern void Em_Dwarf_Write_Scns (void);
00058 #endif
00059 
00060 #if defined(__cplusplus)
00061 extern "C" {
00062 #endif
00063 
00064 extern INT data_alignment_factor;
00065 
00066 extern void Em_Dwarf_End (void);
00067 
00068 extern pSCNINFO Em_Dwarf_Find_Dwarf_Scn (size_t scndx);
00069 
00070 extern pSCNINFO Em_Dwarf_Find_Dwarf_Scn_By_Name (char *name);
00071 
00072 extern INT Em_Dwarf_Prepare_Output (void);
00073 
00074 extern void Em_Dwarf_Add_Line_Entry ( INT code_address, SRCPOS srcpos);
00075 
00076 extern void Em_Dwarf_Add_Include (UINT16 incl_idx, char *name);
00077 
00078 extern void Em_Dwarf_Add_File (
00079     UINT16 file_idx,
00080     char *name,
00081     UINT16 incl_idx,
00082     Dwarf_Unsigned modification_time,
00083     Dwarf_Unsigned file_size);
00084 
00085 
00086 /* Given a file_index, return the filename and the path for the file. */
00087 extern void Em_Dwarf_File_Index_To_Name (
00088     INT file_index, 
00089     char **filename, 
00090     char **path);
00091 
00092 /* eh_offset should be -1 if no eh region */
00093 extern void Em_Dwarf_Process_PU (Dwarf_Unsigned begin_label,
00094                                  Dwarf_Unsigned end_label,
00095                                  INT32          begin_offset,
00096                                  INT32          end_offset,
00097                                  Dwarf_P_Die    PU_die,
00098                                  Dwarf_P_Fde    fde,
00099                                  Elf64_Word     eh_symindex,
00100                                  INT            eh_offset);
00101 
00102 extern void Em_Dwarf_Start_Text_Region (pSCNINFO scninfo, INT start_offset);
00103 
00104 extern void Em_Dwarf_Start_Text_Region_Semi_Symbolic (pSCNINFO,
00105                                                       INT,
00106                                                       Dwarf_Unsigned,
00107                                                       Dwarf_Addr);
00108 
00109 extern void Em_Dwarf_End_Text_Region (pSCNINFO scninfo, INT end_offset);
00110 
00111 extern void Em_Dwarf_End_Text_Region_Semi_Symbolic (pSCNINFO,
00112                                                     INT,
00113                                                     Dwarf_Unsigned,
00114                                                     Dwarf_Addr);
00115 #if defined(__cplusplus)
00116 }
00117 #endif
00118 #endif /* em_dwarf_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines