Home | History | Annotate | Download | only in DWARF
      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
     29 DWARFDebugMacinfo::Dump(Stream *s, const DataExtractor& macinfo_data, lldb::offset_t offset)
     30 {
     31     DWARFDebugMacinfoEntry maninfo_entry;
     32     if (macinfo_data.GetByteSize() == 0)
     33     {
     34         s->PutCString("< EMPTY >\n");
     35         return;
     36     }
     37     if (offset == LLDB_INVALID_OFFSET)
     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 }
     49