1/* 2 * Copyright 2013, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5#include "TypeUnit.h" 6 7#include <new> 8 9#include "DebugInfoEntries.h" 10 11 12TypeUnit::TypeUnit(off_t headerOffset, off_t contentOffset, 13 off_t totalSize, off_t abbreviationOffset, off_t typeOffset, 14 uint8 addressSize, bool isBigEndian, uint64 signature, bool isDwarf64) 15 : 16 BaseUnit(headerOffset, contentOffset, totalSize, abbreviationOffset, 17 addressSize, isBigEndian, isDwarf64), 18 fUnitEntry(NULL), 19 fTypeEntry(NULL), 20 fSignature(signature), 21 fTypeOffset(typeOffset) 22{ 23} 24 25 26TypeUnit::~TypeUnit() 27{ 28} 29 30 31void 32TypeUnit::SetUnitEntry(DIETypeUnit* entry) 33{ 34 fUnitEntry = entry; 35} 36 37 38DebugInfoEntry* 39TypeUnit::TypeEntry() const 40{ 41 return fTypeEntry; 42} 43 44 45void 46TypeUnit::SetTypeEntry(DebugInfoEntry* entry) 47{ 48 fTypeEntry = entry; 49} 50 51 52dwarf_unit_kind 53TypeUnit::Kind() const 54{ 55 return dwarf_unit_kind_type; 56} 57