Consider:
# 1 "dj.c"
# 1 "dj.h" 1 3
int dj(int x);
# 2 "dj.c" 2
int dj(int x)
{
}
If you compile with -g and look at the dwarf output, you see:
<1><2d>: Abbrev Number: 2 (DW_TAG_subprogram)
<2e> DW_AT_external: 1
<2e> DW_AT_name: dj
<31> DW_AT_decl_file : 2
Hi,
On Sat, 20 Jun 2015, DJ Delorie wrote:
> Note that the DW_AT_decl_file refers to "dj.h" and not "dj.c". If you
> remove the "3" from the '# 1 "dj.h" 1 3' line, the DW_AT_decl_file
> instead refers to "dj.c". It's been this way for many releases.
>
> Is this intentional?
I think it came