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]

[PATCH] Preliminary DW_OP_{implicit,stack}_value support (take 3)


On Thu, Jun 11, 2009 at 04:24:59PM +0200, Jakub Jelinek wrote:
> OT, unrelated to VTA and this patch, seems we should try harder to improve
> location lists start/end handling, because the testcase is:
> f:
> .LFB0:
>         .file 1 "tt.c"
>         # tt.c:1
>         .loc 1 1 0
>         .cfi_startproc
> .LVL0:
>         # basic block 2
> .LVL1:
>         # tt.c:1
>         .loc 1 1 0
>         movl    %edi, %esi
>         xorl    %eax, %eax
>         jmp     h
> .LVL2:
>         .cfi_endproc
> .LFE0:
>         .size   f, .-f
> (note empty range from .LVL0 to .LVL1 and that .LVL0 .. .LVL2 covers
> the whole function - so except for DW_OP_stack_value/DW_OP_implicit_value
> which are only allowed in .debug_loc we could avoid using .debug_loc).

Here is a patch to address this.  Unless I'm missing something obvious,
I don't think it makes sense to generate different .LVL* labels when there
are no real instructions in between them.  Also, I fail to see what
purpose serve location notes after the last real instruction (i.e.
on the empty range after last real instruction till the end of the
function).

The other patches are slightly updated DW_OP_{implicit,stack}_value patches,
for the loc_lists covering the whole function we want to try harder
(if the value is constant, we can use DW_AT_const_value attribute,
and if it is not constant, we can use DW_OP_stack_value, as only
DW_OP_implicit_value is forbidden outside of .debug_loc section).

	Jakub

Attachment: gcc45-varloc-ranges.patch
Description: Text document

Attachment: gcc-vta-OP_implicit_value.patch
Description: Text document

Attachment: gcc45-OP_implicit_value.patch
Description: Text document


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