summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-29 14:08:33 +0000
committerChris Lattner <sabre@nondot.org>2001-10-29 14:08:33 +0000
commit689049e1cdef49cad844e1ff5bfe34ab80df69e9 (patch)
treedb28664081e6cbded4b17ef4e9989836394e3f5d /llvm/lib/ExecutionEngine/Interpreter
parentc6503e8a2f22f240e9a99d0650fa2572471eaffa (diff)
downloadbcm5719-llvm-689049e1cdef49cad844e1ff5bfe34ab80df69e9.tar.gz
bcm5719-llvm-689049e1cdef49cad844e1ff5bfe34ab80df69e9.zip
Fix problem next'ing over an external method
llvm-svn: 1027
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index 1d7ec7aa8ee..9d07d2dd1a7 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -894,6 +894,7 @@ void Interpreter::nextInstruction() { // Do the 'next' command
// If this is a call instruction, step over the call instruction...
// TODO: ICALL, CALL WITH, ...
if ((*ECStack.back().CurInst)->getOpcode() == Instruction::Call) {
+ unsigned StackSize = ECStack.size();
// Step into the function...
if (executeInstruction()) {
// Hit a breakpoint, print current instruction, then return to user...
@@ -902,8 +903,11 @@ void Interpreter::nextInstruction() { // Do the 'next' command
return;
}
- // Finish executing the function...
- finish();
+ // If we we able to step into the function, finish it now. We might not be
+ // able the step into a function, if it's external for example.
+ if (ECStack.size() != StackSize)
+ finish(); // Finish executing the function...
+
} else {
// Normal instruction, just step...
stepInstruction();
OpenPOWER on IntegriCloud