classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] [RFA/JDWP] StackFrameCommandSet


From: Bryce McKinlay
Subject: Re: [cp-patches] [RFA/JDWP] StackFrameCommandSet
Date: Tue, 09 Aug 2005 15:54:01 -0400
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Aaron Luchko wrote:

This is the StackFrame command set
http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_StackFrame

I'm not entirely sure what our classpath level Frame object will look
like in the end. For this I just have class with a bunch of getters and
setters now which may turn out to be all we need in classpath.

Another thing is although Frames look like other ids they are not. First
they are not ObjectIds since they don't exist in the users code. Storing
them as an ObjectId would mean they could be garbage collected since no
one else has a reference to them. Furthermore they are not
ReferenceTypeIds since these are held permanently and we want these to
be held only as long as the Thread is suspended. For now we will query
the VM for them directly although in the future it may make sense to
store them in some classpath level Object which represents a suspended
thread.

Yeah, it probably makes sense to cache the stack in a Thread/SuspendedThread object while the thread is suspended.

Note that it should be quite easy for the VM (or JDWP code) to generate FrameIDs without needing a mapping of any kind. Since they only need to remain valid while the thread is suspended, something like "threadID << 4 & frameNum" would work just fine (if threadID is 4 bytes).

ChangeLog
2005-08-04  Aaron Luchko  <address@hidden>
       *gnu/classpath/jdwp/processor/StackFrameCommandSet.java:
       Implemented the StackFrame CommandSet.
OK.

Bryce





reply via email to

[Prev in Thread] Current Thread [Next in Thread]