[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 9 14:24:13 PDT 2017


mstorsjo added a comment.

In https://reviews.llvm.org/D38680#892487, @compnerd wrote:

> I think that the problem is that we are using the generic register name, but we need to use the target specific register name.  On x86, EIP/ESP are swapped.


You mean EBP/ESP? I think the code here does the right thing, with `UNW_REG_SP` always mapping to the actual ESP.

> We should also have a test case for this.  I had reduced this down to a simpler test case of:
> 
>   void f(int,int,int,int,int,int,int,int,int);
>    
>   int main() {
>     try {
>       f(0,1,2,3,4,5,6,7,8);
>     } catch (int) {
>       return 0;
>     }
>     return 1;
>   }
>    

Oh, great if you can reproduce the issue with that! Feel free to try to dig into the issue and figure out a better fix then.


https://reviews.llvm.org/D38680





More information about the cfe-commits mailing list