mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 22:28:22 +00:00
LibDebug: Store 64-bit numbers in AttributeValue
This helps us avoid weird truncation issues and fixes a bug on Clang builds where truncation while reading caused the DIE offsets following large LEB128 numbers to be incorrect. This removes the need for the separate `LongUnsignedNumber` type.
This commit is contained in:
parent
efd1aea969
commit
7396e4aedc
Notes:
sideshowbarker
2024-07-18 07:16:33 +09:00
Author: https://github.com/BertalanD
Commit: 7396e4aedc
Pull-request: https://github.com/SerenityOS/serenity/pull/8718
Issue: https://github.com/SerenityOS/serenity/issues/363
Reviewed-by: https://github.com/gunnarbeutner ✅
Reviewed-by: https://github.com/nico
6 changed files with 32 additions and 31 deletions
|
@ -15,7 +15,6 @@ struct AttributeValue {
|
|||
enum class Type : u8 {
|
||||
UnsignedNumber,
|
||||
SignedNumber,
|
||||
LongUnsignedNumber,
|
||||
String,
|
||||
DieReference, // Reference to another DIE in the same compilation unit
|
||||
Boolean,
|
||||
|
@ -26,9 +25,8 @@ struct AttributeValue {
|
|||
|
||||
union {
|
||||
FlatPtr as_addr;
|
||||
u32 as_u32;
|
||||
i32 as_i32;
|
||||
u64 as_u64;
|
||||
u64 as_unsigned;
|
||||
i64 as_signed;
|
||||
const char* as_string; // points to bytes in the memory mapped elf image
|
||||
bool as_bool;
|
||||
struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue