mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
incomplete: handle drgn returning a nullptr name
This commit is contained in:
parent
4563cbe713
commit
6f623e95a4
@ -125,12 +125,14 @@ Type& DrgnParser::enumerateType(struct drgn_type* type) {
|
||||
} catch (const DrgnParserError& e) {
|
||||
depth_--;
|
||||
if (isTypeIncomplete) {
|
||||
const char* typeName = "<incomplete>";
|
||||
const char* typeName = nullptr;
|
||||
if (drgn_type_has_name(type)) {
|
||||
typeName = drgn_type_name(type);
|
||||
} else if (drgn_type_has_tag(type)) {
|
||||
typeName = drgn_type_tag(type);
|
||||
}
|
||||
if (typeName == nullptr)
|
||||
typeName = "<incomplete>";
|
||||
|
||||
return makeType<Incomplete>(nullptr, typeName);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user