ladybird/Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

40 lines
715 B
C++

/*
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "DwarfTypes.h"
#include <AK/HashMap.h>
#include <AK/Optional.h>
#include <AK/Types.h>
namespace Debug::Dwarf {
class DwarfInfo;
class AbbreviationsMap {
public:
AbbreviationsMap(const DwarfInfo& dwarf_info, u32 offset);
struct AbbreviationEntry {
EntryTag tag;
bool has_children;
Vector<AttributeSpecification> attribute_specifications;
};
Optional<AbbreviationEntry> get(u32 code) const;
private:
void populate_map();
const DwarfInfo& m_dwarf_info;
u32 m_offset { 0 };
HashMap<u32, AbbreviationEntry> m_entries;
};
}