codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  JDI popframes method  caid at 06:20 on Thursday, September 01, 2005
 

Hi all

We're implementing a debugger extension that uses the JDI popframes method to pop the most recent method's stack frame of the stack.
The popframes blurb in the JDI specification gives an example

http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdi/com/sun/jdi/ThreadReference.html#popFrames(com.sun.jdi.StackFrame)

where it states that any changes made the integer argument passed into the method will not be restored if the method's stack frame is popped. I understand that. What I DON'T understand, is why this is.

If the method argument "int x" is stored in the leaf method's stack frame, and that stack frame is popped with the popframes method, then surely this method argument would also be popped off the stack too, and original value stored in the caller method would be passed back in when the method is re-invoked? I mean, the int is a primitive, and so is passed-by-value into the method.

Any explanation would be hugely appreciated.

Regards

caid








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Why Use Method?
•  Re: Help with filesystem object & displaying in a table
•  Re: Genetic Algorithm Help
•  Re: How to make an investment calculator
•  Re: line breaks in GUI
•  Re: Graph in Gui...
•  Graph in Gui...
•  Re: Counting zero values in a string
•  Re: Help!


Recent Articles
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net
Creating CSS Buttons


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005