2005-12-21 19:44:40 +00:00
|
|
|
//===-- llvm/CodeGen/DwarfWriter.h - Dwarf Framework ------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by James M. Laskey and is distributed under the
|
|
|
|
// University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2006-01-17 17:31:53 +00:00
|
|
|
// This file contains support for writing Dwarf debug 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
|
|
|
//
|
2006-01-17 17:31:53 +00:00
|
|
|
// The role of the Dwarf Writer class is to extract debug 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
|
|
|
|
2006-12-07 20:28:15 +00:00
|
|
|
#include <iosfwd>
|
2006-01-04 13:52:30 +00:00
|
|
|
|
2005-12-21 19:46:32 +00:00
|
|
|
namespace llvm {
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
class AsmPrinter;
|
2006-10-30 13:35:07 +00:00
|
|
|
class Dwarf;
|
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;
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// DwarfWriter - Emits Dwarf debug and exception handling directives.
|
|
|
|
//
|
2006-01-17 17:31:53 +00:00
|
|
|
|
2006-10-30 13:35:07 +00:00
|
|
|
class DwarfWriter {
|
2006-02-22 19:02:11 +00:00
|
|
|
private:
|
2006-10-30 13:35:07 +00:00
|
|
|
/// DM - Provides the DwarfWriter implementation.
|
2006-02-27 12:43:29 +00:00
|
|
|
///
|
2006-10-30 13:35:07 +00:00
|
|
|
Dwarf *DW;
|
2006-02-27 17:27:12 +00:00
|
|
|
|
2006-02-27 12:43:29 +00:00
|
|
|
public:
|
|
|
|
|
2006-09-07 22:06:40 +00:00
|
|
|
DwarfWriter(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
|
2006-02-27 12:43:29 +00:00
|
|
|
virtual ~DwarfWriter();
|
|
|
|
|
2007-01-26 21:22:28 +00:00
|
|
|
/// SetModuleInfo - Set machine module info when it's known that pass manager
|
|
|
|
/// has created it. Set by the target AsmPrinter.
|
|
|
|
void SetModuleInfo(MachineModuleInfo *MMI);
|
2006-02-27 12:43:29 +00:00
|
|
|
|
|
|
|
//===--------------------------------------------------------------------===//
|
|
|
|
// Main entry points.
|
|
|
|
//
|
|
|
|
|
|
|
|
/// BeginModule - Emit all Dwarf sections that should come prior to the
|
|
|
|
/// content.
|
2006-03-23 18:07:55 +00:00
|
|
|
void BeginModule(Module *M);
|
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.
|
|
|
|
///
|
2006-03-23 18:07:55 +00:00
|
|
|
void EndFunction();
|
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
|