This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR debug/47471 (set prologue_end in .debug_line)


On 03/31/2011 07:35 AM, Dodji Seketeli wrote:
> redundant .loc directives.  It seems to me that in the case of direct
> output (i.e when we the underlying assembler doesn't support the .loc
> directive) we already avoid the duplication.  And that avoidance fixes
> the immediate issue GDB is facing, with -g -O0.

There's no avoidance with direct output either.  See the #if 0 bits
inside output_line_info itself.

#if 0
      /* Don't emit anything for redundant notes.  */
      if (line_info->dw_line_num == current_line
          && line_info->dw_file_num == current_file
          && line_info->function == function)
        goto cont;
#endif

> With -g -O>0, GDB doesn't have the issue as the DW_AT_location
> attributes of the variable DIEs are locations that are valid in the
> region of the prologue, so it doesn't need to know where the prologue
> ends.  Just trusting DW_AT_location is enough.

Ah, I see.  And I can see how having end_prologue might help there.
Well, let's see if we can clean things up here then.

As for your patch itself, you're not checking to see if you're outputting
to the same section, which could cause line info to go missing at the
beginning of a different section.

That said, the patch I'm working on will do this elimination in one place
for both direct output and assembler output, and be mindful of sections.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]