0

I need to log all run-time access to any variable or object My current direction is to markup the classfile with modified bytecode Performance is not currently an issue

BCEL looks nice to add some trace instructions to each relevant opcode in the bytecode

However, i would also like to add some semantic information from the source file e.g. this variable is a for-loop counter This would require some AST / parsing tree manipulation.

So are ASM / JavaAssist better choices ???

Logging the variable-usage is the key requirement - so bytecode looks like the right level to handle this. But eventually i will have to access the source parse tree to get more semantic information

Any thoughts ?

p.s. this will be a large prolonged project

Sparafusile
  • 4,696
  • 7
  • 34
  • 57
Y A
  • 1
  • 1

1 Answers1

0

Look into JavaSnoop (https://www.aspectsecurity.com/research/appsec_tools/javasnoop/). It will help you monitor function calls.

tr4nc3
  • 631
  • 5
  • 12