edA-qa mort-ora-y
2013-Mar-31 05:22 UTC
[LLVMdev] landingpad catch types not making it to Dwarf tables
I am having some trouble getting my catch clauses to appear as expected in the dwarf exception tables. I have an instruction like this: %0 = landingpad i64 personality i32 (i32, i32, i64, i8*, i8*)* @leaf_exception_personality catch i8* inttoptr (i64 987 to i8*) catch i8* inttoptr (i64 2453 to i8*) In my exception handler I walk through the records. I always get the correct count, but I type_table information isn't communicated: both of these records give me a type_offset of 1 (to use the ExceptionDemo's name of that field). I have cross-referenced this walking code with that demo, the gcc sources, and the third party (where it originated) and this aspect seems to be correct. Also, if I mark it as cleanup it'll get a 0 offset as expected (or no record if there are no catch clauses). The resulting table entry is also always 0 (null), but at least if the offset would change I'd be happy enough to continue debugging. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130331/5c58789b/attachment.sig>
edA-qa mort-ora-y
2013-Mar-31 14:12 UTC
[LLVMdev] landingpad catch types not making it to Dwarf tables
It looks like you have to use a const global variable for the type clauses, otherwise they end up all pointing to a value of zero. On 31/03/13 07:22, edA-qa mort-ora-y wrote:> I am having some trouble getting my catch clauses to appear as expected > in the dwarf exception tables. I have an instruction like this: > %0 = landingpad i64 personality i32 (i32, i32, i64, i8*, i8*)* > @leaf_exception_personality > catch i8* inttoptr (i64 987 to i8*) > catch i8* inttoptr (i64 2453 to i8*) > > In my exception handler I walk through the records. I always get the > correct count, but I type_table information isn't communicated: both of > these records give me a type_offset of 1 (to use the ExceptionDemo's > name of that field). > > I have cross-referenced this walking code with that demo, the gcc > sources, and the third party (where it originated) and this aspect seems > to be correct. Also, if I mark it as cleanup it'll get a 0 offset as > expected (or no record if there are no catch clauses). > > The resulting table entry is also always 0 (null), but at least if the > offset would change I'd be happy enough to continue debugging. > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130331/8c9baa4e/attachment.sig>
Duncan Sands
2013-Mar-31 17:28 UTC
[LLVMdev] landingpad catch types not making it to Dwarf tables
Hi edA-qa mort-ora-y, On 31/03/13 07:22, edA-qa mort-ora-y wrote:> I am having some trouble getting my catch clauses to appear as expected > in the dwarf exception tables. I have an instruction like this: > %0 = landingpad i64 personality i32 (i32, i32, i64, i8*, i8*)* > @leaf_exception_personality > catch i8* inttoptr (i64 987 to i8*) > catch i8* inttoptr (i64 2453 to i8*)when developing with LLVM you should really build LLVM with assertions enabled (--enable-assertions). Then you will catch problems much earlier. Ciao, Duncan.> > In my exception handler I walk through the records. I always get the > correct count, but I type_table information isn't communicated: both of > these records give me a type_offset of 1 (to use the ExceptionDemo's > name of that field). > > I have cross-referenced this walking code with that demo, the gcc > sources, and the third party (where it originated) and this aspect seems > to be correct. Also, if I mark it as cleanup it'll get a 0 offset as > expected (or no record if there are no catch clauses). > > The resulting table entry is also always 0 (null), but at least if the > offset would change I'd be happy enough to continue debugging. > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Seemingly Similar Threads
- [LLVMdev] post-link Dwarf information appears wrong, works in JIT
- [LLVMdev] post-link Dwarf information appears wrong, works in JIT
- [LLVMdev] custom landingpad data, not dwarf encoded clauses?
- [LLVMdev] object file/linking is missing my exception handlers
- [LLVMdev] custom landingpad data, not dwarf encoded clauses?