mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:18:12 +00:00
LibDebug: Add support for enum value types
Additionally, we will parse and expose the types of variables if they are complex, like Enums or Structs. Variables of an enum type are special in that they do not store all the members of said enum in their own VariableInfo like Structs do, rather, all of the values are stored in the VariableInfo for the Enum.
This commit is contained in:
parent
b750843797
commit
a4f23429aa
3 changed files with 102 additions and 36 deletions
|
@ -53,17 +53,27 @@ public:
|
|||
enum class LocationType {
|
||||
None,
|
||||
Address,
|
||||
Regsiter,
|
||||
Register,
|
||||
};
|
||||
String name;
|
||||
String type;
|
||||
String type_name;
|
||||
LocationType location_type { LocationType::None };
|
||||
union {
|
||||
u32 address;
|
||||
} location_data { 0 };
|
||||
|
||||
union {
|
||||
u32 as_u32;
|
||||
u32 as_i32;
|
||||
const char* as_string;
|
||||
} constant_data { 0 };
|
||||
|
||||
Dwarf::EntryTag type_tag;
|
||||
OwnPtr<VariableInfo> type;
|
||||
NonnullOwnPtrVector<VariableInfo> members;
|
||||
VariableInfo* parent { nullptr };
|
||||
|
||||
bool is_enum_type() const { return type && type->type_tag == Dwarf::EntryTag::EnumerationType; }
|
||||
};
|
||||
|
||||
struct VariablesScope {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue