On 1/4/21 10:45 PM, Jeff Law wrote:
>
>
> On 1/4/21 1:06 PM, Bernd Edlinger wrote:
>> --- a/gcc/final.c
>> +++ b/gcc/final.c
>> @@ -1735,7 +1735,12 @@ final_start_function_1 (rtx_insn **firstp, FILE
>> *file, int *seen,
>> last_filename);
>>
>> if (!dwarf2_debug_info_emitted_p (current_function_decl))
>> - dwarf2out_begin_prologue (0, 0, NULL);
>> + {
>> + if (write_symbols == DWARF2_DEBUG)
>> + dwarf2out_begin_prologue (last_linenum, last_columnnum, last_filename);
>> + else
>> + dwarf2out_begin_prologue (0, 0, NULL);
>> + }
> The only way you're getting into this code is for DEBUG_DWARF2 and
> VMS_AND_DWARF2_DEBUG and in the latter case we want to make the same
> fix. So drop the newly added conditional and just make the code
> something like this:
>
>
> if (!dwarf2_debug_info_emitted_p (current_function_decl))
> Â dwarf2out_begin_prologue (last_linenum, last_columnnum, last_filename)
>
>
No, this is block is entered iff
(write_symbols != DWARF2_DEBUG && write_symbols != VMS_AND_DWARF2_DEBUG)
|| DECL_IGNORED (current_function_decl))
so emitting .loc info here could easily break DBX, XCOFF, and VMS w/o DWARF
while I have no way to test anything for these debug formats.
Bernd.