aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2025-10-16 09:49:38 +0300
committerGitHub <noreply@github.com>2025-10-16 09:49:38 +0300
commit10be254587da24d56e2c6817b382beaca612b6c3 (patch)
tree854ded54cddffdd5556837a03937bcbc0497fb6b /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
parentd50423e182e397b92d2502f3a833e645b6867f14 (diff)
downloadllvm-10be254587da24d56e2c6817b382beaca612b6c3.zip
llvm-10be254587da24d56e2c6817b382beaca612b6c3.tar.gz
llvm-10be254587da24d56e2c6817b382beaca612b6c3.tar.bz2
[clang] Fix catching pointers by reference on mingw targets (#162546)
For this specific case, when catching a pointer data type, by reference, Clang generates a special code pattern, which directly accesses the exception data by skipping past the `_Unwind_Exception` manually (rather than using the return value of `__cxa_begin_catch`). On most platforms, `_Unwind_Exception` is 32 bytes, but in some configurations it's different. (ARM EHABI is one preexisting case.) In the case of SEH, it's also different - it is 48 bytes in 32 bit mode and 64 bytes in 64 bit mode. (See the SEH ifdef in `_Unwind_Exception` in `clang/lib/Headers/unwind.h`.) Handle this case in `TargetCodeGenInfo::getSizeOfUnwindException`, fixing the code generation for catching pointers by reference. This fixes https://github.com/mstorsjo/llvm-mingw/issues/522.
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
0 files changed, 0 insertions, 0 deletions