aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-06 18:12:13 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-06 18:12:13 -0800
commit2494c26ae0294de160a51c8347e1bbe4a438918e (patch)
tree76df0c3d4afd54080a3116f2bc0999142e648352
parent94bbef9dc1edd65d78888924afa2a4a861611081 (diff)
add function exits to autodebugger
-rw-r--r--tools/autodebugger.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/autodebugger.py b/tools/autodebugger.py
index 123a0d20..65ddc641 100644
--- a/tools/autodebugger.py
+++ b/tools/autodebugger.py
@@ -218,6 +218,10 @@ for i in range(len(lines)):
in_func = False
index = i+1+lines_added
pre = ' call void @emscripten_autodebug_i32(i32 -1, i32 %d)' % index
+ elif lines[i].startswith(' ret '):
+ # This is a good place to mark entry to this function
+ index = i+1+lines_added
+ pre = ' call void @emscripten_autodebug_i32(i32 -2, i32 %d)' % index
m = re.match(' store (?P<type>i64|i32|i16|i8|float|double|%?[\w\.\*]+) (?P<var>%?[\w.+_]+), .*', lines[i])
if m: