ecoff.h revision 78828
133965Sjdp/* ecoff.h -- header file for ECOFF debugging support 278828Sobrien Copyright 1993, 1994, 1995, 1996, 1997, 1998 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, 59 Temple Place - Suite 330, Boston, MA 2233965Sjdp 02111-1307, 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. */ 3733965Sjdpextern void ecoff_read_begin_hook PARAMS ((void)); 3833965Sjdp 3933965Sjdp/* This function should be called when the assembler switches to a new 4033965Sjdp file. */ 4133965Sjdpextern void ecoff_new_file PARAMS ((const char *)); 4233965Sjdp 4333965Sjdp/* This function should be called when a new symbol is created, by 4433965Sjdp obj_symbol_new_hook. */ 4560484Sobrienextern void ecoff_symbol_new_hook PARAMS ((symbolS *)); 4633965Sjdp 4733965Sjdp/* This function should be called by the obj_frob_symbol hook. */ 4860484Sobrienextern void ecoff_frob_symbol PARAMS ((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 5633965Sjdp PARAMS ((HDRR *hdr, char **bufp, const struct ecoff_debug_swap *)); 5733965Sjdp 5833965Sjdp/* Functions to handle the ECOFF debugging directives. */ 5933965Sjdpextern void ecoff_directive_begin PARAMS ((int)); 6033965Sjdpextern void ecoff_directive_bend PARAMS ((int)); 6133965Sjdpextern void ecoff_directive_end PARAMS ((int)); 6233965Sjdpextern void ecoff_directive_ent PARAMS ((int)); 6333965Sjdpextern void ecoff_directive_fmask PARAMS ((int)); 6433965Sjdpextern void ecoff_directive_frame PARAMS ((int)); 6533965Sjdpextern void ecoff_directive_loc PARAMS ((int)); 6633965Sjdpextern void ecoff_directive_mask PARAMS ((int)); 6733965Sjdp 6833965Sjdp/* Other ECOFF directives. */ 6933965Sjdpextern void ecoff_directive_extern PARAMS ((int)); 7033965Sjdpextern void ecoff_directive_weakext PARAMS ((int)); 7133965Sjdp 7233965Sjdp/* Functions to handle the COFF debugging directives. */ 7333965Sjdpextern void ecoff_directive_def PARAMS ((int)); 7433965Sjdpextern void ecoff_directive_dim PARAMS ((int)); 7533965Sjdpextern void ecoff_directive_endef PARAMS ((int)); 7633965Sjdpextern void ecoff_directive_file PARAMS ((int)); 7733965Sjdpextern void ecoff_directive_scl PARAMS ((int)); 7833965Sjdpextern void ecoff_directive_size PARAMS ((int)); 7933965Sjdpextern void ecoff_directive_tag PARAMS ((int)); 8033965Sjdpextern void ecoff_directive_type PARAMS ((int)); 8133965Sjdpextern void ecoff_directive_val PARAMS ((int)); 8233965Sjdp 8333965Sjdp/* Handle stabs. */ 8433965Sjdpextern void ecoff_stab PARAMS ((segT sec, int what, const char *string, 8533965Sjdp int type, int other, int desc)); 8633965Sjdp 8733965Sjdp/* Set the GP prologue size. */ 8833965Sjdpextern void ecoff_set_gp_prolog_size PARAMS ((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 9360484Sobrienextern void obj_ecoff_set_ext PARAMS ((symbolS *, EXTR *)); 9433965Sjdp#endif 9533965Sjdp 9633965Sjdp/* This routine is used to patch up a line number directive when 9733965Sjdp instructions are moved around. */ 9833965Sjdpextern void ecoff_fix_loc PARAMS ((fragS *, unsigned long)); 9933965Sjdp 10033965Sjdp/* This function is called from read.c to peek at cur_file_ptr. */ 10133965Sjdpextern int ecoff_no_current_file PARAMS ((void)); 10233965Sjdp 10360484Sobrien/* This function returns the symbol associated with the current proc. */ 10460484Sobrienextern symbolS *ecoff_get_cur_proc_sym PARAMS ((void)); 10533965Sjdp 10660484Sobrien#endif /* ECOFF_DEBUGGING */ 10760484Sobrien 10860484Sobrien/* This routine is called from read.c to generate line number for .s file. */ 10960484Sobrienextern void ecoff_generate_asm_lineno PARAMS ((void)); 11060484Sobrien 11133965Sjdp#endif /* ! GAS_ECOFF_H */ 112