diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-11-08 17:53:18 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-11-09 19:58:42 -0800 |
commit | 3cf55f763ef8c75e8e8c11fca3c3e564668aee52 (patch) | |
tree | 703a5744c4ee1cb807e59ca49df283d52250f613 /tools/debug-debug-scripts | |
parent | a7333d7e59515db8a5f95f43a3b26793505b2aae (diff) | |
download | tmwa-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-x | tools/debug-debug-scripts | 3 |
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) |