forked from Imagelibrary/littlefs
scripts: Adopted ctx.py-related changes in structs.py
- Dropped --internal flag, structs.py includes all structs now. No reason to limit structs.py to public structs if ctx.py exists. - Added struct/union/enum prefixes to results (enums were missing in ctx.py). - Only sort children layers if explicitly requested. This should preserve field order, which is nice. - Adopt more advanced FileInfo/DwarfInfo classes. - Adopted table renderer changes (notes rendering).
This commit is contained in:
@@ -369,11 +369,13 @@ def collect_dwarf_info(obj_path, filter=None, *,
|
||||
def name(self):
|
||||
if 'DW_AT_name' in self:
|
||||
name = self['DW_AT_name'].split(':')[-1].strip()
|
||||
# prefix with struct/union
|
||||
# prefix with struct/union/enum
|
||||
if self.tag == 'DW_TAG_structure_type':
|
||||
name = 'struct ' + name
|
||||
elif self.tag == 'DW_TAG_union_type':
|
||||
name = 'union ' + name
|
||||
elif self.tag == 'DW_TAG_enumeration_type':
|
||||
name = 'enum ' + name
|
||||
return name
|
||||
else:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user