I'm trying to keep track of String literals (loaded with LDC) in a Method, both in local variables and in the stack. I'm able to do it with a modified version of AnalyzerAdapter:
https://asm.ow2.io/javadoc/org/objectweb/asm/commons/AnalyzerAdapter.html
However my current approach is limited, because I don't know how to properly handle jumps. AnalyzerAdapter clean locals and stacks after GOTO for example and uses stack map tables to recover the values when a new frame is started, but in my case I would need to which are the ones being restored and if any of them are literals.
I understand that what I'm trying to achieve is not easy because it may imply merging values from more than one code branch and act accordingly.
Any ideas?. Thanks in advance.