On Wed, Nov 11, 2020 at 12:26:23PM -0800, Andrii Nakryiko wrote: SNIP > > perhaps your gcc generates DWARF that breaks the way you described > > above, but I'd expect to see function with argument without name, > > not function without arguments at all > > > > what gcc version are you on? > > 10.2.0, built from sources > > > > > when you dump debug information, do you see security_inode_getattr > > record with no arguments? > > Yeah, I think so: > > 21158467- <1><2b7e168>: Abbrev Number: 93 (DW_TAG_subprogram) > 21158468- <2b7e169> DW_AT_external : 1 > 21158469- <2b7e169> DW_AT_declaration : 1 > > .. BTW, we should probably still ignore DW_AT_declaration: 1, if it's set. > > 21158470: <2b7e169> DW_AT_linkage_name: (indirect string, offset: > 0x120a0a): security_inode_getattr > 21158471: <2b7e16d> DW_AT_name : (indirect string, offset: > 0x120a0a): security_inode_getattr > 21158472- <2b7e171> DW_AT_decl_file : 141 > 21158473- <2b7e172> DW_AT_decl_line : 346 > 21158474- <2b7e174> DW_AT_decl_column : 5 nice.. so how about making extra loop through cu functions and collect all distinct functions and for each collect most detailed arguments and use this set for final func generation will try to think of some way without extra loop, but can't think of any now jirka