summaryrefslogtreecommitdiffstats
path: root/lib
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
commita74a6b5fdf35f011ca38e219e3728ca74fc5ea04 (patch)
treeccb581644cb91e888a75a81dbf74db62320292a7 /lib
parentaa7420b35b43ad266b19dfc8fee4a1af29069c52 (diff)
downloadexternal_llvm-a74a6b5fdf35f011ca38e219e3728ca74fc5ea04.zip
external_llvm-a74a6b5fdf35f011ca38e219e3728ca74fc5ea04.tar.gz
external_llvm-a74a6b5fdf35f011ca38e219e3728ca74fc5ea04.tar.bz2
Fix problem next'ing over an external method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 1d7ec7a..9d07d2d 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/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();