[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] LocalVariableTable

It does.
public void ajc$before$aspects_aspectj_LogAllToFile$1$8f05cad1(org.aspectj.lang.JoinPoint);
Code:
Stack=3, Locals=2, Args_size=2
0: aload_0
1: ldc #62; //String before
3: aload_1
4: invokevirtual #64; //Method log:(Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V
7: return
LocalVariableTable:
Start Length Slot Name Signature
0 8 0 this Laspects/aspectj/LogAllToFile;
0 8 1 thisJoinPoint Lorg/aspectj/lang/JoinPoint;


Is it possible that the JDWP expects 'this' to be available at code index 0?


-----Original Message----- From: Andy Clement
Sent: Thursday, August 04, 2011 2:04 AM
To: AspectJ developer discussions
Subject: Re: [aspectj-dev] LocalVariableTable


on a cursory look it seems ok, but I see you have other aspects in the
system (that are using cflow) that weave into that advice - turn those
off, does it make your before advice debugging work?

Andy

On 3 August 2011 14:54, Yoav A. <yoav_@xxxxxxxxxxx> wrote:
including the code:
Code:
Stack=4, Locals=6, Args_size=2
0:    getstatic    #215; //Field
ajc$cflowCounter$0:Lorg/aspectj/runtime/internal/CFlowCounter;
3:    invokevirtual    #219; //Method
org/aspectj/runtime/internal/CFlowCounter.inc:()V
6:    aload_0
7:    ldc    #62; //String before
9:    aload_1
10:    getstatic    #215; //Field
ajc$cflowCounter$0:Lorg/aspectj/runtime/internal/CFlowCounter;
13:    invokevirtual    #219; //Method
org/aspectj/runtime/internal/CFlowCounter.inc:()V
16:    invokevirtual    #64; //Method
log:(Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V
19:    goto    31
22:    astore_3
23:    getstatic    #215; //Field
ajc$cflowCounter$0:Lorg/aspectj/runtime/internal/CFlowCounter;
26:    invokevirtual    #224; //Method
org/aspectj/runtime/internal/CFlowCounter.dec:()V
29:    aload_3
30:    athrow
31:    nop
32:    getstatic    #215; //Field
ajc$cflowCounter$0:Lorg/aspectj/runtime/internal/CFlowCounter;
35:    invokevirtual    #224; //Method
org/aspectj/runtime/internal/CFlowCounter.dec:()V
38:    nop
39:    goto    53
42:    astore    5
44:    getstatic    #215; //Field
ajc$cflowCounter$0:Lorg/aspectj/runtime/internal/CFlowCounter;
47:    invokevirtual    #224; //Method
org/aspectj/runtime/internal/CFlowCounter.dec:()V
50:    aload    5
52:    athrow
53:    getstatic    #215; //Field
ajc$cflowCounter$0:Lorg/aspectj/runtime/internal/CFlowCounter;
56:    invokevirtual    #224; //Method
org/aspectj/runtime/internal/CFlowCounter.dec:()V
59:    return
60:    return
Exception table:
from   to  target type
 16    19    22   Class java/lang/Throwable

 6    42    42   Class java/lang/Throwable

LocalVariableTable:
Start  Length  Slot  Name   Signature
6      36      0    this       Laspects/aspectj/LogAllToFile;
6      36      1    thisJoinPoint       Lorg/aspectj/lang/JoinPoint;


-----Original Message----- From: Andy Clement Sent: Thursday, August 04, 2011 12:24 AM To: AspectJ developer discussions Subject: Re: [aspectj-dev] LocalVariableTable

1.6.5 is over 2 years old, I would upgrade.  I can't recall whether
something related to this has been fixed in the intervening time.

I don't know what 'JBE' is, I just use javap.  Attach the 'javap
-verbose -private' output for the advice method and maybe something
will be obvious.  But I would recommend trying with 1.6.11 first.

cheers,
Andy

On 3 August 2011 13:51, Yoav A. <yoav_@xxxxxxxxxxx> wrote:

It looks ok to me when checking with JBE. Is there any other way to check?


This is the code:
before() : everything() && scopeBefore() {
 log("before", thisJoinPoint);
}

in the LocalVariableTable I have two entries:
this and thisJoinpoint both start at pc 6. I there anything else to check?


I am still with AJ 165, was there anything fixed since then in that area?


-----Original Message----- From: Andy Clement Sent: Wednesday, August 03, 2011 10:43 PM To: AspectJ developer discussions Subject: Re: [aspectj-dev] LocalVariableTable

Could be an issue with the local variable table.  Does it look valid
to you? i.e. what is the method that is having trouble, what class is
it in, what does the local variable table look like for that method?

I remember a bug from a while back where some of the methods generated
for around advice had unhelpful local variable table entries but that
was addressed.  You haven't mentioned which AspectJ you are using, I
assume 1.6.11 or later...

If the local variable table looks funky, please raise a bug.

Andy

2011/8/3 Yoav A. <yoav_@xxxxxxxxxxx>:

Hi

I am trying to write code over JDU that attempts to debug AJ code.
At some point when examining a stack frame inside an advice, I am trying
to
get a mirror to the ‘this’ object using StackFrame.thisObject(). I get an
exception:
Exception in thread "active event system driver"
com.sun.jdi.InternalException: Unexpected JDWP Error: 35
at
com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
at com.sun.tools.jdi.StackFrameImpl.thisObject(StackFrameImpl.java:127)


Searching for this message leads to this old bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5005668

could there be such a problem with ajc?



_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev