[Lldb-commits] [PATCH] D82378: [lldb/Unwind] Use eh_frame plan directly when it doesn't need to be augmented

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 23 07:58:40 PDT 2020


jankratochvil added a comment.

I do not like much this approach but it fixes this case. I would prefer checking `DW_AT_producer` together with `-grecord-gcc-switches`.
I was trying GCC and clang and all the IMO relevant options and I can get either no `.eh_frame`/`.debug_frame` or an asynchronous one.:

  (set -ex;rm -rf udir;mkdir udir;cd udir;rm -f *;for e in -f{,no-}exceptions;do for u in -f{,no-}asynchronous-unwind-tables;do for a in -f{,no-}unwind-tables;do for c in clang gcc;do echo 'int main(void){return 0;}'|$c $e $a $u -o $c$e$u$a -x c -;done;done;done;done;for i in $(sha256sum *|sort|awk '{x[$1]=$2}END{for (y in x) print x[y]}');do nm $i|grep -w main;readelf -wf $i;done) 2>&1|less

So I think current compilers no longer produce non-asynchronous unwind tables (that should be verified in the gcc+clang code which I did not) and a simple compiler version check in `DW_AT_producer` would be enough (even without checking compilation options).



================
Comment at: lldb/test/Shell/Unwind/eh-frame-augment-noop.test:20
+# CHECK: eh_frame augmented UnwindPlan:
+# CHECK:      row[0]:  0: CFA=rsp +8 => rip=[CFA-8] 
+# CHECK-NEXT: row[1]:  1: CFA=rsp+16 => rip=[CFA-8] 
----------------
trailing whitespace. (5x)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82378/new/

https://reviews.llvm.org/D82378





More information about the lldb-commits mailing list