ecoff.h revision 130561
1193323Sed/* ecoff.h -- header file for ECOFF debugging support 2193323Sed Copyright 1993, 1994, 1995, 1996, 1997, 1998 3193323Sed Free Software Foundation, Inc. 4193323Sed Contributed by Cygnus Support. 5193323Sed Put together by Ian Lance Taylor <ian@cygnus.com>. 6193323Sed 7193323Sed This file is part of GAS, the GNU Assembler. 8193323Sed 9193323Sed GAS is free software; you can redistribute it and/or modify 10193323Sed it under the terms of the GNU General Public License as published by 11193323Sed the Free Software Foundation; either version 2, or (at your option) 12193323Sed any later version. 13193323Sed 14193323Sed GAS is distributed in the hope that it will be useful, 15249423Sdim but WITHOUT ANY WARRANTY; without even the implied warranty of 16249423Sdim MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17249423Sdim GNU General Public License for more details. 18198090Srdivacky 19204642Srdivacky You should have received a copy of the GNU General Public License 20193323Sed along with GAS; see the file COPYING. If not, write to the Free 21198090Srdivacky Software Foundation, 59 Temple Place - Suite 330, Boston, MA 22224145Sdim 02111-1307, USA. */ 23193323Sed 24193323Sed#ifndef GAS_ECOFF_H 25249423Sdim#define GAS_ECOFF_H 26249423Sdim 27249423Sdim#ifdef ECOFF_DEBUGGING 28249423Sdim 29249423Sdim#include "coff/sym.h" 30249423Sdim#include "coff/ecoff.h" 31249423Sdim 32249423Sdim/* Whether we have seen any ECOFF debugging information. */ 33249423Sdimextern int ecoff_debugging_seen; 34224145Sdim 35205218Srdivacky/* This function should be called at the start of assembly, by 36202375Srdivacky obj_read_begin_hook. */ 37198090Srdivackyextern void ecoff_read_begin_hook (void); 38193323Sed 39193323Sed/* This function should be called when the assembler switches to a new 40249423Sdim file. */ 41249423Sdimextern void ecoff_new_file (const char *); 42249423Sdim 43193323Sed/* This function should be called when a new symbol is created, by 44193323Sed obj_symbol_new_hook. */ 45193323Sedextern void ecoff_symbol_new_hook (symbolS *); 46193323Sed 47193323Sed/* This function should be called by the obj_frob_symbol hook. */ 48193323Sedextern void ecoff_frob_symbol (symbolS *); 49193323Sed 50193323Sed/* Build the ECOFF debugging information. This should be called by 51226633Sdim obj_frob_file. This fills in the counts in *HDR; the offsets are 52193323Sed filled in relative to the start of the *BUFP. It sets *BUFP to a 53193323Sed block of memory holding the debugging information. It returns the 54193323Sed length of *BUFP. */ 55193323Sedextern unsigned long ecoff_build_debug 56193323Sed (HDRR *hdr, char **bufp, const struct ecoff_debug_swap *); 57193323Sed 58239462Sdim/* Functions to handle the ECOFF debugging directives. */ 59239462Sdimextern void ecoff_directive_begin (int); 60218893Sdimextern void ecoff_directive_bend (int); 61239462Sdimextern void ecoff_directive_end (int); 62193323Sedextern void ecoff_directive_ent (int); 63193323Sedextern void ecoff_directive_fmask (int); 64226633Sdimextern void ecoff_directive_frame (int); 65193323Sedextern void ecoff_directive_loc (int); 66218893Sdimextern void ecoff_directive_mask (int); 67193323Sed 68193323Sed/* Other ECOFF directives. */ 69210299Sedextern void ecoff_directive_extern (int); 70210299Sedextern void ecoff_directive_weakext (int); 71210299Sed 72210299Sed/* Functions to handle the COFF debugging directives. */ 73210299Sedextern void ecoff_directive_def (int); 74210299Sedextern void ecoff_directive_dim (int); 75210299Sedextern void ecoff_directive_endef (int); 76210299Sedextern void ecoff_directive_file (int); 77210299Sedextern void ecoff_directive_scl (int); 78210299Sedextern void ecoff_directive_size (int); 79210299Sedextern void ecoff_directive_tag (int); 80210299Sedextern void ecoff_directive_type (int); 81210299Sedextern void ecoff_directive_val (int); 82210299Sed 83223017Sdim/* Handle stabs. */ 84223017Sdimextern void ecoff_stab (segT sec, int what, const char *string, 85210299Sed int type, int other, int desc); 86210299Sed 87210299Sed/* Set the GP prologue size. */ 88210299Sedextern void ecoff_set_gp_prolog_size (int sz); 89210299Sed 90239462Sdim/* This routine is called from the ECOFF code to set the external 91239462Sdim information for a symbol. */ 92239462Sdim#ifndef obj_ecoff_set_ext 93239462Sdimextern void obj_ecoff_set_ext (symbolS *, EXTR *); 94239462Sdim#endif 95239462Sdim 96239462Sdim/* This routine is used to patch up a line number directive when 97239462Sdim instructions are moved around. */ 98239462Sdimextern void ecoff_fix_loc (fragS *, unsigned long); 99239462Sdim 100239462Sdim/* This function is called from read.c to peek at cur_file_ptr. */ 101239462Sdimextern int ecoff_no_current_file (void); 102239462Sdim 103239462Sdim/* This function returns the symbol associated with the current proc. */ 104239462Sdimextern symbolS *ecoff_get_cur_proc_sym (void); 105239462Sdim 106239462Sdim#endif /* ECOFF_DEBUGGING */ 107239462Sdim 108239462Sdim/* This routine is called from read.c to generate line number for .s file. */ 109193323Sedextern void ecoff_generate_asm_lineno (void); 110193323Sed 111193323Sed#endif /* ! GAS_ECOFF_H */ 112193323Sed