[PATCH] D148499: [RISC-V libunwind]:Fix RISC-V backtrace issue

Feng Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 23 18:28:08 PDT 2023


wf520gg added inline comments.


================
Comment at: libunwind/src/UnwindCursor.hpp:2843
+  // A signal frame will have a return address pointing to
+  // __default_sa_restorer. This code is hardwired as:
+  //
----------------
MaskRay wrote:
> Where is __default_sa_restorer defined? Isn't it only used by Linux arm?
Yes,you are right,just arm has this defination.There is some ambiguity about this comment, that should be "A signal frame will have a return address pointing to sigreturn syscall just like arm __default_sa_restorer."。 


================
Comment at: libunwind/src/UnwindCursor.hpp:2866
+  // the trampoline. We store the mcontext inside ucontext as sigctx.
+  pint_t sigctx = sp + sizeof(siginfo_t) + kOffsetSpToSigcontext;
+
----------------
MaskRay wrote:
> This causes
> `error: use of undeclared identifier 'siginfo_t'`
> on glibc riscv64.
I will add riscv arch for signal_unwind.pass.cpp. Could you tell me how to test it? or is there any doc about how to run the libunwind test?I haven't found it.Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148499



More information about the llvm-commits mailing list