The Artima Developer Community
Sponsored Link

Java Answers Forum
Get value at the top of the stack....

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sandip Chitale

Posts: 1
Nickname: sandip
Registered: Jun, 2003

Get value at the top of the stack.... Posted: Jun 9, 2003 2:50 PM
Reply to this message Reply
Advertisement
Many times I am at a line of code in debugger like so:

public in getFoo() {
-> return getBar();
}

after having just stepped out of the getBar() method.
There is no way to look at the return value. Now, I know that the return value is on top of the stack, but how to
inspect it.

Other solution is to change the code to:

public in getFoo() {
int bar = getBar();
return bar;
}

Which is what I have found myself doing.

Some debuggers let me evaluate the getBar() method again, however it may cause some side effect that I do not want to happen.

I was wondering is anyone has implemented a solution
using Java assembly code (using Jasmine assembler for example) such that evaluating that static method
gives me the value on top of the operand stack of callers
frame. Do I have to resort to JPDA/JVMDI to achieve what I want?

Topic: Trying to learn this stuff Previous Topic   Next Topic Topic: What is Rich Client?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use