1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:18:12 +00:00

LibDebug: Move Dwarf::AttributeValue to a separate file

This commit is contained in:
Itamar 2021-06-18 14:15:01 +03:00 committed by Andreas Kling
parent fea9bb8c51
commit edd79ddd00
3 changed files with 43 additions and 29 deletions

View file

@ -6,9 +6,11 @@
#pragma once
#include "AttributeValue.h"
#include "CompilationUnit.h"
#include "DwarfTypes.h"
#include <AK/ByteBuffer.h>
#include <AK/NonnullOwnPtrVector.h>
#include <AK/NonnullRefPtr.h>
#include <AK/RefCounted.h>
#include <AK/String.h>
@ -16,32 +18,6 @@
namespace Debug::Dwarf {
struct AttributeValue {
enum class Type : u8 {
UnsignedNumber,
SignedNumber,
LongUnsignedNumber,
String,
DieReference, // Reference to another DIE in the same compilation unit
Boolean,
DwarfExpression,
SecOffset,
RawBytes,
} type;
union {
u32 as_u32;
i32 as_i32;
u64 as_u64;
const char* as_string; // points to bytes in the memory mapped elf image
bool as_bool;
struct {
u32 length;
const u8* bytes; // points to bytes in the memory mapped elf image
} as_raw_bytes;
} data {};
};
class DwarfInfo {
public:
explicit DwarfInfo(const ELF::Image&);