dwarf2dbg.h revision 77298
160484Sobrien/* dwarf2dbg.h - DWARF2 debug support 277298Sobrien Copyright (C) 1999, 2000 Free Software Foundation, Inc. 360484Sobrien 460484Sobrien This file is part of GAS, the GNU Assembler. 560484Sobrien 660484Sobrien GAS is free software; you can redistribute it and/or modify 760484Sobrien it under the terms of the GNU General Public License as published by 860484Sobrien the Free Software Foundation; either version 2, or (at your option) 960484Sobrien any later version. 1060484Sobrien 1160484Sobrien GAS is distributed in the hope that it will be useful, 1260484Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1360484Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1460484Sobrien GNU General Public License for more details. 1560484Sobrien 1660484Sobrien You should have received a copy of the GNU General Public License 1760484Sobrien along with GAS; see the file COPYING. If not, write to the Free 1860484Sobrien Software Foundation, 59 Temple Place - Suite 330, Boston, MA 1960484Sobrien 02111-1307, USA. */ 2060484Sobrien 2160484Sobrien#ifndef AS_DWARF2DBG_H 2260484Sobrien#define AS_DWARF2DBG_H 2360484Sobrien 2460484Sobrien#include "as.h" 2560484Sobrien 2660484Sobrien#define DWARF2_FLAG_BEGIN_STMT (1 << 0) /* beginning of statement */ 2760484Sobrien#define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */ 2860484Sobrien 2977298Sobrienstruct dwarf2_line_info { 3077298Sobrien unsigned int filenum; 3177298Sobrien unsigned int line; 3277298Sobrien unsigned int column; 3377298Sobrien unsigned int flags; 3477298Sobrien}; 3560484Sobrien 3660484Sobrien/* Implements the .file FILENO "FILENAME" directive. FILENO can be 0 3760484Sobrien to indicate that no file number has been assigned. All real file 3860484Sobrien number must be >0. */ 3960484Sobrienextern void dwarf2_directive_file PARAMS ((int dummy)); 4060484Sobrien 4160484Sobrien/* Implements the .loc FILENO LINENO [COLUMN] directive. FILENO is 4260484Sobrien the file number, LINENO the line number and the (optional) COLUMN 4360484Sobrien the column of the source code that the following instruction 4460484Sobrien corresponds to. FILENO can be 0 to indicate that the filename 4560484Sobrien specified by the textually most recent .file directive should be 4660484Sobrien used. */ 4760484Sobrienextern void dwarf2_directive_loc PARAMS ((int dummy)); 4860484Sobrien 4960484Sobrien/* Returns the current source information. If .file directives have 5060484Sobrien been encountered, the info for the corresponding source file is 5160484Sobrien returned. Otherwise, the info for the assembly source file is 5260484Sobrien returned. */ 5360484Sobrienextern void dwarf2_where PARAMS ((struct dwarf2_line_info *l)); 5460484Sobrien 5560484Sobrien/* This function generates .debug_line info based on the address and 5660484Sobrien source information passed in the arguments. ADDR should be the 5760484Sobrien frag-relative offset of the instruction the information is for and 5860484Sobrien L is the source information that should be associated with that 5977298Sobrien address. */ 6060484Sobrienextern void dwarf2_gen_line_info PARAMS ((addressT addr, 6160484Sobrien struct dwarf2_line_info *l)); 6260484Sobrien 6377298Sobrien/* Must be called for each generated instruction. */ 6477298Sobrienextern void dwarf2_emit_insn PARAMS ((int)); 6577298Sobrien 6660484Sobrienextern void dwarf2_finish PARAMS ((void)); 6760484Sobrien 6877298Sobrienextern int dwarf2dbg_estimate_size_before_relax PARAMS ((fragS *)); 6977298Sobrienextern int dwarf2dbg_relax_frag PARAMS ((fragS *)); 7077298Sobrienextern void dwarf2dbg_convert_frag PARAMS ((fragS *)); 7177298Sobrien 7260484Sobrien#endif /* AS_DWARF2DBG_H */ 73