diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-13 19:42:23 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-13 19:42:23 +0000 |
commit | aa2f78f5e6cf071a335f7a05ca48cf4df385a172 (patch) | |
tree | d452ecb21885103e72ca6a8df7d7b78abfadeb5a /llvm/lib/DebugInfo/DWARFAttribute.h | |
parent | 88a1d9fc0043f23fe8722cf0949335f41b123f19 (diff) | |
download | bcm5719-llvm-aa2f78f5e6cf071a335f7a05ca48cf4df385a172.tar.gz bcm5719-llvm-aa2f78f5e6cf071a335f7a05ca48cf4df385a172.zip |
Sketch out a DWARF parser.
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.
It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.
llvm-svn: 139627
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFAttribute.h')
-rw-r--r-- | llvm/lib/DebugInfo/DWARFAttribute.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARFAttribute.h b/llvm/lib/DebugInfo/DWARFAttribute.h new file mode 100644 index 00000000000..6f49b637c6a --- /dev/null +++ b/llvm/lib/DebugInfo/DWARFAttribute.h @@ -0,0 +1,30 @@ +//===-- DWARFAttribute.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_DWARFATTRIBUTE_H +#define LLVM_DEBUGINFO_DWARFATTRIBUTE_H + +#include "llvm/Support/DataTypes.h" + +namespace llvm { + +class DWARFAttribute { + uint16_t Attribute; + uint16_t Form; + public: + DWARFAttribute(uint16_t attr, uint16_t form) + : Attribute(attr), Form(form) {} + + uint16_t getAttribute() const { return Attribute; } + uint16_t getForm() const { return Form; } +}; + +} + +#endif |