From 571bf69fbc3bdfc82d2fa86391deb0d3b3b67560 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 7 Sep 2019 10:14:35 -0700 Subject: 5635 --- debug_translate | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 debug_translate (limited to 'debug_translate') diff --git a/debug_translate b/debug_translate new file mode 100755 index 00000000..39075aac --- /dev/null +++ b/debug_translate @@ -0,0 +1,26 @@ +#!/bin/sh +# Translate SubX files with debug information. +# +# Mu's core tooling has a gap: +# 1. 'translate' can generate debug information, but syntax sugar passes +# (sigils and calls) have no C++ versions and take several minutes to run +# emulated. +# 2. 'ntranslate' is fast, but you get no trace for runs and zero error-checking +# on the code emitted by sigils and calls. Which could still be buggy. +# +# This script is a hack to get the best of both worlds. We run natively what +# we must, and leverage as much debug information as possible. This arrangement +# is snappy but requires Linux just like 'ntranslate'. You also are on your +# own to mentally map desugared instructions in traces and error messages back +# to the original sources. + +set -e + +echo " calls" +cat $* |apps/calls > a.calls +echo " sigils" +cat a.calls |apps/sigils > a.sigils + +subx --debug translate a.sigils -o a.elf + +chmod +x a.elf -- cgit 1.4.1-2-gfad0 af480e2'>commit diff stats
path: root/ignore.c
blob: d859d4682fca36f0bcda2390bf266e48db353e2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
'#n57'>57
58
59
60
61
62
63
64
65
66
67