dwarf2dbg.h revision 60484
160484Sobrien/* dwarf2dbg.h - DWARF2 debug support
260484Sobrien   Copyright (C) 1999 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
2960484Sobrienstruct dwarf2_line_info
3060484Sobrien  {
3160484Sobrien    char *filename;
3260484Sobrien    unsigned int filenum;
3360484Sobrien    unsigned int line;
3460484Sobrien    unsigned int column;
3560484Sobrien    unsigned int flags;
3660484Sobrien  };
3760484Sobrien
3860484Sobrien/* Implements the .file FILENO "FILENAME" directive.  FILENO can be 0
3960484Sobrien   to indicate that no file number has been assigned.  All real file
4060484Sobrien   number must be >0.  */
4160484Sobrienextern void dwarf2_directive_file PARAMS ((int dummy));
4260484Sobrien
4360484Sobrien/* Implements the .loc FILENO LINENO [COLUMN] directive.  FILENO is
4460484Sobrien   the file number, LINENO the line number and the (optional) COLUMN
4560484Sobrien   the column of the source code that the following instruction
4660484Sobrien   corresponds to.  FILENO can be 0 to indicate that the filename
4760484Sobrien   specified by the textually most recent .file directive should be
4860484Sobrien   used.  */
4960484Sobrienextern void dwarf2_directive_loc PARAMS ((int dummy));
5060484Sobrien
5160484Sobrien/* Returns the current source information.  If .file directives have
5260484Sobrien   been encountered, the info for the corresponding source file is
5360484Sobrien   returned.  Otherwise, the info for the assembly source file is
5460484Sobrien   returned.  */
5560484Sobrienextern void dwarf2_where PARAMS ((struct dwarf2_line_info *l));
5660484Sobrien
5760484Sobrien/* This function generates .debug_line info based on the address and
5860484Sobrien   source information passed in the arguments.  ADDR should be the
5960484Sobrien   frag-relative offset of the instruction the information is for and
6060484Sobrien   L is the source information that should be associated with that
6160484Sobrien   address. */
6260484Sobrienextern void dwarf2_gen_line_info PARAMS ((addressT addr,
6360484Sobrien					  struct dwarf2_line_info *l));
6460484Sobrien
6560484Sobrien/* Must be called after all other input is processed to finish up the
6660484Sobrien   .debug_line section.  */
6760484Sobrienextern void dwarf2_finish PARAMS ((void));
6860484Sobrien
6960484Sobrien#endif /* AS_DWARF2DBG_H */
70