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


> Not sure how to test it in the testsuite though, regexp on no
> DW_CFA_def_cfa_register would be too fragile.

What's putatively invalid is:

#!/bin/awk -f
$1 !~ /DW_CFA_[a-z0-9_]+:?/ { ok=0; badsince="(initial) " NR ": " $0; next }
$1 == "DW_CFA_def_cfa_expression" { ok=0; badsince=NR ": " $0; next}
$1 == "DW_CFA_def_cfa:" { ok=NR ": " $0; next }
$1 ~ /DW_CFA_def_cfa_[a-z0-9_]+:/ && !ok {
  print "*** \t\t" NR ": " $0; print "*** bad since\t" badsince
  bad=1
}
END { exit bad }

so you can match that fairly robustly (on "readelf --debug-dump=frames"
output).  That script per se actually requires a preprocessing phase to
prepend CIE sequences to each FDE, but you get the idea.


Thanks,
Roland


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