Re: Setting breakpoint on the end of the method in Eclipse



There IS something at the closing brace of a method that can complete
normally. The JVM does not magically intuit the need to pop a stack
frame and jump to the caller's code. It executes a return instruction.
I suspected so, but I really don't know how JVM works.

The fact that Eclipse does implement break on method exit proves that it
can do so. The issue is not one of executable program structure or
virtual machine capability, but of user interface.
Although this is probably not true for the end of the while loops. As
far as I recall, they are implemented something as:

1. condition check
2. if failed jump to the first instruction after the body of the loop
(i.e. 5)
3. body of the loop
4. jump to beginning of the loop (i.e. 1)
5. first instruction after the body of the loop

Again, I don't know if this is true for JVM. If, however, true, this
would probably involve adding some code if implemented for all loop
levels (i.e. with possibility to stop on fall through any of the
loops). Although, as I said, this is probably not implemented in other
IDEs.

.



Relevant Pages

  • Re: Loop continue
    ... It has a very specific meaning - jump to ... the end of the loop and follow the instruction there. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: programming language
    ... you will find the source code to my bf interpreter. ... instruction_pointer is the index of the instruction currently being executed in the instruction array. ... execute() is where the action happens. ... executegets a pointer to a bf_vm, where it executes one instruction, increments the instruction pointer of the bf_vm so that it points to the next instruction (or does a loop), and returns. ...
    (comp.programming)
  • Re: How much does it take to execute MMX instruction?
    ... a unrolled loop with lots of nop's in the ... This way we have accurate enough instruction timings. ... Pentium M, in general, has latency one clock cycle less, than Pentium ...
    (comp.lang.asm.x86)
  • Re: Jump Take offs
    ... I am excited to hear about your progress on the loop. ... Ask your coach if you are making the mohawk curve too deeply before ... I do the flip from a 3-turn, and it's helped a lot to think of a fairly ... clobber the jump. ...
    (rec.sport.skating.ice.recreational)
  • Re: Loop non-jump
    ... Replying to my own post after last night's lesson in which coach didn't ... let me off the hook and we drilled the loop for a long time. ... to get the jump going. ... brain, and my arms, shoulders and head pay no attention either...so we ...
    (rec.sport.skating.ice.recreational)