[LLVMdev] post-link Dwarf information appears wrong, works in JIT
edA-qa mort-ora-y
eda-qa at disemia.com
Thu Oct 17 21:00:14 PDT 2013
On 18/10/13 05:47, Bill Wendling wrote:
>> - the clauses are always cast to i8* (I'm using an i64* as that is my
>> type information)
> I forget, but it may be relevant. Try changing it and see if it helps.
I've tried this and it doesn't help. I also tried using a different type
(a structure type) for the types and it doesn't help.
>> - the global variable is marked linkonce_odr unnamed_addr
> I don't think that that would affect anything. What's the ASM look like between the JIT and the .s file?
I'm not clear on what you wish me to compare. I have attached a small IR
program that shows how I am adding the clauses. I then just link with:
gcc -Wl,--eh-frame-hdr,--build-id -o exe object_a.o object_b.o object_c.o
--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.
-------------- next part --------------
; ModuleID = 'test'
@level1 = linkonce_odr unnamed_addr constant i64 1
@levelCatchAll = linkonce_odr unnamed_addr constant i64 0
declare i32 @leaf_exception_personality(i32, i32, i64, i8*, i8*)
declare i8* @count_malloc(i64)
declare void @count_free(i8*)
declare void @_void_destructor(i8*)
declare void @_duplicate_release_shared()
declare void @_uncaught_exception(i8*)
declare void @_raise_exception(i64)
declare void @_Unwind_Resume(i8*)
declare void @leaf_rethrow(i8*)
; Function Attrs: uwtable
define internal void @_entry() #0 {
entry:
%_return_path = alloca i8
store i8 0, i8* %_return_path
%_exception = alloca { i8*, i32 }
invoke void @test_throw()
to label %post_call_4 unwind label %throw_land_2
func_ret_0: ; preds = %seq_1
ret void
seq_1: ; preds = %post_call_4, %throw_cont_3
br label %func_ret_0
throw_land_2: ; preds = %entry
%0 = landingpad { i8*, i32 } personality i32 (i32, i32, i64, i8*, i8*)* @leaf_exception_personality
catch i8* bitcast (i64* @level1 to i8*)
store { i8*, i32 } %0, { i8*, i32 }* %_exception
br label %throw_cont_3
throw_cont_3: ; preds = %throw_land_2
store i8 0, i8* %_return_path
call void @trace_integer(i64 1)
br label %seq_1
post_call_4: ; preds = %entry
br label %seq_1
}
declare void @trace_integer(i64)
declare void @test_throw()
; Function Attrs: uwtable
define i64 @main() #0 {
entry:
invoke void @_entry()
to label %end_1 unwind label %catch_0
catch_0: ; preds = %entry
%0 = landingpad { i8*, i32 } personality i32 (i32, i32, i64, i8*, i8*)* @leaf_exception_personality
catch i8* bitcast (i64* @levelCatchAll to i8*)
%1 = extractvalue { i8*, i32 } %0, 0
call void @_uncaught_exception(i8* %1)
ret i64 255
end_1: ; preds = %entry
ret i64 0
}
attributes #0 = { uwtable }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131018/27b37719/attachment.sig>
More information about the llvm-dev
mailing list