Loading...
Searching...
No Matches
java_bytecode_instrument.cpp File Reference
+ Include dependency graph for java_bytecode_instrument.cpp:
Go to the source code of this file.
Instruments the code attached to symbol with runtime exceptions or corresponding assertions.
Instruments the start function with an assertion that checks whether an exception has escaped the entry point.
Instruments all the code in the symbol_table with runtime exceptions or corresponding assertions.
Function Documentation
◆ java_bytecode_instrument()
Instruments all the code in the symbol_table with runtime exceptions or corresponding assertions.
Exceptions are thrown when the throw_runtime_exceptions flag is set. Otherwise, assertions are emitted.
- Parameters
-
symbol_table global symbol table, all of whose code members will be annotated (may gain exception type stubs and similar)
throw_runtime_exceptions flag determining whether we instrument the code with runtime exceptions or with assertions. The former applies if this flag is set to true.
message_handler stream to report status and warnings
Definition at line 594 of file java_bytecode_instrument.cpp.
◆ java_bytecode_instrument_symbol()
Instruments the code attached to symbol with runtime exceptions or corresponding assertions.
Exceptions are thrown when the throw_runtime_exceptions flag is set. Otherwise, assertions are emitted.
- Parameters
-
symbol_table global symbol table (may gain exception type stubs and similar)
symbol the symbol to instrument
throw_runtime_exceptions flag determining whether we instrument the code with runtime exceptions or with assertions. The former applies if this flag is set to true.
message_handler stream to report status and warnings
Definition at line 544 of file java_bytecode_instrument.cpp.
◆ java_bytecode_instrument_uncaught_exceptions()
void java_bytecode_instrument_uncaught_exceptions
(
code_blockt &
init_code,
)
Instruments the start function with an assertion that checks whether an exception has escaped the entry point.
- Parameters
-
init_code the code block to which the assertion is appended
exc_symbol the top-level exception symbol
source_location the source location to attach to the assertion
Definition at line 567 of file java_bytecode_instrument.cpp.
Variable Documentation
◆ exception_needed_classes
const std::vector<std::string> exception_needed_classes
Initial value:= {
"java.lang.ArithmeticException",
"java.lang.ArrayIndexOutOfBoundsException",
"java.lang.ClassCastException",
"java.lang.NegativeArraySizeException",
"java.lang.NullPointerException"}
Definition at line 77 of file java_bytecode_instrument.cpp.