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