2005-12-21 19:44:40 +00:00
|
|
|
//===-- llvm/CodeGen/DwarfWriter.h - Dwarf Framework ------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 19:59:42 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-12-21 19:44:40 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2007-01-29 18:51:14 +00:00
|
|
|
// This file contains support for writing Dwarf debug and exception info into
|
|
|
|
// asm files. For Details on the Dwarf 3 specfication see DWARF Debugging
|
|
|
|
// Information Format V.3 reference manual http://dwarf.freestandards.org ,
|
2005-12-21 19:44:40 +00:00
|
|
|
//
|
2007-01-29 18:51:14 +00:00
|
|
|
// The role of the Dwarf Writer class is to extract information from the
|
2007-01-26 21:22:28 +00:00
|
|
|
// MachineModuleInfo object, organize it in Dwarf form and then emit it into asm
|
2006-01-17 17:31:53 +00:00
|
|
|
// the current asm file using data and high level Dwarf directives.
|
|
|
|
//
|
2005-12-21 19:44:40 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-01-17 19:12:24 +00:00
|
|
|
#ifndef LLVM_CODEGEN_DWARFWRITER_H
|
|
|
|
#define LLVM_CODEGEN_DWARFWRITER_H
|
2005-12-21 19:44:40 +00:00
|
|
|
|
2009-01-08 23:40:34 +00:00
|
|
|
#include "llvm/Pass.h"
|
|
|
|
|
2005-12-21 19:46:32 +00:00
|
|
|
namespace llvm {
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
class AsmPrinter;
|
2007-01-29 18:51:14 +00:00
|
|
|
class DwarfDebug;
|
|
|
|
class DwarfException;
|
2007-01-26 21:22:28 +00:00
|
|
|
class MachineModuleInfo;
|
2006-02-27 12:43:29 +00:00
|
|
|
class MachineFunction;
|
|
|
|
class Module;
|
2006-09-06 18:34:40 +00:00
|
|
|
class TargetAsmInfo;
|
2008-08-21 00:14:44 +00:00
|
|
|
class raw_ostream;
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DwarfWriter - Emits Dwarf debug and exception handling directives.
|
|
|
|
//
|
2006-01-17 17:31:53 +00:00
|
|
|
|
2009-01-08 23:40:34 +00:00
|
|
|
class DwarfWriter : public ImmutablePass {
|
2006-02-22 19:02:11 +00:00
|
|
|
private:
|
2007-01-29 18:51:14 +00:00
|
|
|
/// DD - Provides the DwarfWriter debug implementation.
|
2006-02-27 12:43:29 +00:00
|
|
|
///
|
2007-01-29 18:51:14 +00:00
|
|
|
DwarfDebug *DD;
|
|
|
|
|
|
|
|
/// DE - Provides the DwarfWriter exception implementation.
|
|
|
|
///
|
|
|
|
DwarfException *DE;
|
2006-02-27 17:27:12 +00:00
|
|
|
|
2006-02-27 12:43:29 +00:00
|
|
|
public:
|
2009-01-08 23:40:34 +00:00
|
|
|
static char ID; // Pass identification, replacement for typeid
|
|
|
|
|
|
|
|
DwarfWriter();
|
2006-02-27 12:43:29 +00:00
|
|
|
virtual ~DwarfWriter();
|
|
|
|
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
// Main entry points.
|
|
|
|
//
|
|
|
|
|
|
|
|
/// BeginModule - Emit all Dwarf sections that should come prior to the
|
|
|
|
/// content.
|
2009-01-08 23:40:34 +00:00
|
|
|
void BeginModule(Module *M, MachineModuleInfo *MMI, raw_ostream &OS,
|
|
|
|
AsmPrinter *A, const TargetAsmInfo *T);
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
/// EndModule - Emit all Dwarf sections that should come after the content.
|
|
|
|
///
|
2006-03-23 18:07:55 +00:00
|
|
|
void EndModule();
|
2006-02-27 12:43:29 +00:00
|
|
|
|
2006-04-07 20:44:42 +00:00
|
|
|
/// BeginFunction - Gather pre-function debug information. Assumes being
|
|
|
|
/// emitted immediately after the function entry point.
|
2006-06-23 12:51:53 +00:00
|
|
|
void BeginFunction(MachineFunction *MF);
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
/// EndFunction - Gather and emit post-function debug information.
|
|
|
|
///
|
2008-09-26 00:28:12 +00:00
|
|
|
void EndFunction(MachineFunction *MF);
|
2006-02-27 12:43:29 +00:00
|
|
|
};
|
2005-12-21 19:44:40 +00:00
|
|
|
|
2006-10-30 13:35:07 +00:00
|
|
|
|
2005-12-21 19:46:32 +00:00
|
|
|
} // end llvm namespace
|
2005-12-21 19:44:40 +00:00
|
|
|
|
2005-12-22 01:40:06 +00:00
|
|
|
#endif
|