ecoff.h revision 218822
133965Sjdp/* ecoff.h -- header file for ECOFF debugging support 278828Sobrien Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005 378828Sobrien Free Software Foundation, Inc. 433965Sjdp Contributed by Cygnus Support. 533965Sjdp Put together by Ian Lance Taylor <ian@cygnus.com>. 633965Sjdp 733965Sjdp This file is part of GAS, the GNU Assembler. 833965Sjdp 933965Sjdp GAS is free software; you can redistribute it and/or modify 1033965Sjdp it under the terms of the GNU General Public License as published by 1133965Sjdp the Free Software Foundation; either version 2, or (at your option) 1233965Sjdp any later version. 1333965Sjdp 1433965Sjdp GAS is distributed in the hope that it will be useful, 1533965Sjdp but WITHOUT ANY WARRANTY; without even the implied warranty of 1633965Sjdp MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1733965Sjdp GNU General Public License for more details. 1833965Sjdp 1933965Sjdp You should have received a copy of the GNU General Public License 2033965Sjdp along with GAS; see the file COPYING. If not, write to the Free 2133965Sjdp Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 2233965Sjdp 02110-1301, USA. */ 2333965Sjdp 2433965Sjdp#ifndef GAS_ECOFF_H 2533965Sjdp#define GAS_ECOFF_H 2633965Sjdp 2760484Sobrien#ifdef ECOFF_DEBUGGING 2860484Sobrien 2933965Sjdp#include "coff/sym.h" 3033965Sjdp#include "coff/ecoff.h" 3133965Sjdp 3233965Sjdp/* Whether we have seen any ECOFF debugging information. */ 3333965Sjdpextern int ecoff_debugging_seen; 3433965Sjdp 3533965Sjdp/* This function should be called at the start of assembly, by 3633965Sjdp obj_read_begin_hook. */ 37130561Sobrienextern void ecoff_read_begin_hook (void); 3833965Sjdp 3933965Sjdp/* This function should be called when the assembler switches to a new 4033965Sjdp file. */ 41130561Sobrienextern void ecoff_new_file (const char *, int); 4233965Sjdp 4333965Sjdp/* This function should be called when a new symbol is created, by 4433965Sjdp obj_symbol_new_hook. */ 45130561Sobrienextern void ecoff_symbol_new_hook (symbolS *); 4633965Sjdp 4733965Sjdp/* This function should be called by the obj_frob_symbol hook. */ 48130561Sobrienextern void ecoff_frob_symbol (symbolS *); 4933965Sjdp 5033965Sjdp/* Build the ECOFF debugging information. This should be called by 5133965Sjdp obj_frob_file. This fills in the counts in *HDR; the offsets are 5233965Sjdp filled in relative to the start of the *BUFP. It sets *BUFP to a 5333965Sjdp block of memory holding the debugging information. It returns the 5433965Sjdp length of *BUFP. */ 5533965Sjdpextern unsigned long ecoff_build_debug 56130561Sobrien (HDRR *hdr, char **bufp, const struct ecoff_debug_swap *); 5733965Sjdp 5833965Sjdp/* Functions to handle the ECOFF debugging directives. */ 59130561Sobrienextern void ecoff_directive_begin (int); 60130561Sobrienextern void ecoff_directive_bend (int); 61130561Sobrienextern void ecoff_directive_end (int); 62130561Sobrienextern void ecoff_directive_ent (int); 63130561Sobrienextern void ecoff_directive_fmask (int); 64130561Sobrienextern void ecoff_directive_frame (int); 65130561Sobrienextern void ecoff_directive_loc (int); 66130561Sobrienextern void ecoff_directive_mask (int); 6733965Sjdp 6833965Sjdp/* Other ECOFF directives. */ 69130561Sobrienextern void ecoff_directive_extern (int); 70130561Sobrienextern void ecoff_directive_weakext (int); 7133965Sjdp 7233965Sjdp/* Functions to handle the COFF debugging directives. */ 73130561Sobrienextern void ecoff_directive_def (int); 74130561Sobrienextern void ecoff_directive_dim (int); 75130561Sobrienextern void ecoff_directive_endef (int); 76130561Sobrienextern void ecoff_directive_file (int); 77130561Sobrienextern void ecoff_directive_scl (int); 78130561Sobrienextern void ecoff_directive_size (int); 79130561Sobrienextern void ecoff_directive_tag (int); 80130561Sobrienextern void ecoff_directive_type (int); 81130561Sobrienextern void ecoff_directive_val (int); 8233965Sjdp 8333965Sjdp/* Handle stabs. */ 84130561Sobrienextern void ecoff_stab (segT sec, int what, const char *string, 85130561Sobrien int type, int other, int desc); 8633965Sjdp 8733965Sjdp/* Set the GP prologue size. */ 88130561Sobrienextern void ecoff_set_gp_prolog_size (int sz); 8933965Sjdp 9033965Sjdp/* This routine is called from the ECOFF code to set the external 9133965Sjdp information for a symbol. */ 9233965Sjdp#ifndef obj_ecoff_set_ext 93130561Sobrienextern void obj_ecoff_set_ext (symbolS *, EXTR *); 9433965Sjdp#endif 9533965Sjdp 9633965Sjdp/* This routine is used to patch up a line number directive when 9733965Sjdp instructions are moved around. */ 98130561Sobrienextern void ecoff_fix_loc (fragS *, unsigned long); 9933965Sjdp 10033965Sjdp/* This function is called from read.c to peek at cur_file_ptr. */ 101130561Sobrienextern int ecoff_no_current_file (void); 10233965Sjdp 10360484Sobrien/* This function returns the symbol associated with the current proc. */ 104130561Sobrienextern symbolS *ecoff_get_cur_proc_sym (void); 10533965Sjdp 10660484Sobrien#endif /* ECOFF_DEBUGGING */ 10760484Sobrien 10860484Sobrien/* This routine is called from read.c to generate line number for .s file. */ 109130561Sobrienextern void ecoff_generate_asm_lineno (void); 11060484Sobrien 11133965Sjdp#endif /* ! GAS_ECOFF_H */ 112