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] Force DW_CFA_def_cfa after DW_CFA_def_cfa_expression if no longer indirect


> That's not something we can do in the testsuite (rely on readelf, run awk,
> ...).  All that is available (except for writing something in tcl) is just
> a regex on the assembly output in this case (perhaps with -dA and
> -gno-dwarf2-cfi-asm).

Sure, I meant in whatever context you do it, just illustrating the check.
Of course one can do anything in tcl one can do in awk (one just has to
suppress the rising of the bile).  It does seem slightly fragile to depend
on the exact look of the -dA output, but not desperately so.  (It would be
perhaps less so if you checked the assembly for .cfi_* syntax rather than
the -dA comment pattern, but then you'd have to assume a config where
-gdwarf2-cfi-asm works.)

> BTW, the problem is not just DW_CFA_def_cfa_[a-z0-9_]+ following
> immediately DW_CFA_def_cfa_expression, but also
> DW_CFA_def_cfa_expression
> ...
> DW_CFA_remember_state
> ...
> DW_CFA_restore_state
> DW_CFA_def_cfa_[a-z0-9_]+

Ooh.  I hadn't thought about that.  One would certainly have to write an
awk/tcl script with a little more state (a stack of flags), but that's not
really much more complex to handle.


Thanks,
Roland


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