Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- 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 | |
| 17 | using namespace lldb_private; |
| 18 | using namespace std; |
| 19 | |
| 20 | DWARFDebugMacinfo::DWARFDebugMacinfo() |
| 21 | { |
| 22 | } |
| 23 | |
| 24 | DWARFDebugMacinfo::~DWARFDebugMacinfo() |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | void |
Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame^] | 29 | DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, lldb::offset_t offset) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 30 | { |
| 31 | DWARFDebugMacinfoEntry maninfo_entry; |
| 32 | if (macinfo_data.GetByteSize() == 0) |
| 33 | { |
| 34 | s->PutCString("< EMPTY >\n"); |
| 35 | return; |
| 36 | } |
Greg Clayton | c7bece56 | 2013-01-25 18:06:21 +0000 | [diff] [blame^] | 37 | if (offset == LLDB_INVALID_OFFSET) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 38 | { |
| 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 | } |