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/DIContext.cpp | |
| 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/DIContext.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DIContext.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DIContext.cpp b/llvm/lib/DebugInfo/DIContext.cpp new file mode 100644 index 00000000000..e2fd55fd6ef --- /dev/null +++ b/llvm/lib/DebugInfo/DIContext.cpp @@ -0,0 +1,24 @@ +//===-- DIContext.cpp -----------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/DebugInfo/DIContext.h" +#include "DWARFContext.h" +using namespace llvm; + +DIContext::~DIContext() {} + +DIContext *DIContext::getDWARFContext(bool isLittleEndian, + StringRef infoSection, + StringRef abbrevSection, + StringRef aRangeSection, + StringRef lineSection, + StringRef stringSection) { + return new DWARFContextInMemory(isLittleEndian, infoSection, abbrevSection, + aRangeSection, lineSection, stringSection); +} |

