During a backtrace the .cfi_undefined for a float register causes an assert in libunwind.
- Group Reviewers
- rG77aa9ca92ae4: [libunwind] Support cfi_undefined and cfi_register for float registers.
this works for me:
>uname -m -o aarch64 GNU/Linux >g++ --vesion g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 >g++ libunwind/test/floatregister.pass.cpp -Wl,--export-dynamic -Wl,-ldl
It could. Maybe Windows won't work due to dladdr IIRC.
As none of the test here needs one.
This tests needs -Wl,--export-dynamic to work. I missed the fact.
--export-dynamic is specified by if triple is not None and 'linux' in triple: self.cxx.link_flags += ['-Wl,--export-dynamic'] in test/libunwind/test/config.py.
Ideally the test itself should specify such a flag, but the change LGTM.
The comment can be improved by saying what the 4 directives do.
This broke building for armv7-mingw. The Register_arm version of getFloatRegister() is not const, contrary to the other getFloatRegister() implementations for other architectures. It's not a plain oversight, as Registers_arm::getFloatRegister has a bunch of logic for fetching the relevant register banks (VFP 0-15, VFP 16-31 or WMMX) if not yet fetched, so it can't be made const easily. And I don't think it's a place where it's necessarily right to make the member variables mutable either...