mstorsjo added a comment.

In D67347#1705611 <https://reviews.llvm.org/D67347#1705611>, @labath wrote:

> In D67347#1705563 <https://reviews.llvm.org/D67347#1705563>, @mstorsjo wrote:
>
> > Quick question here; will unwinding using DWARF debug info still work like 
> > before after this, for binaries that don't use SEH for exception unwinding?
>
>
> Do you mean debug_frame or eh_frame? debug_frame should be completely 
> unaffected by this. the interaction between eh_frame and SEH is more tricky, 
> but I don't know if that's ever used/emitted on windows (since presumably the 
> system libraries don't know how to read it)...


I meant debug_frame. Ok, good if that's unaffected.

In MinGW setups, you can have a number of different combinations of both unwind 
and debug info. The debug info normally is DWARF (i.e. debug_frame), but it can 
also (in pure clang/lld based environments, not with GCC/binutils) optionally 
use codeview/PDB.

For unwind info, on x64, SEH is normally used, but it can also optionally use 
SjLj or DWARF (i.e. eh_frame). For i686 (and armv7), DWARF is the default.

And for the cases where it does use SEH for C++ exception unwinding, it doesn't 
do it exactly like MSVC does, but it uses a special gcc personality function 
which unwinds one step at a time with RtlVirtualUnwind. So it still does use 
the system unwinder facility, but slightly differently.

In D67347#1705573 <https://reviews.llvm.org/D67347#1705573>, @aleksandr.urakov 
wrote:

> In D67347#1705563 <https://reviews.llvm.org/D67347#1705563>, @mstorsjo wrote:
>
> > Quick question here; will unwinding using DWARF debug info still work like 
> > before after this, for binaries that don't use SEH for exception unwinding?
>
>
> Do I understand the question correctly: you mean x64 Windows binaries with an 
> additional DWARF unwind info inside, right? In that case the info from PE32+ 
> directory should be used, it has a higher priority than the debug info. I 
> think it should have a higher priority because it is used by the system 
> during an unwind and is always presented in x64 binaries, so we have stronger 
> guarantees with it.


No, I meant DWARF debug info.

> In all other cases, when the info in PE32+ directory is not presented, all 
> things should work as usual (then, the DWARF info will be used).

Ok, that's good.

If I build an environment for x86_64 that uses DWARF for exception handling, 
ExceptionTableRVA/ExceptionTableSize are zero in the data directory, so I would 
presume this would be skipped then, and use the DWARF info instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67347



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to