mirror of https://github.com/mchr3k/org.intrace
Fix Entry trace handling for implicit constructors
Update binaries
This commit is contained in:
parent
d75189b61a
commit
e0e948bf68
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -19,7 +19,7 @@ public class TraceExample
|
|||
while(true)
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
InnerTest.foo();
|
||||
InnerTestClass.foo();
|
||||
workMethod("foobar");
|
||||
}
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ public class TraceExample
|
|||
System.setProperty("a",Arrays.toString(intArg));
|
||||
}
|
||||
|
||||
private static class InnerTest
|
||||
private static class InnerTestClass
|
||||
{
|
||||
private static void foo()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import org.intrace.output.AgentHelper;
|
||||
import org.objectweb.asm.Attribute;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Label;
|
||||
|
|
@ -114,13 +113,6 @@ public class InstrumentedClassWriter extends ClassWriter
|
|||
}
|
||||
}
|
||||
|
||||
// MCHR: Need to preserve Synthetic attribute
|
||||
@Override
|
||||
public void visitAttribute(Attribute attr)
|
||||
{
|
||||
super.visitAttribute(attr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initial entry point - generate ENTRY call.
|
||||
*/
|
||||
|
|
@ -287,6 +279,13 @@ public class InstrumentedClassWriter extends ClassWriter
|
|||
|
||||
if (xiOpCode == Opcodes.RETURN)
|
||||
{
|
||||
// Ensure that cTor entry call gets written even if the cTor is
|
||||
// implicit and therefore has only a single line number.
|
||||
if (ctorEntryState == CTorEntryState.SEEN_SPECIAL)
|
||||
{
|
||||
addEntryCalls();
|
||||
ctorEntryState = CTorEntryState.ENTRY_WRITTEN;
|
||||
}
|
||||
generateCallToAgentHelper(InstrumentationType.EXIT, lineNumber);
|
||||
}
|
||||
super.visitInsn(xiOpCode);
|
||||
|
|
|
|||
Loading…
Reference in New Issue