blob: 0e2aaa47e8c97e0376abd24964977c4958ea1fd1 [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- DWARFDebugMacinfo.cpp -----------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "DWARFDebugMacinfo.h"
11
12#include "DWARFDebugMacinfoEntry.h"
13#include "SymbolFileDWARF.h"
14
15#include "lldb/Core/Stream.h"
16
17using namespace lldb_private;
18using namespace std;
19
20DWARFDebugMacinfo::DWARFDebugMacinfo()
21{
22}
23
24DWARFDebugMacinfo::~DWARFDebugMacinfo()
25{
26}
27
28void
Ed Masteeeae7212013-10-24 20:43:47 +000029DWARFDebugMacinfo::Dump(Stream *s, const DWARFDataExtractor& macinfo_data, lldb::offset_t offset)
Chris Lattner30fdc8d2010-06-08 16:52:24 +000030{
31 DWARFDebugMacinfoEntry maninfo_entry;
32 if (macinfo_data.GetByteSize() == 0)
33 {
34 s->PutCString("< EMPTY >\n");
35 return;
36 }
Greg Claytonc7bece562013-01-25 18:06:21 +000037 if (offset == LLDB_INVALID_OFFSET)
Chris Lattner30fdc8d2010-06-08 16:52:24 +000038 {
39 offset = 0;
40 while (maninfo_entry.Extract(macinfo_data, &offset))
41 maninfo_entry.Dump(s);
42 }
43 else
44 {
45 if (maninfo_entry.Extract(macinfo_data, &offset))
46 maninfo_entry.Dump(s);
47 }
48}