This commit is contained in:
Jon Haslam 2024-11-20 23:18:05 +00:00 committed by GitHub
commit f6d8bbb5eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -118,6 +118,9 @@ Type& DrgnParser::enumerateType(struct drgn_type* type) {
case DRGN_TYPE_VOID:
t = &enumeratePrimitive(type);
break;
case DRGN_TYPE_FUNCTION:
t = &enumerateFunction(type);
break;
default:
throw DrgnParserError{"Unknown drgn type kind: " +
std::to_string(kind)};
@ -471,6 +474,10 @@ Type& DrgnParser::enumeratePointer(struct drgn_type* type) {
return makeType<Pointer>(type, t);
}
Type& DrgnParser::enumerateFunction(struct drgn_type* type) {
return makeType<Primitive>(type, Primitive::Kind::StubbedPointer);
}
Array& DrgnParser::enumerateArray(struct drgn_type* type) {
struct drgn_type* elementType = drgn_type_type(type).type;
uint64_t len = drgn_type_length(type);

View File

@ -62,6 +62,7 @@ class DrgnParser {
Enum& enumerateEnum(struct drgn_type* type);
Typedef& enumerateTypedef(struct drgn_type* type);
Type& enumeratePointer(struct drgn_type* type);
Type& enumerateFunction(struct drgn_type* type);
Array& enumerateArray(struct drgn_type* type);
Primitive& enumeratePrimitive(struct drgn_type* type);