1 //===-- DWARFDebugMacinfo.cpp -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "DWARFDebugMacinfo.h"
12 #include "DWARFDebugMacinfoEntry.h"
13 #include "SymbolFileDWARF.h"
15 #include "lldb/Utility/Stream.h"
17 using namespace lldb_private;
20 DWARFDebugMacinfo::DWARFDebugMacinfo() {}
22 DWARFDebugMacinfo::~DWARFDebugMacinfo() {}
24 void DWARFDebugMacinfo::Dump(Stream *s, const DWARFDataExtractor &macinfo_data,
25 lldb::offset_t offset) {
26 DWARFDebugMacinfoEntry maninfo_entry;
27 if (macinfo_data.GetByteSize() == 0) {
28 s->PutCString("< EMPTY >\n");
31 if (offset == LLDB_INVALID_OFFSET) {
33 while (maninfo_entry.Extract(macinfo_data, &offset))
34 maninfo_entry.Dump(s);
36 if (maninfo_entry.Extract(macinfo_data, &offset))
37 maninfo_entry.Dump(s);