From 951720402911ee4810e81dd840a955213f326a8d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 11 Sep 2011 14:13:00 -0700 Subject: [PATCH] autodebugger support for loads --- tools/autodebugger.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/autodebugger.py b/tools/autodebugger.py index ea9e9045c..e4caae323 100644 --- a/tools/autodebugger.py +++ b/tools/autodebugger.py @@ -152,6 +152,12 @@ for i in range(len(lines)): lines[i] += '\n %%ead.%d = ptrtoint %s %%%s to i32' % (index, m.group('type'), m.group('var')) lines[i] += '\n call void @emscripten_autodebug_i32(i32 %d, i32 %%ead.%d)' % (index, index) lines_added += 2 + continue + m = re.match(' %(?P[\w_.]+) = load (?Pi64|i32|i16|i8|float|double+)\* .*.*', lines[i]) + if m: + index = i+1+lines_added + lines[i] += '\n call void @emscripten_autodebug_%s(i32 %d, %s %%%s)' % (m.group('type'), index, m.group('type'), m.group('var')) + lines_added += 1 f = open(ofilename, 'w') f.write('\n'.join(lines) + '\n' + POSTAMBLE + '\n')