File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,12 @@ class java_bytecode_parse_treet
82
82
return instructions.back ();
83
83
}
84
84
85
- class exceptiont
85
+ struct exceptiont
86
86
{
87
+ std::size_t start_pc;
88
+ std::size_t end_pc;
89
+ std::size_t handler_pc;
90
+ symbol_typet catch_type;
87
91
};
88
92
89
93
typedef std::vector<exceptiont> exception_tablet;
Original file line number Diff line number Diff line change @@ -968,13 +968,20 @@ void java_bytecode_parsert::rmethod_attribute(methodt &method)
968
968
rbytecode (method.instructions );
969
969
970
970
u2 exception_table_length=read_u2 ();
971
+ method.exception_table .resize (exception_table_length);
971
972
972
973
for (std::size_t e=0 ; e<exception_table_length; e++)
973
974
{
974
- u2 UNUSED start_pc=read_u2 ();
975
- u2 UNUSED end_pc=read_u2 ();
976
- u2 UNUSED handler_pc=read_u2 ();
977
- u2 UNUSED catch_type=read_u2 ();
975
+ u2 start_pc=read_u2 ();
976
+ u2 end_pc=read_u2 ();
977
+ u2 handler_pc=read_u2 ();
978
+ u2 catch_type=read_u2 ();
979
+ method.exception_table [e].start_pc =start_pc;
980
+ method.exception_table [e].end_pc =end_pc;
981
+ method.exception_table [e].handler_pc =handler_pc;
982
+ if (catch_type!=0 )
983
+ method.exception_table [e].catch_type =
984
+ to_symbol_type (pool_entry (catch_type).expr .type ());
978
985
}
979
986
980
987
u2 attributes_count=read_u2 ();
You can’t perform that action at this time.
0 commit comments