[LLVMdev] how to reslove gcc_except_table?
Duncan Sands
baldrick at free.fr
Fri Mar 13 01:51:14 PDT 2009
Hi,
> maybe this should not be here!
does this have anything to do with LLVM?
> int main()
> {
> try {
> throw 34;
> }
> catch (int) {
> }
> catch (char) {
> }
> catch (bool) {
> }
> }
The action is 0x5, this refers to
123 .byte 0x3
124 .byte 0x7d
where 0x3 means that the typeinfo is _ZTIi (int).
The 0x7d says that if the typeinfo doesn't match,
then the next action to consider is at offset -3
from here. In other words, it will continue with
121 .byte 0x2
122 .byte 0x7d
i.e. it will then try and match with _ZTIc. If this
doesn't match then the next action to consider is
offset -3 from here (0x7d), i.e. it will next examine
119 .byte 0x1 # Action record table
120 .byte 0x0
i.e. it will try and match with _ZTIb. If this
doesn't match then it is all over (0x0).
> 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?.
Ciao,
Duncan.
More information about the llvm-dev
mailing list