Back to index

cell-binutils  2.17cvs20070401
ecoff.h
Go to the documentation of this file.
00001 /* ecoff.h -- header file for ECOFF debugging support
00002    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005
00003    Free Software Foundation, Inc.
00004    Contributed by Cygnus Support.
00005    Put together by Ian Lance Taylor <ian@cygnus.com>.
00006 
00007    This file is part of GAS, the GNU Assembler.
00008 
00009    GAS is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; either version 2, or (at your option)
00012    any later version.
00013 
00014    GAS is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with GAS; see the file COPYING.  If not, write to the Free
00021    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00022    02110-1301, USA.  */
00023 
00024 #ifndef GAS_ECOFF_H
00025 #define GAS_ECOFF_H
00026 
00027 #ifdef ECOFF_DEBUGGING
00028 
00029 #include "coff/sym.h"
00030 #include "coff/ecoff.h"
00031 
00032 /* Whether we have seen any ECOFF debugging information.  */
00033 extern int ecoff_debugging_seen;
00034 
00035 /* This function should be called at the start of assembly, by
00036    obj_read_begin_hook.  */
00037 extern void ecoff_read_begin_hook (void);
00038 
00039 /* This function should be called when the assembler switches to a new
00040    file.  */
00041 extern void ecoff_new_file (const char *, int);
00042 
00043 /* This function should be called when a new symbol is created, by
00044    obj_symbol_new_hook.  */
00045 extern void ecoff_symbol_new_hook (symbolS *);
00046 
00047 /* This function should be called by the obj_frob_symbol hook.  */
00048 extern void ecoff_frob_symbol (symbolS *);
00049 
00050 /* Build the ECOFF debugging information.  This should be called by
00051    obj_frob_file.  This fills in the counts in *HDR; the offsets are
00052    filled in relative to the start of the *BUFP.  It sets *BUFP to a
00053    block of memory holding the debugging information.  It returns the
00054    length of *BUFP.  */
00055 extern unsigned long ecoff_build_debug
00056   (HDRR *hdr, char **bufp, const struct ecoff_debug_swap *);
00057 
00058 /* Functions to handle the ECOFF debugging directives.  */
00059 extern void ecoff_directive_begin (int);
00060 extern void ecoff_directive_bend (int);
00061 extern void ecoff_directive_end (int);
00062 extern void ecoff_directive_ent (int);
00063 extern void ecoff_directive_fmask (int);
00064 extern void ecoff_directive_frame (int);
00065 extern void ecoff_directive_loc (int);
00066 extern void ecoff_directive_mask (int);
00067 
00068 /* Other ECOFF directives.  */
00069 extern void ecoff_directive_extern (int);
00070 extern void ecoff_directive_weakext (int);
00071 
00072 /* Functions to handle the COFF debugging directives.  */
00073 extern void ecoff_directive_def (int);
00074 extern void ecoff_directive_dim (int);
00075 extern void ecoff_directive_endef (int);
00076 extern void ecoff_directive_file (int);
00077 extern void ecoff_directive_scl (int);
00078 extern void ecoff_directive_size (int);
00079 extern void ecoff_directive_tag (int);
00080 extern void ecoff_directive_type (int);
00081 extern void ecoff_directive_val (int);
00082 
00083 /* Handle stabs.  */
00084 extern void ecoff_stab (segT sec, int what, const char *string,
00085                      int type, int other, int desc);
00086 
00087 /* Set the GP prologue size.  */
00088 extern void ecoff_set_gp_prolog_size (int sz);
00089 
00090 /* This routine is called from the ECOFF code to set the external
00091    information for a symbol.  */
00092 #ifndef obj_ecoff_set_ext
00093 extern void obj_ecoff_set_ext (symbolS *, EXTR *);
00094 #endif
00095 
00096 /* This routine is used to patch up a line number directive when
00097    instructions are moved around.  */
00098 extern void ecoff_fix_loc (fragS *, unsigned long);
00099 
00100 /* This function is called from read.c to peek at cur_file_ptr.  */
00101 extern int ecoff_no_current_file (void);
00102 
00103 /* This function returns the symbol associated with the current proc.  */
00104 extern symbolS *ecoff_get_cur_proc_sym (void);
00105 
00106 #endif /* ECOFF_DEBUGGING */
00107 
00108 /* This routine is called from read.c to generate line number for .s file.  */
00109 extern void ecoff_generate_asm_lineno (void);
00110 
00111 #endif /* ! GAS_ECOFF_H */