812649 wrote:Debug info isn't in the spec.
I agree, attribute_info seems like the logical place/means to store strata information. In fact, more specifically, the LineNumberTable attribute seems like it ought to have a facility for mapping a line number to a stratum, but I haven't seen anything like that in the spec.
I'm wondering if there is some auxilliary documentation I should refer to for this kind of thing.Doubt it. It is intended to allow for unknown usage. One can't spec unknown usage.
812649 wrote:Yes and no. I don't think that used to be in there.
Are we talking about the same spec? The LineNumberTable attribute sounds like debug info to me, and it's defined at 4.7.8 of the JVM spec.
In any case, for the stratum parameter of of Location.lineNumber (defined in the JDI section of the JDK docs) to be useful, the stratum for a line number has to be recorded somewhere such that Location.lineNumber can recognize and access it.Given that my response above was a guess, and you thought it sounded likely just get a real class file reader and look to see what values are in the attribute section. If it is there, either as some odd variation of the debug stuff, or another type of attribute then problem solved. If not there then the reader should help to determine where it actually is.
I really need is example java source code with embedded strata information.I suspect that doesn't exist. If it does I would like to see it as well.
A class file reader might be helpful if I had an example class file which actually contained strata informationTry Groovy and/or AspectJ. There are other variants as well but you should only pick those that have a following and which are up to date.