summaryrefslogtreecommitdiff
path: root/tools/debug-debug-scripts
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-11-08 17:53:18 -0800
committerBen Longbons <b.r.longbons@gmail.com>2014-11-09 19:58:42 -0800
commit3cf55f763ef8c75e8e8c11fca3c3e564668aee52 (patch)
tree703a5744c4ee1cb807e59ca49df283d52250f613 /tools/debug-debug-scripts
parenta7333d7e59515db8a5f95f43a3b26793505b2aae (diff)
downloadtmwa-3cf55f763ef8c75e8e8c11fca3c3e564668aee52.tar.gz
tmwa-3cf55f763ef8c75e8e8c11fca3c3e564668aee52.tar.bz2
tmwa-3cf55f763ef8c75e8e8c11fca3c3e564668aee52.tar.xz
tmwa-3cf55f763ef8c75e8e8c11fca3c3e564668aee52.zip
Make it easier to debug scripts, especially from coredumps
Diffstat (limited to 'tools/debug-debug-scripts')
-rwxr-xr-xtools/debug-debug-scripts3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/debug-debug-scripts b/tools/debug-debug-scripts
index 55bcb85..0ddf998 100755
--- a/tools/debug-debug-scripts
+++ b/tools/debug-debug-scripts
@@ -66,6 +66,7 @@ def get_classes_from_file(a):
def c_quote(s):
s = s.replace('\\', '\\\\')
+ s = s.replace('\n', '\\n')
s = s.replace('"', '\\"')
return '"' + s + '"'
@@ -73,7 +74,7 @@ def gen_test(name, expr, expected, w):
print('static', file=w)
print('void %s()' % name, file=w)
print('{', file=w)
- print(' auto value = %s;' % expr, file=w)
+ print(' auto&& value = %s;' % expr, file=w)
print(' const char *expected = %s;' % c_quote(expected), file=w)
print(' do_breakpoint(value, expected);', file=w)
print('}', file=w)