From 2494c26ae0294de160a51c8347e1bbe4a438918e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 6 Feb 2012 18:12:13 -0800 Subject: add function exits to autodebugger --- tools/autodebugger.py | 4 ++++ 1 file changed, 4 insertions(+) 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 (?Pi64|i32|i16|i8|float|double|%?[\w\.\*]+) (?P%?[\w.+_]+), .*', lines[i]) if m: -- cgit v1.2.3-18-g5258