| 1 | //===-- DWARFTypeUnit.cpp -------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "DWARFTypeUnit.h" |
| 10 | |
| 11 | #include "SymbolFileDWARF.h" |
| 12 | #include "lldb/Utility/Stream.h" |
| 13 | |
| 14 | using namespace lldb; |
| 15 | using namespace lldb_private; |
| 16 | using namespace lldb_private::plugin::dwarf; |
| 17 | |
| 18 | void DWARFTypeUnit::Dump(Stream *s) const { |
| 19 | s->Format(format: "{0:x16}: Type Unit: length = {1:x8}, version = {2:x4}, " |
| 20 | "abbr_offset = {3:x8}, addr_size = {4:x2} (next CU at " |
| 21 | "[{5:x16}])\n" , |
| 22 | args: GetOffset(), args: (uint32_t)GetLength(), args: GetVersion(), |
| 23 | args: (uint32_t)GetAbbrevOffset(), args: GetAddressByteSize(), |
| 24 | args: GetNextUnitOffset()); |
| 25 | } |
| 26 | |