search for: _unwind_setip

Displaying 7 results from an estimated 7 matches for "_unwind_setip".

2009 May 19
5
[LLVMdev] Getting exceptions to work?
...I can tell). By using the llvm.eh* intrinsics, I have managed to get the code to call my custom personality function without crashing. However, what I don't yet understand is how to get the result from the personality function back to the landing pad. For example, I could use the function _Unwind_SetIP to tell it where to jump to, except that I can't take the address of a label in LLVM. I could call _Unwind_SetGR to set an index and then have a switch in the landing pad that uses that index - except that I would have no way to determine which register is safe to set in a platform-independ...
2009 May 19
0
[LLVMdev] Getting exceptions to work?
...ing the llvm.eh* intrinsics, I have managed to get the code to call > my custom personality function without crashing. However, what I don't > yet understand is how to get the result from the personality function > back to the landing pad. For example, I could use the function > _Unwind_SetIP to tell it where to jump to, except that I can't take the > address of a label in LLVM. I could call _Unwind_SetGR to set an index > and then have a switch in the landing pad that uses that index - except > that I would have no way to determine which register is safe to set in a &g...
2009 May 19
0
[LLVMdev] Getting exceptions to work?
Hello, Talin > By using the llvm.eh* intrinsics, I have managed to get the code to call > my custom personality function without crashing. However, what I don't > yet understand is how to get the result from the personality function > back to the landing pad. You might find this useful: http://www.codesourcery.com/public/cxx-abi/abi-eh.html#cxx-catch -- With best regards, Anton
2009 May 20
2
[LLVMdev] Getting exceptions to work?
...%eh_ptr, %UnwindContext* %eh_context) nounwind { call void (i8*, ...)* @printf(i8* bitcast ([10 x i8]* @str_persn to i8*), i32 %action) %phase = icmp eq i32 %action, 1 br i1 %phase, label %search, label %handler search: ret i32 6 handler: call void @_Unwind_SetIP(%UnwindContext* %eh_context, i8* %cc0) ret i32 7 } -- Talin
2020 Aug 15
5
Supporting libunwind on Windows 10 (32bit; 64bit) for MSVC and Clang
...ntext *context) { ^ C:/Users/clang/libunwind/include\unwind.h:224:18: note: previous declaration is here extern uintptr_t _Unwind_GetIP(struct _Unwind_Context *context); ^ C:/Users/clang/libunwind/src/UnwindLevel1.c:507:24: warning: redeclaration of '_Unwind_SetIP' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration] _LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context, ^ C:/Users/clang/libunwind/include\unwind.h:225:13: note: previous declaration is here extern void _Unwind_SetIP(struct _...
2009 May 18
0
[LLVMdev] Getting exceptions to work?
Hi Talin, You're not using the llvm intrinsics for exception handling, so your code won't work. Using _Unwind_RaiseException should be OK, but your main function must at least use llvm.eh.exception, llvm.eh.selector.i32/64 and probably __cxa_begin_catch and __cxa_end_catch. Nicolas Talin wrote: > I've been struggling for several days, trying to get native exceptions > to
2009 May 18
4
[LLVMdev] Getting exceptions to work?
I've been struggling for several days, trying to get native exceptions to work in my code. I managed to boil down the IR to the simplest possible example that I can think of. If anyone on this list can tell me what changes I need to make to the following code to get it to work (i.e. return 0 instead of a bus error), it would make my life immensely better. ; ModuleID =