[libcxx-commits] [PATCH] D107919: [unwind] Handle UNW_X86_64_RIP register

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 11 19:03:07 PDT 2021


MaskRay added inline comments.


================
Comment at: libunwind/src/Registers.hpp:349
   switch (regNum) {
   case UNW_REG_IP:
     return _registers.__rip;
----------------
Add UNW_X86_64_RIP here


================
Comment at: libunwind/src/Registers.hpp:456
   switch (regNum) {
   case UNW_REG_IP:
     return "rip";
----------------
Add UNW_X86_64_RIP here


================
Comment at: libunwind/test/libunwind_01.pass.cpp:67
+
+  for (int i = 0; i < 33; ++i) {
+    const char prefix[] = "unknown";
----------------
I am thinking of making the function available on all arches:
```
int num_regs = 0;
#if defined(__x86_64__)
num_regs = 33;
#endif

for (int i = 0; i < num_regs; ++i) {
  ...
}
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107919



More information about the libcxx-commits mailing list