This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [google/gcc-4_9] Add -ftwo-level-line-tables and -gline-tables-only options
- From: Dehao Chen <dehao at google dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 29 Jan 2015 13:42:02 -0800
- Subject: Re: [google/gcc-4_9] Add -ftwo-level-line-tables and -gline-tables-only options
- Authentication-results: sourceware.org; auth=none
- References: <20150126020610 dot 6C7191609FA at ccoutant dot mtv dot corp dot google dot com> <CAO2gOZW5oCCWy+ki2ry3hXexSPMVEh5fFMRbnjuw+7jLC84xuA at mail dot gmail dot com> <CAHACq4q04smWVHJ=yLX31tWifFwpBep41dshEVoZEXoaWZgszw at mail dot gmail dot com> <CAO2gOZVJDOZAg_Lm1U4pFJTr+x+z_m+17CM7kOMJL7L8TsFUSA at mail dot gmail dot com> <CAHACq4r26La-s2wnzrNFfyabRvdHhe4AXbXmp2vZBZ4TLHRerQ at mail dot gmail dot com> <CAO2gOZV7=VOrDb_MmM=Qivk8MNVa4AHMHkEA3niKU9cyO=utHg at mail dot gmail dot com> <CAHACq4oFOBxunH+984Pq-WnOg+2h-hhdJ5eiXNxHyQhRN=osVQ at mail dot gmail dot com> <CAHACq4pkYf6y0ZEBb6JPkU8eb2kBtqHXgh6giXxsr+GF50uJ+Q at mail dot gmail dot com>
patch is ok for google branch.
Dehao
On Thu, Jan 29, 2015 at 1:11 PM, Cary Coutant <ccoutant@google.com> wrote:
> Here's a very slightly revised patch, fixing a couple of bugs found
> during GDB testing.
>
> In out_logical_entry, I should pass along the value of is_stmt when
> creating a logical for the calling context, so that we get a
> breakpoint location for the point of call:
>
> context = out_logical_entry (table, caller_file_num, s.line,
> caller_discrim, block->caller,
> + is_stmt, true);
>
> And later in out_logical_entry, I should set table->is_stmt only when
> we explicitly set is_stmt in the assembly output:
>
> if (is_stmt != table->is_stmt)
> {
> fputs (" is_stmt ", asm_out_file);
> putc (is_stmt ? '1' : '0', asm_out_file);
> + table->is_stmt = is_stmt;
> }
>
> Instead of at the bottom of the function:
>
> table->file_num = file_num;
> table->line_num = line_num;
> table->discrim_num = discriminator;
> - table->is_stmt = is_stmt;
> table->in_use = true;
>
> This sometimes caused lines where is_stmt should have been set to be
> marked is_stmt == 0 because we thought it was already set.
>
> -cary