mirror of
https://github.com/facebookexperimental/object-introspection.git
synced 2024-12-04 11:37:11 +00:00
Merge 86e97e7dde
into 0be6343c3d
This commit is contained in:
commit
f6d8bbb5eb
@ -118,6 +118,9 @@ Type& DrgnParser::enumerateType(struct drgn_type* type) {
|
|||||||
case DRGN_TYPE_VOID:
|
case DRGN_TYPE_VOID:
|
||||||
t = &enumeratePrimitive(type);
|
t = &enumeratePrimitive(type);
|
||||||
break;
|
break;
|
||||||
|
case DRGN_TYPE_FUNCTION:
|
||||||
|
t = &enumerateFunction(type);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw DrgnParserError{"Unknown drgn type kind: " +
|
throw DrgnParserError{"Unknown drgn type kind: " +
|
||||||
std::to_string(kind)};
|
std::to_string(kind)};
|
||||||
@ -471,6 +474,10 @@ Type& DrgnParser::enumeratePointer(struct drgn_type* type) {
|
|||||||
return makeType<Pointer>(type, t);
|
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) {
|
Array& DrgnParser::enumerateArray(struct drgn_type* type) {
|
||||||
struct drgn_type* elementType = drgn_type_type(type).type;
|
struct drgn_type* elementType = drgn_type_type(type).type;
|
||||||
uint64_t len = drgn_type_length(type);
|
uint64_t len = drgn_type_length(type);
|
||||||
|
@ -62,6 +62,7 @@ class DrgnParser {
|
|||||||
Enum& enumerateEnum(struct drgn_type* type);
|
Enum& enumerateEnum(struct drgn_type* type);
|
||||||
Typedef& enumerateTypedef(struct drgn_type* type);
|
Typedef& enumerateTypedef(struct drgn_type* type);
|
||||||
Type& enumeratePointer(struct drgn_type* type);
|
Type& enumeratePointer(struct drgn_type* type);
|
||||||
|
Type& enumerateFunction(struct drgn_type* type);
|
||||||
Array& enumerateArray(struct drgn_type* type);
|
Array& enumerateArray(struct drgn_type* type);
|
||||||
Primitive& enumeratePrimitive(struct drgn_type* type);
|
Primitive& enumeratePrimitive(struct drgn_type* type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user