This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[RFA] JDWP implment getFrameCount
- From: Kyle Galloway <kgallowa at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Thu, 01 Feb 2007 10:34:05 -0500
- Subject: [RFA] JDWP implment getFrameCount
- References: <45C1108F.7020008@redhat.com> <45C121CE.80301@redhat.com>
Keith Seitz wrote:
Kyle Galloway wrote:
Comments, questions?
I'm not a maintainer, but since I am quite involved in this code, I
would really, really appreciate it if you could break this into
smaller patches. It just makes it easier (and therefore faster) to
parse. [Hey, I'm getting old! :-)]
[And you need to submit the classpath changes upstream to
classpath-patches@gnu.org first.]
As requested, I have submitted the classpath changes, and once they are
approved will submit the getFrame and getFrames patches in separate
chunks. For now, getFrameCount involves no classpath changes so I have
started with this.
This patch implements the JDWP method getFrameCount from
natVMVirtualMachine.cc. It calls jvmti->GetFrameCount then returns the
result.
Changelog
2007-02-01 Kyle Galloway <kgallowa@redhat.com>
* gnu/classpath/jdwp/natVMVirtualMachine.cc (getFrameCount): Implment.
Comments?
- Kyle
Index: /notnfs/kgallowa/gcc/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
===================================================================
--- /notnfs/kgallowa/gcc/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc (revision 121464)
+++ /notnfs/kgallowa/gcc/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc (working copy)
@@ -369,7 +369,15 @@
gnu::classpath::jdwp::VMVirtualMachine::
getFrameCount (MAYBE_UNUSED Thread *thread)
{
- return 0;
+ jint frame_count;
+ jthread thr = reinterpret_cast<jthread> (thread);
+
+ jvmtiError jerr = _jdwp_jvmtiEnv->GetFrameCount (thr, &frame_count);
+
+ if (jerr != JVMTI_ERROR_NONE)
+ throw_jvmti_error (jerr);
+
+ return frame_count;
}
jint