mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibDebug: Move Dwarf::AttributeValue to a separate file
This commit is contained in:
parent
fea9bb8c51
commit
edd79ddd00
3 changed files with 43 additions and 29 deletions
39
Userland/Libraries/LibDebug/Dwarf/AttributeValue.h
Normal file
39
Userland/Libraries/LibDebug/Dwarf/AttributeValue.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Itamar S. <itamar8910@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
|
||||
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 {};
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue