mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-09-24 02:00:05 +00:00
sketch out new location representation
This commit is contained in:
+27
-4
@@ -1058,13 +1058,11 @@ RDI_SymbolMemberTable:
|
||||
{
|
||||
{name_string_idx RDI_U32 ""}
|
||||
{symbol_flags RDI_SymbolFlags ""}
|
||||
{location_kind RDI_LocationKind ""}
|
||||
{container_flags RDI_ContainerFlags ""}
|
||||
{reserved_0 RDI_U8 ""}
|
||||
{reserved_1 RDI_U32 ""}
|
||||
{reserved_0 RDI_U16 ""}
|
||||
{location RDI_Location ""}
|
||||
{container_idx RDI_U32 ""}
|
||||
{type_idx RDI_U32 ""}
|
||||
{location_idx RDI_U32 ""}
|
||||
{root_scope_idx RDI_U32 ""}
|
||||
{link_name_string_idx RDI_U32 ""}
|
||||
}
|
||||
@@ -1231,6 +1229,31 @@ RDI_LocationSetElementMemberTable:
|
||||
@expand(RDI_LocationKindTable a) `$(a.name .. =>20) = $(a.value)`
|
||||
}
|
||||
|
||||
@gen(enums)
|
||||
{
|
||||
`typedef RDI_U64 RDI_Location;`;
|
||||
`#define RDI_Location_KindMask 0xff00000000000000ull`;
|
||||
`#define RDI_Location_KindShift 56`;
|
||||
`#define RDI_Location_OffMask 0x00ffffffffffffffull`;
|
||||
`#define RDI_Location_OffShift 0`;
|
||||
`#define RDI_Location_SetFirstIndexMask 0x00000000ffffffffull`;
|
||||
`#define RDI_Location_SetFirstIndexShift 0`;
|
||||
`#define RDI_Location_SetCountMask 0x00ffffff00000000ull`;
|
||||
`#define RDI_Location_SetCountShift 32`;
|
||||
`#define RDI_Location_RegCodeMask 0x00ff000000000000ull`;
|
||||
`#define RDI_Location_RegCodeShift 48`;
|
||||
`#define RDI_Location_RegOffMask 0x0000ffff00000000ull`;
|
||||
`#define RDI_Location_RegOffShift 32`;
|
||||
`#define rdi_kind_from_location(l) ((((l) & RDI_Location_KindMask) >> RDI_Location_KindShift))`;
|
||||
`#define rdi_voff_from_location(l) (rdi_kind_from_location(l) == RDI_LocationKind_ModuleOff ? (((l) & RDI_Location_OffMask) >> RDI_Location_OffShift) : 0)`;
|
||||
`#define rdi_toff_from_location(l) (rdi_kind_from_location(l) == RDI_LocationKind_TLSOff ? (((l) & RDI_Location_OffMask) >> RDI_Location_OffShift) : 0)`;
|
||||
`#define rdi_constant_data_off_from_location(l) (rdi_kind_from_location(l) == RDI_LocationKind_ConstantDataOff ? (((l) & RDI_Location_OffMask) >> RDI_Location_OffShift) : 0)`;
|
||||
`#define rdi_set_first_index_from_location(l) (rdi_kind_from_location(l) == RDI_LocationKind_Set ? (((l) & RDI_Location_SetFirstIndexMask) >> RDI_Location_SetFirstIndexShift) : 0)`;
|
||||
`#define rdi_set_count_from_location(l) (rdi_kind_from_location(l) == RDI_LocationKind_Set ? (((l) & RDI_Location_SetCountMask) >> RDI_Location_SetCountShift) : 0)`;
|
||||
`#define rdi_regcode_from_location(l) ((((l) & RDI_Location_RegCodeMask) >> RDI_Location_RegCodeShift))`;
|
||||
`#define rdi_regoff_from_location(l) ((((l) & RDI_Location_RegOffMask) >> RDI_Location_RegOffShift))`;
|
||||
}
|
||||
|
||||
//- rjf: xlists
|
||||
|
||||
@xlist RDI_LinkFlags_XList:
|
||||
|
||||
Reference in New Issue
Block a user