xref: /dflybsd-src/contrib/binutils-2.34/gas/ecoff.h (revision b52ef7118d1621abed722c5bbbd542210290ecef)
1*fae548d3Szrj /* ecoff.h -- header file for ECOFF debugging support
2*fae548d3Szrj    Copyright (C) 1993-2020 Free Software Foundation, Inc.
3*fae548d3Szrj    Contributed by Cygnus Support.
4*fae548d3Szrj    Put together by Ian Lance Taylor <ian@cygnus.com>.
5*fae548d3Szrj 
6*fae548d3Szrj    This file is part of GAS, the GNU Assembler.
7*fae548d3Szrj 
8*fae548d3Szrj    GAS is free software; you can redistribute it and/or modify
9*fae548d3Szrj    it under the terms of the GNU General Public License as published by
10*fae548d3Szrj    the Free Software Foundation; either version 3, or (at your option)
11*fae548d3Szrj    any later version.
12*fae548d3Szrj 
13*fae548d3Szrj    GAS is distributed in the hope that it will be useful,
14*fae548d3Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
15*fae548d3Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16*fae548d3Szrj    GNU General Public License for more details.
17*fae548d3Szrj 
18*fae548d3Szrj    You should have received a copy of the GNU General Public License
19*fae548d3Szrj    along with GAS; see the file COPYING.  If not, write to the Free
20*fae548d3Szrj    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21*fae548d3Szrj    02110-1301, USA.  */
22*fae548d3Szrj 
23*fae548d3Szrj #ifndef GAS_ECOFF_H
24*fae548d3Szrj #define GAS_ECOFF_H
25*fae548d3Szrj 
26*fae548d3Szrj #ifdef ECOFF_DEBUGGING
27*fae548d3Szrj 
28*fae548d3Szrj #include "coff/sym.h"
29*fae548d3Szrj #include "coff/ecoff.h"
30*fae548d3Szrj 
31*fae548d3Szrj /* Whether we have seen any ECOFF debugging information.  */
32*fae548d3Szrj extern int ecoff_debugging_seen;
33*fae548d3Szrj 
34*fae548d3Szrj /* This function should be called at the start of assembly, by
35*fae548d3Szrj    obj_read_begin_hook.  */
36*fae548d3Szrj extern void ecoff_read_begin_hook (void);
37*fae548d3Szrj 
38*fae548d3Szrj /* This function should be called when the assembler switches to a new
39*fae548d3Szrj    file.  */
40*fae548d3Szrj extern void ecoff_new_file (const char *, int);
41*fae548d3Szrj 
42*fae548d3Szrj /* This function should be called when a new symbol is created, by
43*fae548d3Szrj    obj_symbol_new_hook.  */
44*fae548d3Szrj extern void ecoff_symbol_new_hook (symbolS *);
45*fae548d3Szrj 
46*fae548d3Szrj extern void ecoff_symbol_clone_hook (symbolS *, symbolS *);
47*fae548d3Szrj 
48*fae548d3Szrj /* This function should be called by the obj_frob_symbol hook.  */
49*fae548d3Szrj extern void ecoff_frob_symbol (symbolS *);
50*fae548d3Szrj 
51*fae548d3Szrj /* Build the ECOFF debugging information.  This should be called by
52*fae548d3Szrj    obj_frob_file.  This fills in the counts in *HDR; the offsets are
53*fae548d3Szrj    filled in relative to the start of the *BUFP.  It sets *BUFP to a
54*fae548d3Szrj    block of memory holding the debugging information.  It returns the
55*fae548d3Szrj    length of *BUFP.  */
56*fae548d3Szrj extern unsigned long ecoff_build_debug
57*fae548d3Szrj   (HDRR *hdr, char **bufp, const struct ecoff_debug_swap *);
58*fae548d3Szrj 
59*fae548d3Szrj /* Functions to handle the ECOFF debugging directives.  */
60*fae548d3Szrj extern void ecoff_directive_begin (int);
61*fae548d3Szrj extern void ecoff_directive_bend (int);
62*fae548d3Szrj extern void ecoff_directive_end (int);
63*fae548d3Szrj extern void ecoff_directive_ent (int);
64*fae548d3Szrj extern void ecoff_directive_fmask (int);
65*fae548d3Szrj extern void ecoff_directive_frame (int);
66*fae548d3Szrj extern void ecoff_directive_loc (int);
67*fae548d3Szrj extern void ecoff_directive_mask (int);
68*fae548d3Szrj 
69*fae548d3Szrj /* Other ECOFF directives.  */
70*fae548d3Szrj extern void ecoff_directive_extern (int);
71*fae548d3Szrj extern void ecoff_directive_weakext (int);
72*fae548d3Szrj 
73*fae548d3Szrj /* Functions to handle the COFF debugging directives.  */
74*fae548d3Szrj extern void ecoff_directive_def (int);
75*fae548d3Szrj extern void ecoff_directive_dim (int);
76*fae548d3Szrj extern void ecoff_directive_endef (int);
77*fae548d3Szrj extern void ecoff_directive_file (int);
78*fae548d3Szrj extern void ecoff_directive_scl (int);
79*fae548d3Szrj extern void ecoff_directive_size (int);
80*fae548d3Szrj extern void ecoff_directive_tag (int);
81*fae548d3Szrj extern void ecoff_directive_type (int);
82*fae548d3Szrj extern void ecoff_directive_val (int);
83*fae548d3Szrj 
84*fae548d3Szrj /* Handle stabs.  */
85*fae548d3Szrj extern void ecoff_stab (segT sec, int what, const char *string,
86*fae548d3Szrj 			int type, int other, int desc);
87*fae548d3Szrj 
88*fae548d3Szrj /* Set the GP prologue size.  */
89*fae548d3Szrj extern void ecoff_set_gp_prolog_size (int sz);
90*fae548d3Szrj 
91*fae548d3Szrj /* This routine is called from the ECOFF code to set the external
92*fae548d3Szrj    information for a symbol.  */
93*fae548d3Szrj #ifndef obj_ecoff_set_ext
94*fae548d3Szrj extern void obj_ecoff_set_ext (symbolS *, EXTR *);
95*fae548d3Szrj #endif
96*fae548d3Szrj 
97*fae548d3Szrj /* This routine is used to patch up a line number directive when
98*fae548d3Szrj    instructions are moved around.  */
99*fae548d3Szrj extern void ecoff_fix_loc (fragS *, unsigned long);
100*fae548d3Szrj 
101*fae548d3Szrj /* This function is called from read.c to peek at cur_file_ptr.  */
102*fae548d3Szrj extern int ecoff_no_current_file (void);
103*fae548d3Szrj 
104*fae548d3Szrj /* This function returns the symbol associated with the current proc.  */
105*fae548d3Szrj extern symbolS *ecoff_get_cur_proc_sym (void);
106*fae548d3Szrj 
107*fae548d3Szrj #endif /* ECOFF_DEBUGGING */
108*fae548d3Szrj 
109*fae548d3Szrj /* This routine is called from read.c to generate line number for .s file.  */
110*fae548d3Szrj extern void ecoff_generate_asm_lineno (void);
111*fae548d3Szrj 
112*fae548d3Szrj #endif /* ! GAS_ECOFF_H */
113