This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] JDWP implment getFrameCount


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]