[CLASSES]: Process DW_TAG_{union,structure}_type tags in cu__process_function
There are cases where just a declaration is emitted, such as in blk_rq_map_user_iov's iov parameter: <2><dc04>: Abbrev Number: 29 (DW_TAG_structure_type) DW_AT_name : (indirect string, offset: 0x3be8): sg_iovec DW_AT_declaration : 1 <2><dc0a>: Abbrev Number: 88 (DW_TAG_formal_parameter) DW_AT_name : iov DW_AT_decl_file : 1 DW_AT_decl_line : 2472 DW_AT_type : <dc60> DW_AT_location : 0x4288 (location list) I.e. the DW_TAG_structure_type tag is emitted at the same level as the DW_TAG_formal_parameter tags, so handled inside the cu__process_function method. This and the next cset only shows that a normalization in the parsing routines is in real demand and will be done, normalization because what needs to be done is similar to what is already done in places like cu__create_new_array, i.e. process all the siblings in a level in tag specific cu methods. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
f49e492555
commit
1e985b42eb
|
@ -2043,6 +2043,11 @@ static void cu__process_function(Dwarf *dwarf, Dwarf_Die *die,
|
||||||
* will be used for stack size calculation
|
* will be used for stack size calculation
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
case DW_TAG_structure_type:
|
||||||
|
case DW_TAG_union_type:
|
||||||
|
cu__create_new_class(dwarf, die, cu, tag, cu_offset,
|
||||||
|
name, type, decl_file, decl_line);
|
||||||
|
goto next_sibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwarf_haschildren(die) != 0 && dwarf_child(die, &child) == 0)
|
if (dwarf_haschildren(die) != 0 && dwarf_child(die, &child) == 0)
|
||||||
|
|
Loading…
Reference in New Issue