From 50115dcec018f461fe5321be53b984fc5c3b3083 Mon Sep 17 00:00:00 2001 From: kseitz Date: Thu, 8 Feb 2007 01:55:29 +0000 Subject: * include/java-interp.h (_Jv_Frame::depth): New function. * jvmti.cc (_Jv_JVMTI_GetFrameCount): Use _Jv_Frame::depth. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121709 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/include/java-interp.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libjava/include/java-interp.h') diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index 1370ef1de50..ce2fac273c4 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -1,6 +1,6 @@ // java-interp.h - Header file for the bytecode interpreter. -*- c++ -*- -/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation +/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation This file is part of libgcj. @@ -357,6 +357,16 @@ public: { thread->frame = (gnu::gcj::RawData *) next; } + + int depth () + { + int depth = 0; + struct _Jv_Frame *f; + for (f = this; f != NULL; f = f->next) + ++depth; + + return depth; + } }; // An interpreted frame in the call stack -- cgit v1.2.3