[LLVMdev] how to reslove gcc_except_table?
zhengjian zhang
zhangzhengjian at gmail.com
Thu Mar 12 19:42:17 PDT 2009
hi:
maybe this should not be here!
the test code:
eh3.cpp
int main()
{
try {
throw 34;
}
catch (int) {
}
catch (char) {
}
catch (bool) {
}
}
compile with g++ -S -dA eh3.cpp -o eh3.s
the except table of the eh3.s
106 .section .gcc_except_table,"a", at progbits
107 .align 4
108 .LLSDA2:
109 .byte 0xff # @LPStart format (omit)
110 .byte 0x0 # @TType format (absolute)
111 .uleb128 .LLSDATT2-.LLSDATTD2 # @TType base offset
112 .LLSDATTD2:
113 .byte 0x1 # call-site format (uleb128)
114 .uleb128 .LLSDACSE2-.LLSDACSB2 # Call-site table length
115 .LLSDACSB2:
116 .uleb128 0x0 # region 0 landing pad
117 .uleb128 0x5 # action
118 .LLSDACSE2:
119 .byte 0x1 # Action record table
120 .byte 0x0
121 .byte 0x2
122 .byte 0x7d
123 .byte 0x3
124 .byte 0x7d
125 .align 4
126 .long _ZTIi
127 .long _ZTIc
128 .long _ZTIb
129 .LLSDATT2:
ok: my problem is the action(line 117) how to index to the action record table?
in Action record table , why there are the magic 0x7d?.
$ g++ -v
$ Using built-in specs.
$ Target: i686-pc-linux-gnu
$ Configured with: ../gcc-4.3.2/configure --prefix=~/gcc-4.3.2-install
--enable-languages=c,c++ --with-mpfr=~/mpfr-2.4.1-install
--enable-sjlj-exceptions
$ Thread model: posix
$ gcc version 4.3.2 (GCC)
More information about the llvm-dev
mailing list