aboutsummaryrefslogtreecommitdiff
path: root/tools/autodebugger.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-11 14:13:00 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-11 14:13:00 -0700
commit951720402911ee4810e81dd840a955213f326a8d (patch)
tree88e01220633e4872e6d99edc7926aa34702f5cd0 /tools/autodebugger.py
parent2c3ff193882ab6355a39e2fa280e88d3ce3858e4 (diff)
autodebugger support for loads
Diffstat (limited to 'tools/autodebugger.py')
-rw-r--r--tools/autodebugger.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/autodebugger.py b/tools/autodebugger.py
index ea9e9045..e4caae32 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<var>[\w_.]+) = load (?P<type>i64|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')