ecoff.h revision 60484
1227825Stheraven/* ecoff.h -- header file for ECOFF debugging support
2227825Stheraven   Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
3227825Stheraven   Contributed by Cygnus Support.
4227825Stheraven   Put together by Ian Lance Taylor <ian@cygnus.com>.
5227825Stheraven
6227825Stheraven   This file is part of GAS, the GNU Assembler.
7227825Stheraven
8227825Stheraven   GAS is free software; you can redistribute it and/or modify
9227825Stheraven   it under the terms of the GNU General Public License as published by
10227825Stheraven   the Free Software Foundation; either version 2, or (at your option)
11227825Stheraven   any later version.
12227825Stheraven
13227825Stheraven   GAS is distributed in the hope that it will be useful,
14227825Stheraven   but WITHOUT ANY WARRANTY; without even the implied warranty of
15227825Stheraven   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16227825Stheraven   GNU General Public License for more details.
17227825Stheraven
18227825Stheraven   You should have received a copy of the GNU General Public License
19227825Stheraven   along with GAS; see the file COPYING.  If not, write to the Free
20227825Stheraven   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21227825Stheraven   02111-1307, USA.  */
22227825Stheraven
23227825Stheraven#ifndef GAS_ECOFF_H
24227825Stheraven#define GAS_ECOFF_H
25227825Stheraven
26227825Stheraven#ifdef ECOFF_DEBUGGING
27227825Stheraven
28227825Stheraven#include "coff/sym.h"
29227825Stheraven#include "coff/ecoff.h"
30227825Stheraven
31227825Stheraven/* Whether we have seen any ECOFF debugging information.  */
32262801Sdimextern int ecoff_debugging_seen;
33227825Stheraven
34262801Sdim/* This function should be called at the start of assembly, by
35262801Sdim   obj_read_begin_hook.  */
36262801Sdimextern void ecoff_read_begin_hook PARAMS ((void));
37227825Stheraven
38227825Stheraven/* This function should be called when the assembler switches to a new
39262801Sdim   file.  */
40262801Sdimextern void ecoff_new_file PARAMS ((const char *));
41227825Stheraven
42227825Stheraven/* This function should be called when a new symbol is created, by
43227825Stheraven   obj_symbol_new_hook.  */
44227825Stheravenextern void ecoff_symbol_new_hook PARAMS ((symbolS *));
45227825Stheraven
46227825Stheraven/* This function should be called by the obj_frob_symbol hook.  */
47227825Stheravenextern void ecoff_frob_symbol PARAMS ((symbolS *));
48227825Stheraven
49227825Stheraven/* Build the ECOFF debugging information.  This should be called by
50227825Stheraven   obj_frob_file.  This fills in the counts in *HDR; the offsets are
51227825Stheraven   filled in relative to the start of the *BUFP.  It sets *BUFP to a
52227825Stheraven   block of memory holding the debugging information.  It returns the
53227825Stheraven   length of *BUFP.  */
54227825Stheravenextern unsigned long ecoff_build_debug
55227825Stheraven  PARAMS ((HDRR *hdr, char **bufp, const struct ecoff_debug_swap *));
56227825Stheraven
57227825Stheraven/* Functions to handle the ECOFF debugging directives.  */
58232950Stheravenextern void ecoff_directive_begin PARAMS ((int));
59262801Sdimextern void ecoff_directive_bend PARAMS ((int));
60227825Stheravenextern void ecoff_directive_end PARAMS ((int));
61232950Stheravenextern void ecoff_directive_ent PARAMS ((int));
62227825Stheravenextern void ecoff_directive_fmask PARAMS ((int));
63227825Stheravenextern void ecoff_directive_frame PARAMS ((int));
64227825Stheravenextern void ecoff_directive_loc PARAMS ((int));
65262801Sdimextern void ecoff_directive_mask PARAMS ((int));
66232950Stheraven
67227825Stheraven/* Other ECOFF directives.  */
68227825Stheravenextern void ecoff_directive_extern PARAMS ((int));
69227825Stheravenextern void ecoff_directive_weakext PARAMS ((int));
70227825Stheraven
71232950Stheraven/* Functions to handle the COFF debugging directives.  */
72232950Stheravenextern void ecoff_directive_def PARAMS ((int));
73232950Stheravenextern void ecoff_directive_dim PARAMS ((int));
74227825Stheravenextern void ecoff_directive_endef PARAMS ((int));
75227825Stheravenextern void ecoff_directive_file PARAMS ((int));
76232950Stheravenextern void ecoff_directive_scl PARAMS ((int));
77232950Stheravenextern void ecoff_directive_size PARAMS ((int));
78227825Stheravenextern void ecoff_directive_tag PARAMS ((int));
79262801Sdimextern void ecoff_directive_type PARAMS ((int));
80262801Sdimextern void ecoff_directive_val PARAMS ((int));
81262801Sdim
82227825Stheraven/* Handle stabs.  */
83262801Sdimextern void ecoff_stab PARAMS ((segT sec, int what, const char *string,
84262801Sdim				int type, int other, int desc));
85262801Sdim
86262801Sdim/* Set the GP prologue size.  */
87262801Sdimextern void ecoff_set_gp_prolog_size PARAMS ((int sz));
88262801Sdim
89262801Sdim/* This routine is called from the ECOFF code to set the external
90262801Sdim   information for a symbol.  */
91262801Sdim#ifndef obj_ecoff_set_ext
92262801Sdimextern void obj_ecoff_set_ext PARAMS ((symbolS *, EXTR *));
93262801Sdim#endif
94227825Stheraven
95227825Stheraven/* This routine is used to patch up a line number directive when
96232950Stheraven   instructions are moved around.  */
97227825Stheravenextern void ecoff_fix_loc PARAMS ((fragS *, unsigned long));
98262801Sdim
99232950Stheraven/* This function is called from read.c to peek at cur_file_ptr.  */
100232950Stheravenextern int ecoff_no_current_file PARAMS ((void));
101227825Stheraven
102227825Stheraven/* This function returns the symbol associated with the current proc.  */
103227825Stheravenextern symbolS *ecoff_get_cur_proc_sym PARAMS ((void));
104227825Stheraven
105232950Stheraven#endif /* ECOFF_DEBUGGING */
106227825Stheraven
107262801Sdim/* This routine is called from read.c to generate line number for .s file.  */
108232950Stheravenextern void ecoff_generate_asm_lineno PARAMS ((void));
109232950Stheraven
110227825Stheraven#endif /* ! GAS_ECOFF_H */
111227825Stheraven