mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-09-22 17:20:05 +00:00
Compare commits
943
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f792da5d31 | ||
|
|
1344270b5a | ||
|
|
c03844fb1a | ||
|
|
d04e86c007 | ||
|
|
669574df5a | ||
|
|
3aa4b2ea03 | ||
|
|
2f5e55d52f | ||
|
|
14ad67d59a | ||
|
|
b2bdb893a0 | ||
|
|
98dfedfff5 | ||
|
|
1f633a029c | ||
|
|
b3d6b2913e | ||
|
|
53c624a27c | ||
|
|
1865c33704 | ||
|
|
e17a089564 | ||
|
|
eb9212b6f7 | ||
|
|
0ac090cab2 | ||
|
|
7827e1b1c7 | ||
|
|
36f3924160 | ||
|
|
00dd4ad6ec | ||
|
|
7f7f7f2873 | ||
|
|
c8a5fc4806 | ||
|
|
652dcafbbf | ||
|
|
72f987533c | ||
|
|
5fd835c4d4 | ||
|
|
c50d9276ba | ||
|
|
1214cb0968 | ||
|
|
3099759c0b | ||
|
|
95d31f5608 | ||
|
|
687323fc2e | ||
|
|
51dce36ede | ||
|
|
b61f4d550f | ||
|
|
d8d8762869 | ||
|
|
d2db4542cb | ||
|
|
7adf08cc7b | ||
|
|
a202999655 | ||
|
|
ae3a43c694 | ||
|
|
2f7434cd92 | ||
|
|
b02c67bfa6 | ||
|
|
992be37801 | ||
|
|
4727a01b9f | ||
|
|
e376ad8113 | ||
|
|
23ad094a68 | ||
|
|
2b407b5861 | ||
|
|
79390f4a95 | ||
|
|
aedfb556be | ||
|
|
78039c86a0 | ||
|
|
186e8cbabe | ||
|
|
5ec0a0e406 | ||
|
|
9c016004c2 | ||
|
|
9c1f8ef37b | ||
|
|
938af75efb | ||
|
|
38173a7154 | ||
|
|
74ee3b9850 | ||
|
|
2edb65b5bd | ||
|
|
9e6aa8506f | ||
|
|
648fa7cdab | ||
|
|
6612f4a32d | ||
|
|
e65bc121ed | ||
|
|
e1575f815c | ||
|
|
0b50d8718e | ||
|
|
4671458e8e | ||
|
|
bb86072dfa | ||
|
|
d5988d0066 | ||
|
|
932df7bf68 | ||
|
|
0cf553e39a | ||
|
|
1bcd66329f | ||
|
|
c3e2e2e91b | ||
|
|
c34d7e2062 | ||
|
|
b1d6ebf77b | ||
|
|
9535652cfb | ||
|
|
3ae1d8e401 | ||
|
|
7e98df22d7 | ||
|
|
65b5176468 | ||
|
|
e61dfd793a | ||
|
|
97abec11a2 | ||
|
|
b223a61cad | ||
|
|
94fb5056c2 | ||
|
|
88dced7d2a | ||
|
|
e92543d3f8 | ||
|
|
078cbf6afd | ||
|
|
3d34a26205 | ||
|
|
cc2848feb9 | ||
|
|
5c861d5a10 | ||
|
|
78e99d4094 | ||
|
|
18f72dd5ea | ||
|
|
eadd49072a | ||
|
|
1bf01c790b | ||
|
|
6fcdce4e0f | ||
|
|
6a297113c5 | ||
|
|
9169c14e24 | ||
|
|
e2722e45c8 | ||
|
|
59abb3750d | ||
|
|
4f33162d8c | ||
|
|
d87704c91f | ||
|
|
89f47df0e2 | ||
|
|
68fa006e53 | ||
|
|
a365d23acf | ||
|
|
1c269286df | ||
|
|
8a1dd578a7 | ||
|
|
adb8d5237c | ||
|
|
000970758a | ||
|
|
ba0e4ea0c5 | ||
|
|
b45462c740 | ||
|
|
ff589d2e55 | ||
|
|
2a44f1df60 | ||
|
|
165170ba2b | ||
|
|
9aefc68177 | ||
|
|
3f88b83fdb | ||
|
|
7724c7f7d3 | ||
|
|
e86190a3d3 | ||
|
|
fc1c00c8f5 | ||
|
|
193d6726c6 | ||
|
|
ab9804860c | ||
|
|
4091f5e0c0 | ||
|
|
4757c4dafd | ||
|
|
f44c94c3ca | ||
|
|
b9f931a749 | ||
|
|
79b2bcf37a | ||
|
|
01eb655d19 | ||
|
|
51b8dbaab0 | ||
|
|
578d8d64a0 | ||
|
|
546c817d34 | ||
|
|
2bf5c9c9a4 | ||
|
|
f6502f476b | ||
|
|
0d50157239 | ||
|
|
ba5f2021f6 | ||
|
|
8336aa71ad | ||
|
|
903995f85e | ||
|
|
0c6912ed78 | ||
|
|
5933708bdb | ||
|
|
9c5d9caa32 | ||
|
|
848b26bbd9 | ||
|
|
0359998a8b | ||
|
|
883f1ee1cb | ||
|
|
07c781a4f6 | ||
|
|
ac19591df6 | ||
|
|
564b8ea753 | ||
|
|
73555a2486 | ||
|
|
1758292074 | ||
|
|
d0e0e35fb5 | ||
|
|
8e5ebc2d75 | ||
|
|
bd87c109b5 | ||
|
|
b960935315 | ||
|
|
dc32a9eb01 | ||
|
|
8d0267395a | ||
|
|
05045c8db0 | ||
|
|
aea1999af0 | ||
|
|
6bcc316b42 | ||
|
|
8cdf264f4d | ||
|
|
91aedd5888 | ||
|
|
870df1191b | ||
|
|
8708b27bff | ||
|
|
c6b44f6afa | ||
|
|
6be9c71ea9 | ||
|
|
3720634a62 | ||
|
|
534a727b7c | ||
|
|
32ce2e110b | ||
|
|
58114b72f4 | ||
|
|
54bb225704 | ||
|
|
3f19c45dd3 | ||
|
|
cf46ce7712 | ||
|
|
23ed5c8f5f | ||
|
|
c7ce08fd71 | ||
|
|
7114a20e66 | ||
|
|
95dd544871 | ||
|
|
084ef67583 | ||
|
|
71cdc0eab8 | ||
|
|
fa46a52600 | ||
|
|
a2f1be3aa9 | ||
|
|
9ed5134843 | ||
|
|
232f955786 | ||
|
|
6a1c36b212 | ||
|
|
71ff183dc4 | ||
|
|
8b8acf64d6 | ||
|
|
487c7c9938 | ||
|
|
d978f56250 | ||
|
|
5f32b0710e | ||
|
|
911f9ef97b | ||
|
|
685cb4a3b8 | ||
|
|
dae0d602f9 | ||
|
|
ac5c65ebdd | ||
|
|
04815b4265 | ||
|
|
152cc709ce | ||
|
|
57d01355a1 | ||
|
|
fcedcab57c | ||
|
|
3fb8b83324 | ||
|
|
5d76b58acd | ||
|
|
2e13b221ac | ||
|
|
64e5d60f38 | ||
|
|
ce72af8b59 | ||
|
|
086ca98181 | ||
|
|
fe59fab3da | ||
|
|
52b2cbc17a | ||
|
|
7362f8ef60 | ||
|
|
cab01431be | ||
|
|
771883c56c | ||
|
|
b6b188b67b | ||
|
|
ecaa2c55c0 | ||
|
|
45226e8a81 | ||
|
|
0073b2b045 | ||
|
|
3d781f847e | ||
|
|
4b7e6d7113 | ||
|
|
3fa98eb0e7 | ||
|
|
60f65d30e2 | ||
|
|
007efe29eb | ||
|
|
bbac451de4 | ||
|
|
73c37b4d8b | ||
|
|
2fdfeec467 | ||
|
|
d314a12698 | ||
|
|
07f978ac41 | ||
|
|
338fabd9d0 | ||
|
|
715bd36965 | ||
|
|
198246eb52 | ||
|
|
e705907ec0 | ||
|
|
2fb0eb0eb1 | ||
|
|
48b10411bc | ||
|
|
d6f6ec83da | ||
|
|
df2bc62563 | ||
|
|
f2ecb3d898 | ||
|
|
a1ceb5fa3b | ||
|
|
a87c032305 | ||
|
|
9c3d2cd5ab | ||
|
|
c976154284 | ||
|
|
fcfd446c5e | ||
|
|
d2c9fdcf0b | ||
|
|
2f9121171c | ||
|
|
fbfaf1c747 | ||
|
|
64f763162f | ||
|
|
629ddec458 | ||
|
|
5690a9e19b | ||
|
|
508d11c8d8 | ||
|
|
bfe6f655be | ||
|
|
f728614e0b | ||
|
|
ebaad35813 | ||
|
|
8babd89f47 | ||
|
|
066f5f6cf2 | ||
|
|
c98db01b63 | ||
|
|
a1debd9219 | ||
|
|
432e70caf6 | ||
|
|
bbd86449d8 | ||
|
|
454764b9f6 | ||
|
|
05ec402a8e | ||
|
|
df4d18aa5c | ||
|
|
cc61df0c7b | ||
|
|
7bec50db75 | ||
|
|
0e993c5e7a | ||
|
|
16ba8a98cf | ||
|
|
1e8413797a | ||
|
|
ca8fdd1d6e | ||
|
|
714c736530 | ||
|
|
7c41fc11e0 | ||
|
|
546e6e695f | ||
|
|
7e5759ed03 | ||
|
|
9ae3b2eb92 | ||
|
|
85a07be1ac | ||
|
|
3de6331a8e | ||
|
|
487637aaaa | ||
|
|
e825c0f5b5 | ||
|
|
5dd89f350d | ||
|
|
4d41c32586 | ||
|
|
a368d04e3b | ||
|
|
ca9ee9a658 | ||
|
|
8ce7626099 | ||
|
|
d66703a044 | ||
|
|
fa64116048 | ||
|
|
cff6222863 | ||
|
|
515724f264 | ||
|
|
a7ca8dd0a0 | ||
|
|
35659a4525 | ||
|
|
4b382777e9 | ||
|
|
3cf27169b6 | ||
|
|
ba647a0b1d | ||
|
|
2f86e289a4 | ||
|
|
9899efe93c | ||
|
|
84f685803d | ||
|
|
c00fede4f1 | ||
|
|
adc9e0e512 | ||
|
|
17d062934e | ||
|
|
e8c8df9c6e | ||
|
|
23a5c9eb44 | ||
|
|
3c262fccf3 | ||
|
|
114ebfa27b | ||
|
|
7a1811fb71 | ||
|
|
f396a88bac | ||
|
|
4b526db0dd | ||
|
|
8ffc9f4a9b | ||
|
|
48ae9b6973 | ||
|
|
793ad8fe1e | ||
|
|
7cd1d175de | ||
|
|
306f8d84c5 | ||
|
|
573bad8487 | ||
|
|
9b66a9c60e | ||
|
|
96b5f82964 | ||
|
|
6b758f08fa | ||
|
|
7fb711b07c | ||
|
|
c8a892ad8f | ||
|
|
f9c541ea7b | ||
|
|
2dfa3dae42 | ||
|
|
f13806b19f | ||
|
|
71cb03f3be | ||
|
|
3641c212b2 | ||
|
|
638140ab87 | ||
|
|
65ed1f0997 | ||
|
|
472e73137d | ||
|
|
2f299e087a | ||
|
|
c8efacf707 | ||
|
|
deef05d0d2 | ||
|
|
26fb91d539 | ||
|
|
f59694fcfb | ||
|
|
f4726eee0a | ||
|
|
cc2b5138b0 | ||
|
|
e7b4912e4a | ||
|
|
af5825c89a | ||
|
|
be6458690f | ||
|
|
e6872cb71e | ||
|
|
20aba085cd | ||
|
|
299ea04539 | ||
|
|
bb50e88141 | ||
|
|
e989da4087 | ||
|
|
d3bf9cbb53 | ||
|
|
d35bc56f8f | ||
|
|
9e7ce6a6c7 | ||
|
|
09db3aacd0 | ||
|
|
6534bff5d0 | ||
|
|
baaa853c7f | ||
|
|
8831781af4 | ||
|
|
dfe0c17b89 | ||
|
|
6cf0c7ee92 | ||
|
|
fee500578a | ||
|
|
43b83b56f1 | ||
|
|
9b95e60894 | ||
|
|
2272b4a14c | ||
|
|
6b172396f5 | ||
|
|
2cc81baffa | ||
|
|
a204018e94 | ||
|
|
3ed8f4af98 | ||
|
|
5ffab0439b | ||
|
|
cccbd265ff | ||
|
|
6180da1b0f | ||
|
|
30766f93ae | ||
|
|
3631de648b | ||
|
|
5ad8d523ba | ||
|
|
f8fd32e328 | ||
|
|
9968c6e491 | ||
|
|
c8c9c7ea27 | ||
|
|
06a685221a | ||
|
|
6b02c8a7d6 | ||
|
|
06f65857db | ||
|
|
6ead03ac17 | ||
|
|
98840c73d8 | ||
|
|
45d3702c5b | ||
|
|
2696c96f75 | ||
|
|
7645d00392 | ||
|
|
7004994b25 | ||
|
|
8770a43678 | ||
|
|
533fd0041f | ||
|
|
2ceff4293f | ||
|
|
13f2de6e88 | ||
|
|
ecf9cd1dab | ||
|
|
b0d10d457e | ||
|
|
e1806d2d61 | ||
|
|
facf0dafe6 | ||
|
|
37f771ae9b | ||
|
|
84bc078e9f | ||
|
|
df777a4c07 | ||
|
|
e81fbe4bf2 | ||
|
|
9932a30ef9 | ||
|
|
df6150c811 | ||
|
|
719c453bfc | ||
|
|
0f4d2cfbc1 | ||
|
|
bb553b4ec0 | ||
|
|
9bba4f224c | ||
|
|
5907783a2e | ||
|
|
4944652331 | ||
|
|
e9304b5eff | ||
|
|
61a264e20c | ||
|
|
4439aab721 | ||
|
|
1c62787758 | ||
|
|
269abf661f | ||
|
|
e3dc29d7ae | ||
|
|
cb25e261e4 | ||
|
|
818c5a9160 | ||
|
|
c60809f02b | ||
|
|
ca4b602b28 | ||
|
|
83542d4010 | ||
|
|
01236ca3b9 | ||
|
|
31810bb221 | ||
|
|
22c4336375 | ||
|
|
5ff9e47f8a | ||
|
|
d956f7a266 | ||
|
|
0c2502c89f | ||
|
|
be93968c8d | ||
|
|
32ac4f10bb | ||
|
|
59360f770c | ||
|
|
32fcc6d34c | ||
|
|
645db07493 | ||
|
|
4b75145ec0 | ||
|
|
e59e014b2b | ||
|
|
08652e8b0a | ||
|
|
511e81b188 | ||
|
|
90273e7a2e | ||
|
|
cf7b664ab2 | ||
|
|
accc77e03e | ||
|
|
5b29f0db47 | ||
|
|
a97c8bd070 | ||
|
|
6a8c110b83 | ||
|
|
c97c351508 | ||
|
|
567aea2b15 | ||
|
|
895c4dd199 | ||
|
|
3691b59af3 | ||
|
|
ec16f59a1e | ||
|
|
c16e21db71 | ||
|
|
1de57557b5 | ||
|
|
aed18eb71c | ||
|
|
14f617db85 | ||
|
|
74471e4b8d | ||
|
|
43eac9f332 | ||
|
|
729a4aa1f9 | ||
|
|
e395ef42a1 | ||
|
|
8ae8e2f943 | ||
|
|
ff922fa087 | ||
|
|
47462f4789 | ||
|
|
341f9c6cf7 | ||
|
|
b7cc2e8d93 | ||
|
|
acd7435553 | ||
|
|
a7cf64d5e2 | ||
|
|
1848acd47e | ||
|
|
1ec62b40ae | ||
|
|
70fa90bb87 | ||
|
|
c77d61fb4c | ||
|
|
4611ddb536 | ||
|
|
156a94b286 | ||
|
|
b5b6f61811 | ||
|
|
67a719f2c6 | ||
|
|
c896d05afc | ||
|
|
b44a5db97f | ||
|
|
408b689245 | ||
|
|
639239d758 | ||
|
|
be2daf570a | ||
|
|
9f593f9971 | ||
|
|
04b38eb405 | ||
|
|
2d1adaf932 | ||
|
|
d749a5e965 | ||
|
|
25f30f6a72 | ||
|
|
6bdaf9b4df | ||
|
|
82fcc9ed4d | ||
|
|
01cf3d39f1 | ||
|
|
8b5be64507 | ||
|
|
20bde07c46 | ||
|
|
b98a75e056 | ||
|
|
59c01a73af | ||
|
|
a0d91862a7 | ||
|
|
ed75b253f7 | ||
|
|
857bf44001 | ||
|
|
94791e62ff | ||
|
|
52f4474cc8 | ||
|
|
4a2aaf650a | ||
|
|
bb9e5057d7 | ||
|
|
33fe9ba485 | ||
|
|
a9f4a11c0a | ||
|
|
afdb0e5b2e | ||
|
|
728120690d | ||
|
|
918895c091 | ||
|
|
eac1672c4e | ||
|
|
07c4e6ee87 | ||
|
|
c64d207d4d | ||
|
|
a1605acb7b | ||
|
|
0eff5aca06 | ||
|
|
6d30455e76 | ||
|
|
057d4d485e | ||
|
|
86f45ce5e7 | ||
|
|
77edf0d8da | ||
|
|
e506d8389c | ||
|
|
a541ca50d9 | ||
|
|
eda3d6f8b5 | ||
|
|
896f84369b | ||
|
|
18237a1464 | ||
|
|
6563cb9e2c | ||
|
|
6a886e096e | ||
|
|
607442b92a | ||
|
|
fee31daa55 | ||
|
|
44fb75228a | ||
|
|
ba095129e6 | ||
|
|
a4978e75a3 | ||
|
|
5a682e5888 | ||
|
|
c1cea82ae7 | ||
|
|
e951d788ed | ||
|
|
615a05e423 | ||
|
|
24d398e3c0 | ||
|
|
26f75fe7c1 | ||
|
|
784a77bdff | ||
|
|
ebaf83172f | ||
|
|
3e6b8a3c66 | ||
|
|
ba45dd161d | ||
|
|
d2c363ada2 | ||
|
|
87b9b833d1 | ||
|
|
ff90223dcb | ||
|
|
3a61a0363b | ||
|
|
6bef60b306 | ||
|
|
23da2f8901 | ||
|
|
361be3f6e8 | ||
|
|
f7dd96a5d1 | ||
|
|
333d9d9eb3 | ||
|
|
e80dc54aa7 | ||
|
|
78d07b8d80 | ||
|
|
e637ffa523 | ||
|
|
b18e437337 | ||
|
|
c13833f74f | ||
|
|
1d87c34dca | ||
|
|
1f89d4de9e | ||
|
|
b555655f3a | ||
|
|
e48baf9666 | ||
|
|
ccf8504dd1 | ||
|
|
926b5e3546 | ||
|
|
e0b67f0ecb | ||
|
|
72c940d2b3 | ||
|
|
e18e136f82 | ||
|
|
ce7c8d5244 | ||
|
|
14759e49e9 | ||
|
|
d143fec0d1 | ||
|
|
4835264059 | ||
|
|
ec9c68f55e | ||
|
|
de131b0c18 | ||
|
|
fdd6c20c78 | ||
|
|
d5338c05f2 | ||
|
|
d0d9327236 | ||
|
|
d82b54597f | ||
|
|
90065e535f | ||
|
|
b3f69f30ad | ||
|
|
3cc51038df | ||
|
|
1b74fb0760 | ||
|
|
6447a2a993 | ||
|
|
2539e2ef45 | ||
|
|
45656194f4 | ||
|
|
3bb8dc9089 | ||
|
|
ebbf927fc1 | ||
|
|
044e78bea2 | ||
|
|
d78afc5000 | ||
|
|
aed9a285f5 | ||
|
|
f03d0fb974 | ||
|
|
80690d7b20 | ||
|
|
843749c8ae | ||
|
|
38090b6273 | ||
|
|
b0259b7a49 | ||
|
|
f7b97b302f | ||
|
|
f2a7103461 | ||
|
|
d1c0bf5fe2 | ||
|
|
8ca67ff892 | ||
|
|
13aa41910e | ||
|
|
c05ceedfcb | ||
|
|
5e093a9b4c | ||
|
|
08bc2b0a79 | ||
|
|
4ebc38d9f9 | ||
|
|
5e2c6b5107 | ||
|
|
7584890edd | ||
|
|
4bbf64de7e | ||
|
|
e10bef9d2b | ||
|
|
1229a50c68 | ||
|
|
6e2353d302 | ||
|
|
3d272a598b | ||
|
|
dbdf6e7c02 | ||
|
|
0904de74de | ||
|
|
e3077cf6f5 | ||
|
|
9ad52d25b5 | ||
|
|
c2ddffd424 | ||
|
|
7d351d03c5 | ||
|
|
2e12b1485a | ||
|
|
653eb08d43 | ||
|
|
9be3c2affc | ||
|
|
6fa8af5e1a | ||
|
|
010d5609c6 | ||
|
|
d12c5ec2e8 | ||
|
|
c10ac170a8 | ||
|
|
7a185f9560 | ||
|
|
0d581694e6 | ||
|
|
b4b8f5f0ab | ||
|
|
15d42027e7 | ||
|
|
883aa2d1de | ||
|
|
586b3e3072 | ||
|
|
2588bbcd12 | ||
|
|
0a5cc5df6f | ||
|
|
ff32449ba2 | ||
|
|
614954b7ef | ||
|
|
31c671e3f5 | ||
|
|
6d75d6b63b | ||
|
|
4d2b524400 | ||
|
|
16863b1f5a | ||
|
|
f9abb397f3 | ||
|
|
db5a7d4be2 | ||
|
|
6ac870dac0 | ||
|
|
5f23820f9d | ||
|
|
fc77844452 | ||
|
|
3b27abd5c7 | ||
|
|
ce1f54a931 | ||
|
|
c60d3aab22 | ||
|
|
b76c605eba | ||
|
|
6eef8c3e16 | ||
|
|
b5b5aca691 | ||
|
|
435877824a | ||
|
|
3327d73373 | ||
|
|
376a7c48a5 | ||
|
|
f6eec680bc | ||
|
|
41fd224956 | ||
|
|
c794d896c9 | ||
|
|
1a8b39ad9d | ||
|
|
a8891b3ca4 | ||
|
|
ada1b8dfe2 | ||
|
|
9461e79268 | ||
|
|
4fc5b61676 | ||
|
|
6cc1dfb39a | ||
|
|
d44f098e84 | ||
|
|
749821dd27 | ||
|
|
6ad94978ce | ||
|
|
bc5d0b1888 | ||
|
|
3c2c98b08a | ||
|
|
31d7be8f8a | ||
|
|
0b3e3228d1 | ||
|
|
794f212501 | ||
|
|
723c7c5d4d | ||
|
|
fb9824dc24 | ||
|
|
933b4c90de | ||
|
|
5349838633 | ||
|
|
f655758060 | ||
|
|
fa4d0bc262 | ||
|
|
3c39a88abf | ||
|
|
fb6689a74d | ||
|
|
a5e29f65f6 | ||
|
|
b6f50cc4be | ||
|
|
b47b22bdce | ||
|
|
41e99bd2f6 | ||
|
|
2c7d15de59 | ||
|
|
bf2d5640fa | ||
|
|
1880eca295 | ||
|
|
59a20a5574 | ||
|
|
852ff5f054 | ||
|
|
ac3d7be4de | ||
|
|
07b56a920c | ||
|
|
1cc829512f | ||
|
|
dafbe32e85 | ||
|
|
2419a00b11 | ||
|
|
6e9b2bd107 | ||
|
|
123232ab32 | ||
|
|
1dbc37fe1f | ||
|
|
4c10967cec | ||
|
|
e543abd478 | ||
|
|
3b94fa55fb | ||
|
|
3b6d8cb761 | ||
|
|
a73cde2864 | ||
|
|
fe12f2fdf9 | ||
|
|
c80555c49d | ||
|
|
a3f411ddd4 | ||
|
|
084cabad39 | ||
|
|
64d7bae845 | ||
|
|
93d5bab41c | ||
|
|
772bc37504 | ||
|
|
2ff0abb91e | ||
|
|
b05cfa4b24 | ||
|
|
379885421e | ||
|
|
809a888ce7 | ||
|
|
9dadd3ed3c | ||
|
|
d0d1e7d7e6 | ||
|
|
10ead2f999 | ||
|
|
550e8a0451 | ||
|
|
7495096e05 | ||
|
|
7e85335f3b | ||
|
|
3ad6197b88 | ||
|
|
81b45f1a2f | ||
|
|
44868c0e85 | ||
|
|
f7ce1b73bc | ||
|
|
a4a0452d0c | ||
|
|
45090de3fb | ||
|
|
6824ffddc0 | ||
|
|
dc34cdb59a | ||
|
|
98290ff29b | ||
|
|
5a24649a31 | ||
|
|
97a96cfdd4 | ||
|
|
e25c3044b0 | ||
|
|
af80e1bfc8 | ||
|
|
6488e2d5e2 | ||
|
|
649932cce0 | ||
|
|
dd5cc89483 | ||
|
|
8a6837c553 | ||
|
|
a009473557 | ||
|
|
c18c02a37e | ||
|
|
c61f820aef | ||
|
|
5c8c1a89e3 | ||
|
|
61630f4cf9 | ||
|
|
21b439e7e5 | ||
|
|
4888f90f7f | ||
|
|
6f92fe971a | ||
|
|
cfd2380caa | ||
|
|
07d56ee27c | ||
|
|
334bd3b06f | ||
|
|
a14a2f34f5 | ||
|
|
9dcb5a209a | ||
|
|
300b14ffb4 | ||
|
|
8c63478d9b | ||
|
|
8f03fb0cc5 | ||
|
|
b48fcea28a | ||
|
|
431884dce8 | ||
|
|
d931aed462 | ||
|
|
2c4c9e9d75 | ||
|
|
11978904e1 | ||
|
|
8d99f4859b | ||
|
|
6e84c078a8 | ||
|
|
14034c8bea | ||
|
|
0a88e08dee | ||
|
|
c04a97f991 | ||
|
|
0b35224cf8 | ||
|
|
3f50169fee | ||
|
|
ebd5cf9e47 | ||
|
|
f7e67a80c9 | ||
|
|
063975693d | ||
|
|
44fbbc24ee | ||
|
|
fcb839b788 | ||
|
|
139d00e660 | ||
|
|
41afe1af64 | ||
|
|
3927d333ae | ||
|
|
8438faca06 | ||
|
|
061abb4545 | ||
|
|
011c980646 | ||
|
|
26626c3946 | ||
|
|
281849b4e8 | ||
|
|
d3f7bef2b7 | ||
|
|
ab5259a3d3 | ||
|
|
57da328c2a | ||
|
|
ebc19ded62 | ||
|
|
aff3da8256 | ||
|
|
c1764cee07 | ||
|
|
cc58703185 | ||
|
|
6a57555882 | ||
|
|
cdf0b67354 | ||
|
|
45f69b6f98 | ||
|
|
47df50b6dc | ||
|
|
f50b54cff7 | ||
|
|
8492693df2 | ||
|
|
652a9b5cee | ||
|
|
7f87f89aa8 | ||
|
|
92b3356526 | ||
|
|
98486f0795 | ||
|
|
729a5a9392 | ||
|
|
ffa802f583 | ||
|
|
b192e38d12 | ||
|
|
3c0831ec09 | ||
|
|
02e1b8cf00 | ||
|
|
448baf68a8 | ||
|
|
82c1badcdc | ||
|
|
01a21af955 | ||
|
|
a8b02f9791 | ||
|
|
2c9a6f996d | ||
|
|
d66bbdc6a7 | ||
|
|
de56231f4a | ||
|
|
35c1c463c8 | ||
|
|
59e71eb5cc | ||
|
|
d3adfdeced | ||
|
|
ed8731c093 | ||
|
|
6d4b4b1526 | ||
|
|
9fbcd1ec36 | ||
|
|
da54fd1217 | ||
|
|
34bba95839 | ||
|
|
89fd718a8c | ||
|
|
89c8f84498 | ||
|
|
c426818364 | ||
|
|
62fa397e29 | ||
|
|
0e179f3844 | ||
|
|
f808e8ae29 | ||
|
|
8f446d1f9a | ||
|
|
e073ff3218 | ||
|
|
2512d07c72 | ||
|
|
f65cf5436e | ||
|
|
5778e75d66 | ||
|
|
08750c2318 | ||
|
|
9a5a3b9296 | ||
|
|
cab8bdaf38 | ||
|
|
afb7aba039 | ||
|
|
0750570081 | ||
|
|
86a9934016 | ||
|
|
f14686c6fb | ||
|
|
e80008cb7e | ||
|
|
68d3f17ecb | ||
|
|
e541fce2bc | ||
|
|
6a32c197fa | ||
|
|
eea3c6b53c | ||
|
|
d2f9bdeefb | ||
|
|
c767f03f32 | ||
|
|
db737941d8 | ||
|
|
8319850666 | ||
|
|
d04ee598b2 | ||
|
|
15f5894c60 | ||
|
|
05c751a61a | ||
|
|
dd7cce2c3a | ||
|
|
b1e1752229 | ||
|
|
bddc9c97d9 | ||
|
|
325474fc49 | ||
|
|
50d401e4ce | ||
|
|
1dbbd351d7 | ||
|
|
1161c4adbb | ||
|
|
320a307e90 | ||
|
|
f835158071 | ||
|
|
f214b7d5f2 | ||
|
|
d716159faf | ||
|
|
5074b7f62e | ||
|
|
fd982d38fc | ||
|
|
7e0611e7f1 | ||
|
|
fd7085b690 | ||
|
|
5f76fcfb6b | ||
|
|
9e778b30b6 | ||
|
|
15a1f81545 | ||
|
|
f7ad44a0d7 | ||
|
|
9349ac9e72 | ||
|
|
489ae56223 | ||
|
|
35b97d9c20 | ||
|
|
bafc2170ca | ||
|
|
6837d8d71a | ||
|
|
35c599dea3 | ||
|
|
dc5dda3f71 | ||
|
|
fdfee37228 | ||
|
|
ece414c575 | ||
|
|
f431ac7f80 | ||
|
|
e850f6fc93 | ||
|
|
68a9802357 | ||
|
|
905d04ab0b | ||
|
|
bc40d1c0b0 | ||
|
|
f26b4c3b06 | ||
|
|
68a92e910a | ||
|
|
1621dc0637 | ||
|
|
21fcfd28a4 | ||
|
|
4a3d439c44 | ||
|
|
30f8e1675e | ||
|
|
c17072053b | ||
|
|
a5e2235fc6 | ||
|
|
0160d05e8a | ||
|
|
7a4e939886 | ||
|
|
b33559b081 | ||
|
|
b74db17375 | ||
|
|
a019115b95 | ||
|
|
b9ac104276 | ||
|
|
6e41bdf11b | ||
|
|
49eb834e2b | ||
|
|
fd6befecc3 | ||
|
|
5342fab86b | ||
|
|
9919ac59bb | ||
|
|
2d1fcd7475 | ||
|
|
393fb9e5f2 | ||
|
|
301cf6b7ac | ||
|
|
578a56d231 | ||
|
|
33ab26dfb3 | ||
|
|
8901dd30ec | ||
|
|
e1a5d131c8 | ||
|
|
55c1674ec6 | ||
|
|
364a2160af | ||
|
|
56afe8ca60 | ||
|
|
6e039430a5 | ||
|
|
f1af166fd4 | ||
|
|
03844d81d2 | ||
|
|
aa73e62240 | ||
|
|
16de33245c | ||
|
|
f8b688096a | ||
|
|
4dd1f6f579 | ||
|
|
58b8ed8974 | ||
|
|
ac9a908464 | ||
|
|
5d459d9b7a | ||
|
|
3085482e34 | ||
|
|
6c200a59cd | ||
|
|
362bcbcda5 | ||
|
|
897949d33a | ||
|
|
70479e0399 | ||
|
|
90fc289ef0 | ||
|
|
7c0f92ab3d | ||
|
|
036d94fff0 | ||
|
|
37dd5cea2d | ||
|
|
05f2cde2ee | ||
|
|
e59d71893b | ||
|
|
e41eb9430f | ||
|
|
58192b8356 | ||
|
|
38e38eaf3b | ||
|
|
9f89735b01 | ||
|
|
4cb0073909 | ||
|
|
6fb8db4d3d | ||
|
|
123276a1c6 | ||
|
|
6e8753f1e1 | ||
|
|
dda0e012bf | ||
|
|
6660446bdd | ||
|
|
ef175baae4 | ||
|
|
f45ea18f24 | ||
|
|
4aeb6d7d03 | ||
|
|
ed0ec4b34d | ||
|
|
2e971f9e39 | ||
|
|
d65c263266 | ||
|
|
cd9437534c | ||
|
|
3b2656675e | ||
|
|
b4dab84235 | ||
|
|
2fc34ffb3d | ||
|
|
d419c6e15c | ||
|
|
15a2e708a0 | ||
|
|
5a84fe4949 | ||
|
|
9177299488 | ||
|
|
b6eb13761f | ||
|
|
67eede7513 | ||
|
|
f4ea9e66b0 | ||
|
|
0dbde584bd | ||
|
|
579e3e9637 | ||
|
|
425626a275 | ||
|
|
5b87c2b64a | ||
|
|
879e649d0e | ||
|
|
15e9dec60a | ||
|
|
ec13092a35 | ||
|
|
757cd9b9d2 | ||
|
|
856c59a949 | ||
|
|
62d1c6b130 | ||
|
|
b995909997 | ||
|
|
a954317500 | ||
|
|
b307d3bbed | ||
|
|
8890284f97 | ||
|
|
b41e762393 | ||
|
|
72e8ae6e30 | ||
|
|
9f4aade2e1 | ||
|
|
27fef06b6c | ||
|
|
572fad1f03 | ||
|
|
c31847f785 | ||
|
|
9719688bb3 | ||
|
|
a6bed27dff | ||
|
|
b7a14aa41c | ||
|
|
56bc399fd5 | ||
|
|
d560f8c734 | ||
|
|
36b50981ff | ||
|
|
32114c3215 | ||
|
|
a8ece647c1 | ||
|
|
e0879ac569 | ||
|
|
0eb8216ea0 | ||
|
|
cd1a0a4cb5 | ||
|
|
1b95eacd08 | ||
|
|
546c544ae0 | ||
|
|
3ea67dd7cf | ||
|
|
52295e5e06 | ||
|
|
63123d69d1 | ||
|
|
835eae208a | ||
|
|
cfb34ec560 | ||
|
|
c45b12cfac | ||
|
|
7c0ce2ab54 | ||
|
|
693d20ec1a | ||
|
|
a6db711f2d |
@@ -1,30 +1,32 @@
|
|||||||
name: builds
|
name: builds
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows-2022:
|
build-windows-2022:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: build (vs 2022)
|
- name: build (vs 2022)
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||||
call build raddbg msvc debug || exit /b 1
|
call build raddbg msvc debug || exit /b 1
|
||||||
call build raddbgi_from_pdb msvc debug || exit /b 1
|
call build rdi_from_pdb msvc debug || exit /b 1
|
||||||
call build raddbgi_from_dwarf msvc debug || exit /b 1
|
call build rdi_from_dwarf msvc debug || exit /b 1
|
||||||
call build raddbgi_dump msvc debug || exit /b 1
|
call build rdi_dump msvc debug || exit /b 1
|
||||||
call build raddbg clang debug || exit /b 1
|
call build raddbg clang debug || exit /b 1
|
||||||
call build raddbgi_from_pdb clang debug || exit /b 1
|
call build rdi_from_pdb clang debug || exit /b 1
|
||||||
call build raddbgi_from_dwarf clang debug || exit /b 1
|
call build rdi_from_dwarf clang debug || exit /b 1
|
||||||
call build raddbgi_dump clang debug || exit /b 1
|
call build rdi_dump clang debug || exit /b 1
|
||||||
|
call build radlink msvc debug || exit /b 1
|
||||||
|
call build radlink clang debug || exit /b 1
|
||||||
+3
-3
@@ -1,3 +1,3 @@
|
|||||||
/build/
|
/build/
|
||||||
/local/
|
/local/
|
||||||
*~
|
*~
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
Copyright (c) 2024 Epic Games Tools
|
Copyright (c) 2024 Epic Games Tools
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the “Software”), to deal in
|
this software and associated documentation files (the “Software”), to deal in
|
||||||
the Software without restriction, including without limitation the rights to
|
the Software without restriction, including without limitation the rights to
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
so, subject to the following conditions:
|
so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|||||||
@@ -1,348 +1,392 @@
|
|||||||
# The RAD Debugger Project
|
# The RAD Debugger Project
|
||||||
|
|
||||||
_**Note:** This README does not document usage instructions and tips for the
|
_**Note:** This README does not document usage instructions and tips for the
|
||||||
debugger itself, and is intended as a technical overview of the project. The
|
debugger itself, and is intended as a technical overview of the project. The
|
||||||
debugger's README, which includes usage instructions and tips, can be found
|
debugger's README, which includes usage instructions and tips, can be found
|
||||||
packaged along with debugger releases, or within the `build` folder after a
|
packaged along with debugger releases, or within the `build` folder after a
|
||||||
local copy has been built._
|
local copy has been built._
|
||||||
|
|
||||||
The RAD Debugger is a native, user-mode, multi-process, graphical debugger. It
|
The RAD Debugger is a native, user-mode, multi-process, graphical debugger. It
|
||||||
currently only supports local-machine Windows x64 debugging with PDBs, with
|
currently only supports local-machine Windows x64 debugging with PDBs, with
|
||||||
plans to expand and port in the future. In the future we'll expand to also
|
plans to expand and port in the future. In the future we'll expand to also
|
||||||
support native Linux debugging and DWARF debug info.
|
support native Linux debugging and DWARF debug info.
|
||||||
|
|
||||||
The RAD Debugger is currently in *ALPHA*. In order to get the debugger bullet-
|
The RAD Debugger is currently in *ALPHA*. In order to get the debugger bullet-
|
||||||
proof, it'd greatly help out if you submitted the issues you find here, along
|
proof, it'd greatly help out if you submitted the issues you find here, along
|
||||||
with any information you can gather, like dump files (along with the build you
|
with any information you can gather, like dump files (along with the build you
|
||||||
used), instructions to reproduce, test executables, and so on.
|
used), instructions to reproduce, test executables, and so on.
|
||||||
|
|
||||||
You can download pre-built binaries for the debugger
|
You can download pre-built binaries for the debugger
|
||||||
[here](https://github.com/EpicGames/raddebugger/releases).
|
[here](https://github.com/EpicGamesExt/raddebugger/releases).
|
||||||
|
|
||||||
The RAD Debugger project aims to simplify the debugger by simplifying and
|
The RAD Debugger project aims to simplify the debugger by simplifying and
|
||||||
unifying the underlying debug info format. In that pursuit we've built
|
unifying the underlying debug info format. In that pursuit we've built the RAD
|
||||||
the RADDBGI debug info format, which is what the debugger parses and uses. To
|
Debug Info (RDI) format, which is what the debugger parses and uses. To work
|
||||||
work with existing toolchains, we convert PDB (and eventually PE/ELF files
|
with existing toolchains, we convert PDB (and eventually PE/ELF files with
|
||||||
with embedded DWARF) into the RADDBGI format on-demand. This conversion process
|
embedded DWARF) into the RDI format on-demand.
|
||||||
is currently an unoptimized reference version. Nevertheless it's still quite
|
|
||||||
fast for smaller PDB files (in many cases faster than many other programs
|
The RDI format is currently specified in code, in the files within the
|
||||||
simply deserialize the PDBs). It is much slower for much larger projects at the
|
`src/lib_rdi_format` folder. The other relevant folders for working with the
|
||||||
moment, but we expect this will vastly improve overtime.
|
format are:
|
||||||
|
|
||||||
The RADDBGI format is currently specified in code, in the files within the
|
- `lib_rdi_make`: The "RAD Debug Info Make" library, for making RDI debug info.
|
||||||
`src/lib_raddbgi_format` folder. The other relevant folders for working with
|
- `rdi_from_pdb`: Our PDB-to-RDI converter. Can be used as a helper codebase
|
||||||
the format are:
|
layer, or built as an executable with a command line interface frontend.
|
||||||
|
- `rdi_from_dwarf`: Our in-progress DWARF-to-RDI converter.
|
||||||
- `lib_raddbgi_make`: The "RAD Debug Info Make" library, for making RADDBGI
|
- `rdi_dump`: Our RDI textual dumping utility.
|
||||||
debug info.
|
|
||||||
- `raddbgi_from_pdb`: Our PDB-to-RADDBGI converter. Can be used as a helper
|
## Development Setup Instructions
|
||||||
codebase layer, or built as an executable with a command line interface
|
|
||||||
frontend.
|
**Note: Currently, only x64 Windows development is supported.**
|
||||||
- `raddbgi_from_dwarf`: Our in-progress DWARF-to-RADDBGI converter.
|
|
||||||
- `raddbgi_dump`: Our RADDBGI textual dumping utility.
|
### 1. Installing the Required Tools (MSVC & Windows SDK)
|
||||||
|
|
||||||
## Development Setup Instructions
|
In order to work with the codebase, you'll need the [Microsoft C/C++ Build Tools
|
||||||
|
v15 (2017) or later](https://aka.ms/vs/17/release/vs_BuildTools.exe), for both
|
||||||
**Note: Currently, only x64 Windows development is supported.**
|
the Windows SDK and the MSVC compiler and linker.
|
||||||
|
|
||||||
### 1. Installing the Required Tools (MSVC & Windows SDK)
|
If the Windows SDK is installed (e.g. via installation of the Microsoft C/C++
|
||||||
|
Build Tools), you may also build with [Clang](https://releases.llvm.org/).
|
||||||
In order to work with the codebase, you'll need the [Microsoft C/C++ Build Tools
|
|
||||||
v15 (2017) or later](https://aka.ms/vs/17/release/vs_BuildTools.exe), for both
|
### 2. Build Environment Setup
|
||||||
the Windows SDK and the MSVC compiler and linker.
|
|
||||||
|
Building the codebase can be done in a terminal which is equipped with the
|
||||||
If the Windows SDK is installed (e.g. via installation of the Microsoft C/C++
|
ability to call either MSVC or Clang from command line.
|
||||||
Build Tools), you may also build with [Clang](https://releases.llvm.org/).
|
|
||||||
|
This is generally done by calling `vcvarsall.bat x64`, which is included in the
|
||||||
### 2. Build Environment Setup
|
Microsoft C/C++ Build Tools. This script is automatically called by the `x64
|
||||||
|
Native Tools Command Prompt for VS <year>` variant of the vanilla `cmd.exe`. If
|
||||||
Building the codebase can be done in a terminal which is equipped with the
|
you've installed the build tools, this command prompt may be easily located by
|
||||||
ability to call either MSVC or Clang from command line.
|
searching for `Native` from the Windows Start Menu search.
|
||||||
|
|
||||||
This is generally done by calling `vcvarsall.bat x64`, which is included in the
|
You can ensure that the MSVC compiler is accessible from your command line by
|
||||||
Microsoft C/C++ Build Tools. This script is automatically called by the `x64
|
running:
|
||||||
Native Tools Command Prompt for VS <year>` variant of the vanilla `cmd.exe`. If
|
|
||||||
you've installed the build tools, this command prompt may be easily located by
|
```
|
||||||
searching for `Native` from the Windows Start Menu search.
|
cl
|
||||||
|
```
|
||||||
You can ensure that the MSVC compiler is accessible from your command line by
|
|
||||||
running:
|
If everything is set up correctly, you should have output very similar to the
|
||||||
|
following:
|
||||||
```
|
|
||||||
cl
|
```
|
||||||
```
|
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30151 for x64
|
||||||
|
Copyright (C) Microsoft Corporation. All rights reserved.
|
||||||
If everything is set up correctly, you should have output very similar to the
|
|
||||||
following:
|
usage: cl [ option... ] filename... [ /link linkoption... ]
|
||||||
|
```
|
||||||
```
|
|
||||||
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30151 for x64
|
### 3. Building
|
||||||
Copyright (C) Microsoft Corporation. All rights reserved.
|
|
||||||
|
Within this terminal, `cd` to the root directory of the codebase, and just run
|
||||||
usage: cl [ option... ] filename... [ /link linkoption... ]
|
the `build.bat` script:
|
||||||
```
|
|
||||||
|
```
|
||||||
### 3. Building
|
build
|
||||||
|
```
|
||||||
Within this terminal, `cd` to the root directory of the codebase, and just run
|
|
||||||
the `build.bat` script:
|
You should see the following output:
|
||||||
|
|
||||||
```
|
```
|
||||||
build
|
[debug mode]
|
||||||
```
|
[msvc compile]
|
||||||
|
metagen_main.c
|
||||||
You should see the following output:
|
searching C:\devel\raddebugger/src... 309 files found
|
||||||
|
parsing metadesk... 15 metadesk files parsed
|
||||||
```
|
gathering tables... 96 tables found
|
||||||
[debug mode]
|
generating layer code...
|
||||||
[msvc compile]
|
raddbg_main.c
|
||||||
[default mode, assuming `raddbg` build]
|
```
|
||||||
metagen_main.c
|
|
||||||
searching C:\devel\raddebugger/src... 299 files found
|
If everything worked correctly, there will be a `build` folder in the root
|
||||||
parsing metadesk... 12 metadesk files parsed
|
level of the codebase, and it will contain a freshly-built `raddbg.exe`.
|
||||||
gathering tables... 37 tables found
|
|
||||||
generating layer code...
|
## Short-To-Medium-Term Roadmap
|
||||||
raddbg.cpp
|
|
||||||
```
|
### The Initial Alpha Battle-Testing Phase
|
||||||
|
|
||||||
If everything worked correctly, there will be a `build` folder in the root
|
The first priority for the project is to ensure that the most crucial debugger
|
||||||
level of the codebase, and it will contain a freshly-built `raddbg.exe`.
|
components are functioning extremely reliably for local, x64, Windows
|
||||||
|
debugging. This would include parts like debug info conversion, debug info
|
||||||
## Short-To-Medium-Term Roadmap
|
loading, process control, stepping, evaluation (correct usage of both location
|
||||||
|
info and type info), and a robust frontend which ensures the lower level parts
|
||||||
### The Initial Alpha Battle-Testing Phase
|
are usable.
|
||||||
|
|
||||||
The first priority for the project is to ensure that the most crucial debugger
|
We feel that the debugger has already come a long way in all of these respects,
|
||||||
components are functioning extremely reliably for local, x64, Windows
|
but given the massive set of possible combinations of languages, build
|
||||||
debugging. This would include parts like debug info conversion, debug info
|
settings, toolchains, used language features, and patterns of generated code,
|
||||||
loading, process control, stepping, evaluation (correct usage of both location
|
there are still cases where the debugger has not been tested, and so there are
|
||||||
info and type info), and a robust frontend which ensures the lower level parts
|
still issues. So, we feel that the top priority is eliminating these issues,
|
||||||
are usable.
|
such that the debugging experience is rock solid.
|
||||||
|
|
||||||
We feel that the debugger has already come a long way in all of these respects,
|
### Local x64 Linux Debugging Phase
|
||||||
but given the massive set of possible combinations of languages, build
|
|
||||||
settings, toolchains, used language features, and patterns of generated code,
|
The next priority for the project is to take the rock solid x64 Windows
|
||||||
there are still cases where the debugger has not been tested, and so there are
|
debugging experience, and port all of the relevant pieces to support local x64
|
||||||
still issues. So, we feel that the top priority is eliminating these issues,
|
Linux debugging also.
|
||||||
such that the debugging experience is rock solid.
|
|
||||||
|
The debugger has been written to abstract over the parts that need to differ on
|
||||||
Additionally, the debug info conversion process is not fast (nor wide) enough
|
either Linux or Windows, and this is mainly going to be a task in building out
|
||||||
to support extremely large projects. This is for two reasons: (a) the
|
different backends for those abstraction layers.
|
||||||
PDB-to-RADDBGI converter is an unoptimized reference implementation, and (b)
|
|
||||||
the debugger learns of new modules (and thus which PDBs to load) in a
|
The major parts of this phase are:
|
||||||
serially-dependent way (this is necessarily the case for correct debugging
|
|
||||||
results). We expect that the conversion process' performance can be massively
|
- Porting the `src/demon` layer to implement the Demon local process control
|
||||||
improved, and also that some heuristics can be used to begin converting PDBs
|
abstraction API.
|
||||||
to RADDBGIs before the debugger knows those PDBs are needed, thus ensuring the
|
- Implementing an x64 ELF Linux unwinder in the `src/ctrl` layer.
|
||||||
associated RADDBGI files are ready instantaneously when the associated modules
|
- Creating a DWARF-to-RDI converter (in the same way that we've built a
|
||||||
are finally loaded by the debugger. Improving this situation is a major part of
|
PDB-to-RDI converter). A partial implementation of this is in
|
||||||
this phase, as it will make the debugger much more usable for large projects.
|
`src/rdi_from_dwarf`.
|
||||||
|
- Porting the `src/render` layer to implement all of the rendering features the
|
||||||
### Local x64 Linux Debugging Phase
|
frontend needs on a Linux-compatible API (the backend used on Windows is D3D11).
|
||||||
|
- Porting the `src/font_provider` layer to a Linux-compatible font
|
||||||
The next priority for the project is to take the rock solid x64 Windows
|
rasterization backend, like FreeType (the backend used on Windows is
|
||||||
debugging experience, and port all of the relevant pieces to support local x64
|
DirectWrite).
|
||||||
Linux debugging also.
|
- Porting the `src/os` layers to Linux. This includes core operating system
|
||||||
|
abstraction (virtual memory allocation, threading and synchronization
|
||||||
The debugger has been written to abstract over the parts that need to differ on
|
primitives, and so on), and graphical operating system abstraction (windows,
|
||||||
either Linux or Windows, and this is mainly going to be a task in building out
|
input events, and so on).
|
||||||
different backends for those abstraction layers.
|
|
||||||
|
Once the above list is complete, and once every part is rock solid, the Windows
|
||||||
The major parts of this phase are:
|
debugging experience we'll have worked diligently to create will also be
|
||||||
|
available natively on Linux machines.
|
||||||
- Porting the `src/demon` layer to implement the Demon local process control
|
|
||||||
abstraction API.
|
### And Beyond!
|
||||||
- Porting the `src/unwind` layer to support x64 ELF unwinding (currently, there
|
|
||||||
is only an x64 PE unwinding implementation).
|
There are several directions we might take after these two major phases,
|
||||||
- Creating a DWARF-to-RADDBGI converter (in the same way that we've built a
|
like remote debugging, porting to different architectures, further improving
|
||||||
PDB-to-RADDBGI converter). A partial implementation of this is in
|
the debugger's features (like improving the visualization engine), and so on.
|
||||||
`src/raddbgi_from_dwarf`.
|
But for now, we're mostly focused on those first two phases.
|
||||||
- Porting the `src/render` layer to implement all of the rendering features the
|
|
||||||
frontend needs on a Linux-compatible API (the backend used on Windows is D3D11).
|
---
|
||||||
- Porting the `src/font_provider` layer to a Linux-compatible font
|
|
||||||
rasterization backend, like FreeType (the backend used on Windows is
|
# The RAD Linker
|
||||||
DirectWrite).
|
|
||||||
- Porting the `src/os` layers to Linux. This includes core operating system
|
The RAD Linker is a new performance linker for generating x64 PE/COFF binaries. It is designed to be very fast when creating gigantic executables. It generates standard PDB files for debugging, but it can also optionally create RAD Debugger debug info too (useful for huge executables that otherwise create broken PDBs that overflow internal 32-bit tables).
|
||||||
abstraction (virtual memory allocation, threading and synchronization
|
|
||||||
primitives, and so on), and graphical operating system abstraction (windows,
|
The RAD Linker is primarily optimized to handle huge linking projects - in our test cases (where debug info is multiple gigabytes), we see 50% faster link times.
|
||||||
input events, and so on).
|
|
||||||
|
The command line syntax is fully compatible with MSVC and you can get a full list of implemented switches from `/help`.
|
||||||
Once the above list is complete, and once every part is rock solid, the Windows
|
|
||||||
debugging experience we'll have worked diligently to create will also be
|
Our current designed-for use case for the linker is to help with the compile-debug cycle of huge projects. We don't yet have support for dead-code-elimination or link-time-optimizations, but these features are on the road map.
|
||||||
available natively on Linux machines.
|
|
||||||
|
By default, the RAD linker spawns as many threads as there are cores, so if you plan to run multiple linkers in parallel, you can limit the number of thread workers via `/rad_workers`.
|
||||||
### And Beyond!
|
|
||||||
|
We also have support for large memory pages, which, when enabled, reduce link time by
|
||||||
There are several directions we might take after these two major phases,
|
another 25%. To link with large pages, you need to explicitly request them via `/rad_large_pages`. Large pages are off by default, since Windows support for large pages is a bit buggy - we recommend they only be used in Docker or VM images where the environment is reset after each link. In a standard Windows environment, using large pages otherwise will fragment memory quickly forcing a reboot. We are working on a Linux port of the linker that will be able to build with large pages robustly.
|
||||||
like remote debugging, porting to different architectures, further improving
|
|
||||||
the debugger's features (like improving the visualization engine), and so on.
|
## Short Term Roadmap
|
||||||
But for now, we're mostly focused on those first two phases.
|
- Porting linker to Linux (for Windows executables, just running on Linux).
|
||||||
|
- Debug info features
|
||||||
## Top-Level Directory Descriptions
|
- Get DWARF debug info converter up-and-running.
|
||||||
|
- Smooth out rough edges in RADDBGI builder.
|
||||||
- `data`: Small binary files which are used when building, either to embed
|
- Improve build speed further (especially for tiny and mid sizes projects).
|
||||||
within build artifacts, or to package with them.
|
- Other features to come
|
||||||
- `src`: All source code.
|
- Dead-code-elimination via `/opt:ref`.
|
||||||
|
- Link Time Optimizations with the help of clang (we won't support LTCG from MSVC compiler since it is undocumented).
|
||||||
After setting up the codebase and building, the following directories will
|
|
||||||
also exist:
|
## To build the RAD Linker
|
||||||
|
- Setup development environment, [see](#Development-Setup-Instructions)
|
||||||
- `build`: All build artifacts. Not checked in to version control.
|
- Run `build radlink release` or if you have clang installed `build radlink release clang`. We favor latter option for better code generation.
|
||||||
- `local`: Local files, used for local build configuration input files.
|
|
||||||
|
If build was successful linker executable is placed in `build` folder under `radlink.exe`.
|
||||||
## Codebase Introduction
|
|
||||||
|
## Benchmarks
|
||||||
The codebase is organized into *layers*. Layers are separated either to isolate
|
|
||||||
certain problems, and to allow inclusion into various builds without needing to
|

|
||||||
pull everything in the codebase into a build. Layers correspond with folders
|
|
||||||
inside of the `src` directory. Sometimes, one folder inside of the `src`
|
---
|
||||||
directory will include multiple sub-layers, but the structure is intended to be
|
|
||||||
fairly flat.
|
## Top-Level Directory Descriptions
|
||||||
|
|
||||||
Layers correspond roughly 1-to-1 with *namespaces*. The term "namespaces" in
|
- `data`: Small binary files which are used when building, either to embed
|
||||||
this context does not refer to specific namespace language features, but rather
|
within build artifacts, or to package with them.
|
||||||
a naming convention for C-style namespaces, which are written in the codebase as
|
- `src`: All source code.
|
||||||
a short prefix, usually 1-3 characters, followed by an underscore. These
|
|
||||||
namespaces are used such that the layer to which certain code belongs may be
|
After setting up the codebase and building, the following directories will
|
||||||
quickly understood by glancing at code. The namespaces are generally quite short
|
also exist:
|
||||||
to ensure that they aren't much of a hassle to write. Sometimes, multiple sub-
|
|
||||||
layers will share a namespace. A few layers do not have a namespace, but most
|
- `build`: All build artifacts. Not checked in to version control.
|
||||||
do. Namespaces are either all-caps or lowercase depending on the context in
|
- `local`: Local files, used for local build configuration input files. Not
|
||||||
which they're used. For types, enum values, and some macros, they are
|
checked in to version control.
|
||||||
capitalized. For functions and global variables, they are lowercase.
|
|
||||||
|
## Codebase Introduction
|
||||||
Layers depend on other layers, but circular dependencies would break the
|
|
||||||
separability and isolation utility of layers (in effect, forming one big layer),
|
The codebase is organized into *layers*. Layers are separated either to isolate
|
||||||
so in other words, layers are arranged into a directed acyclic graph.
|
certain problems, and to allow inclusion into various builds without needing to
|
||||||
|
pull everything in the codebase into a build. Layers correspond with folders
|
||||||
A few layers are built to be used completely independently from the rest of the
|
inside of the `src` directory. Sometimes, one folder inside of the `src`
|
||||||
codebase, as libraries in other codebases and projects. As such, these layers do
|
directory will include multiple sub-layers, but the structure is intended to be
|
||||||
not depend on any other layers in the codebase. The folders which contain these
|
fairly flat.
|
||||||
layers are prefixed with `lib_`, like `lib_raddbgi_format`.
|
|
||||||
|
Layers correspond roughly 1-to-1 with *namespaces*. The term "namespaces" in
|
||||||
A list of the layers in the codebase and their associated namespaces is below:
|
this context does not refer to specific namespace language features, but rather
|
||||||
- `base` (no namespace): Universal, codebase-wide constructs. Strings, math,
|
a naming convention for C-style namespaces, which are written in the codebase as
|
||||||
memory allocators, helper macros, command-line parsing, and so on. Depends
|
a short prefix, usually 1-3 characters, followed by an underscore. These
|
||||||
on no other codebase layers.
|
namespaces are used such that the layer to which certain code belongs may be
|
||||||
- `codeview` (`CV_`): Code for parsing and/or writing the CodeView format.
|
quickly understood by glancing at code. The namespaces are generally quite short
|
||||||
- `coff` (`COFF_`): Code for parsing and/or writing the COFF (Common Object File
|
to ensure that they aren't much of a hassle to write. Sometimes, multiple sub-
|
||||||
Format) file format.
|
layers will share a namespace. A few layers do not have a namespace, but most
|
||||||
- `ctrl` (`CTRL_`): The debugger's "control system" layer. Implements
|
do. Namespaces are either all-caps or lowercase depending on the context in
|
||||||
asynchronous process control, stepping, and breakpoints for all attached
|
which they're used. For types, enum values, and some macros, they are
|
||||||
processes. Runs in lockstep with attached processes. When it runs, attached
|
capitalized. For functions and global variables, they are lowercase.
|
||||||
processes are halted. When attached processes are running, it is halted.
|
|
||||||
Driven by a debugger frontend on another thread.
|
Layers depend on other layers, but circular dependencies would break the
|
||||||
- `dasm` (`DASM_`): An asynchronous disassembly decoder and cache. Users ask for
|
separability and isolation utility of layers (in effect, forming one big layer),
|
||||||
disassembly for a particular virtual address range in a process, and threads
|
so in other words, layers are arranged into a directed acyclic graph.
|
||||||
implemented in this layer decode and cache the disassembly for that range.
|
|
||||||
- `dbgi` (`DBGI_`): An asynchronous debug info loader and cache. Loads debug
|
A few layers are built to be used completely independently from the rest of the
|
||||||
info stored in the RADDBGI format. Users ask for debug info for a particular
|
codebase, as libraries in other codebases and projects. As such, these layers do
|
||||||
executable, and on separate threads, this layer loads the associated debug
|
not depend on any other layers in the codebase. The folders which contain these
|
||||||
info file. If necessary, it will launch a separate conversion process to
|
layers are prefixed with `lib_`, like `lib_rdi_format`.
|
||||||
convert original debug info into the RADDBGI format.
|
|
||||||
- `demon` (`DEMON_`): An abstraction layer for local-machine, low-level process
|
A list of the layers in the codebase and their associated namespaces is below:
|
||||||
control. The abstraction is used to provide a common interface for process
|
- `base` (no namespace): Universal, codebase-wide constructs. Strings, math,
|
||||||
control on target platforms. Used to implement part of `ctrl`.
|
memory allocators, helper macros, command-line parsing, and so on. Depends
|
||||||
- `df/core` (`DF_`): The debugger's non-graphical frontend. Implements a
|
on no other codebase layers.
|
||||||
debugger "entity cache" (where "entities" include processes, threads, modules,
|
- `codeview` (`CV_`): Code for parsing and/or writing the CodeView format.
|
||||||
breakpoints, source files, targets, and so on). Implements a command loop
|
- `coff` (`COFF_`): Code for parsing and/or writing the COFF (Common Object File
|
||||||
for driving process control, which is used to implement stepping commands and
|
Format) file format.
|
||||||
user breakpoints. Implements extractors and caches for various entity-related
|
- `ctrl` (`CTRL_`): The debugger's "control system" layer. Implements
|
||||||
data, like full thread unwinds and local variable maps. Also implements core
|
asynchronous process control, stepping, and breakpoints for all attached
|
||||||
building blocks for evaluation and evaluation visualization.
|
processes. Runs in lockstep with attached processes. When it runs, attached
|
||||||
- `df/gfx` (`DF_`): The debugger's graphical frontend. Builds on top of
|
processes are halted. When attached processes are running, it is halted.
|
||||||
`df/core` to provide all graphical features, including windows, panels, all
|
Driven by a debugger frontend on another thread.
|
||||||
of the various debugger interfaces, and evaluation visualization.
|
- `dasm_cache` (`DASM_`): An asynchronous disassembly decoder and cache. Users
|
||||||
- `draw` (`D_`): Implements a high-level graphics drawing API for the debugger's
|
ask for disassembly for some data, with a particular architecture, and other
|
||||||
purposes, using the underlying `render` abstraction layer. Provides high-level
|
various parameters, and threads implemented in this layer decode and cache the
|
||||||
APIs for various draw commands, but takes care of batching them, and so on.
|
disassembly for that data with those parameters.
|
||||||
- `eval` (`EVAL_`): Implements a compiler for an expression language built for
|
- `dbgi` (`DI_`): An asynchronous debug info loader and cache. Loads debug info
|
||||||
evaluation of variables, registers, and so on from debugger-attached processes
|
stored in the RDI format. Users ask for debug info for a particular path, and
|
||||||
and/or debug info. Broken into several phases mostly corresponding to
|
on separate threads, this layer loads the associated debug info file. If
|
||||||
traditional compiler phases - lexer, parser, type-checker, IR generation, and
|
necessary, it will launch a separate conversion process to convert original
|
||||||
IR evaluation.
|
debug info into the RDI format.
|
||||||
- `font_cache` (`F_`): Implements a cache of rasterized font data, both in CPU-
|
- `dbg_engine` (`D_`): Implements the core debugger system, without any
|
||||||
side data for text shaping, and in GPU texture atlases for rasterized glyphs.
|
graphical components. This contains top-level logic for things like stepping,
|
||||||
All cache information is sourced from the `font_provider` abstraction layer.
|
launching, freezing threads, mid-run breakpoint addition, some caching layers,
|
||||||
- `font_provider` (`FP_`): An abstraction layer for various font file decoding
|
and so on.
|
||||||
and font rasterization backends.
|
- `demon` (`DMN_`): An abstraction layer for local-machine, low-level process
|
||||||
- `geo_cache` (`GEO_`): Implements an asynchronously-filled cache for GPU
|
control. The abstraction is used to provide a common interface for process
|
||||||
geometry data, filled by data sourced in the `hash_store` layer's cache. Used
|
control on target platforms. Used to implement part of `ctrl`.
|
||||||
for asynchronously preparing data for memory visualization in the debugger.
|
- `draw` (`DR_`): Implements a high-level graphics drawing API for the
|
||||||
- `hash_store` (`HS_`): Implements a cache for general data blobs, keyed by a
|
debugger's purposes, using the underlying `render` abstraction layer. Provides
|
||||||
128-bit hash of the data. Used as a general data store by other layers.
|
high-level APIs for various draw commands, but takes care of batching them,
|
||||||
- `lib_raddbg_markup` (`RADDBG_`): Standalone library for marking up user
|
and so on.
|
||||||
programs to work with various features in the `raddbg` debugger. Does not
|
- `eval` (`E_`): Implements a compiler for an expression language built for
|
||||||
depend on `base`, and can be independently relocated to other codebases.
|
evaluation of variables, registers, types, and more, from debugger-attached
|
||||||
- `lib_raddbgi_make` (`RDIM_`): Standalone library for constructing RADDBGI
|
processes, debug info, debugger state, and files. Broken into several phases
|
||||||
debug info data. Does not depend on `base`, and can be independently relocated
|
mostly corresponding to traditional compiler phases - lexer, parser,
|
||||||
to other codebases.
|
type-checker, IR generation, and IR evaluation.
|
||||||
- `lib_raddbgi_format` (`RDI_`): Standalone library which defines the core
|
- `eval_visualization` (`EV_`): Implements the core non-graphical evaluation
|
||||||
RADDBGI types and helper functions for reading and writing the RADDBGI debug
|
visualization engine, which can be used to visualize evaluations (provided by
|
||||||
info file format. Does not depend on `base`, and can be independently
|
the `eval` layer) in a number of ways. Implements core data structures and
|
||||||
relocated to other codebases.
|
transforms for the `Watch` view.
|
||||||
- `metagen` (`MG_`): A metaprogram which is used to generate primarily code and
|
- `file_stream` (`FS_`): Provides asynchronous file loading, storing the
|
||||||
data tables. Consumes Metadesk files, stored with the extension `.mdesk`, and
|
artifacts inside of the cache implemented by the `hash_store` layer, and
|
||||||
generates C code which is then included by hand-written C code. Currently, it
|
hot-reloading the contents of files when they change. Allows callers to map
|
||||||
does not analyze the codebase's hand-written C code, but in principle this is
|
file paths to data hashes, which can then be used to obtain the file's data.
|
||||||
possible. This allows easier & less-error-prone management of large data
|
- `font_cache` (`FNT_`): Implements a cache of rasterized font data, both in
|
||||||
tables, which are then used to produce e.g. C `enum`s and a number of
|
CPU-side data for text shaping, and in GPU texture atlases for rasterized
|
||||||
associated data tables. There are also a number of other generation features,
|
glyphs. All cache information is sourced from the `font_provider` abstraction
|
||||||
like embedding binary files or complex multi-line strings into source code.
|
layer.
|
||||||
This layer cannot depend on any other layer in the codebase directly,
|
- `font_provider` (`FP_`): An abstraction layer for various font file decoding
|
||||||
including `base`, because it may be used to generate code for those layers. To
|
and font rasterization backends.
|
||||||
still use `base` and `os` layer features in the `metagen` program, a separate,
|
- `fuzzy_search` (`FZY_`): Provides a fuzzy searching engine for doing
|
||||||
duplicate version of `base` and `os` are included in this layer. They are
|
large, asynchronous fuzzy searches. Used by the debugger for implementing
|
||||||
updated manually, as needed. This is to ensure the stability of the
|
things like the symbol lister or the `Procedures` view, which search across
|
||||||
metaprogram.
|
all loaded debug info records, using fuzzy matching rules.
|
||||||
- `msf` (`MSF_`): Code for parsing and/or writing the MSF file format.
|
- `geo_cache` (`GEO_`): Implements an asynchronously-filled cache for GPU
|
||||||
- `mule` (no namespace): Test executables for battle testing debugger
|
geometry data, filled by data sourced in the `hash_store` layer's cache. Used
|
||||||
functionality.
|
for asynchronously preparing data for visualization.
|
||||||
- `natvis` (no namespace): NatVis files for type visualization of the codebase's
|
- `hash_store` (`HS_`): Implements a cache for general data blobs, keyed by a
|
||||||
types in other debuggers.
|
128-bit hash of the data. Also implements a 128-bit key cache on top, where
|
||||||
- `os/core` (`OS_`): An abstraction layer providing core, non-graphical
|
the keys refer to a unique identity, associated with a 128-bit hash, where the
|
||||||
functionality from the operating system under an abstract API, which is
|
hash may change across time. Used as a general data store by other layers.
|
||||||
implemented per-target-operating-system.
|
- `lib_raddbg_markup` (`RADDBG_`): Standalone library for marking up user
|
||||||
- `os/gfx` (`OS_`): An abstraction layer, building on `os/core`, providing
|
programs to work with various features in the debugger. Does not depend on
|
||||||
graphical operating system features under an abstract API, which is
|
`base`, and can be independently relocated to other codebases.
|
||||||
implemented per-target-operating-system.
|
- `lib_rdi_format` (`RDI_`): Standalone library which defines the core RDI types
|
||||||
- `os/socket` (`OS_`): An abstraction layer, building on `os/core`, providing
|
and helper functions for reading and writing the RDI debug info file format.
|
||||||
networking operating system features under an abstract API, which is
|
Does not depend on `base`, and can be independently relocated to other
|
||||||
implemented per-target-operating-system.
|
codebases.
|
||||||
- `pdb` (`PDB_`): Code for parsing and/or writing the PDB file format.
|
- `lib_rdi_make` (`RDIM_`): Standalone library for constructing RDI debug info
|
||||||
- `pe` (`PE_`): Code for parsing and/or writing the PE (Portable Executable)
|
data. Does not depend on `base`, and can be independently relocated
|
||||||
file format.
|
to other codebases.
|
||||||
- `raddbg` (no namespace): The layer which ties everything together for the main
|
- `mdesk` (`MD_`): Code for parsing Metadesk files (stored as `.mdesk`), which
|
||||||
graphical debugger. Not much "meat", just drives `df`, implements command line
|
is the JSON-like (technically a JSON superset) text format used for the
|
||||||
options, and so on.
|
debugger's user and project configuration files, view rules, and metacode,
|
||||||
- `raddbgi_from_pdb` (`P2R_`): Our implementation of PDB-to-RADDBGI conversion.
|
which is parsed and used to generate code with the `metagen` layer.
|
||||||
- `raddbgi_from_dwarf` (`D2R_`): Our in-progress implementation of
|
- `metagen` (`MG_`): A metaprogram which is used to generate primarily code and
|
||||||
DWARF-to-RADDBGI conversion.
|
data tables. Consumes Metadesk files, stored with the extension `.mdesk`, and
|
||||||
- `raddbgi_dump` (`RADDBGIDUMP_`): A dumper utility program for dumping
|
generates C code which is then included by hand-written C code. Currently, it
|
||||||
textualizations of RADDBGI debug info files.
|
does not analyze the codebase's hand-written C code, but in principle this is
|
||||||
- `regs` (`REGS_`): Types, helper functions, and metadata for registers on
|
possible. This allows easier & less-error-prone management of large data
|
||||||
supported architectures. Used in reading/writing registers in `demon`, or in
|
tables, which are then used to produce e.g. C `enum`s and a number of
|
||||||
looking up register metadata.
|
associated data tables. There are also a number of other generation features,
|
||||||
- `render` (`R_`): An abstraction layer providing an abstract API for rendering
|
like embedding binary files or complex multi-line strings into source code.
|
||||||
using various GPU APIs under a common interface. Does not implement a high
|
This layer cannot depend on any other layer in the codebase directly,
|
||||||
level drawing API - this layer is strictly for minimally abstracting on an
|
including `base`, because it may be used to generate code for those layers. To
|
||||||
as-needed basis. Higher level drawing features are implemented in the `draw`
|
still use `base` and `os` layer features in the `metagen` program, a separate,
|
||||||
layer.
|
duplicate version of `base` and `os` are included in this layer. They are
|
||||||
- `scratch` (no namespace): Scratch space for small and transient test or sample
|
updated manually, as needed. This is to ensure the stability of the
|
||||||
programs.
|
metaprogram.
|
||||||
- `texture_cache` (`TEX_`): Implements an asynchronously-filled cache for GPU
|
- `msf` (`MSF_`): Code for parsing and/or writing the MSF file format.
|
||||||
texture data, filled by data sourced in the `hash_store` layer's cache. Used
|
- `mule` (no namespace): Test executables for battle testing debugger
|
||||||
for asynchronously preparing data for memory visualization in the debugger.
|
functionality.
|
||||||
- `txti` (`TXTI_`): Machinery for asynchronously-loaded, asynchronously hot-
|
- `mutable_text` (`MTX_`): Implements an asynchronously-filled-and-mutated
|
||||||
reloaded, asynchronously parsed, and asynchronously mutated source code files.
|
cache for text buffers which are mutated across time. In the debugger, this is
|
||||||
Used by the debugger to visualize source code files. Users ask for text lines,
|
used to implement the `Output` view.
|
||||||
tokens, and metadata, and it is prepared on background threads.
|
- `natvis` (no namespace): NatVis files for type visualization of the codebase's
|
||||||
- `type_graph` (`TG_`): Code for analyzing and navigating type structures from
|
types in other debuggers.
|
||||||
RADDBGI debug info files, with the additional capability of constructing
|
- `os/core` (`OS_`): An abstraction layer providing core, non-graphical
|
||||||
synthetic types *not* found in debug info. Used in `eval` and for various
|
functionality from the operating system under an abstract API, which is
|
||||||
visualization features.
|
implemented per-target-operating-system.
|
||||||
- `ui` (`UI_`): Machinery for building graphical user interfaces. Provides a
|
- `os/gfx` (`OS_`): An abstraction layer, building on `os/core`, providing
|
||||||
core immediate mode hierarchical user interface data structure building
|
graphical operating system features under an abstract API, which is
|
||||||
API, and has helper layers for building some higher-level widgets.
|
implemented per-target-operating-system.
|
||||||
- `unwind` (`UNW_`): Code for generating unwind information from threads, for
|
- `path` (`PATH_`): Small helpers for manipulating file path strings.
|
||||||
supported operating systems and architectures.
|
- `pdb` (`PDB_`): Code for parsing and/or writing the PDB file format.
|
||||||
|
- `pe` (`PE_`): Code for parsing and/or writing the PE (Portable Executable)
|
||||||
|
file format.
|
||||||
|
- `raddbg` (`RD_`): The layer which ties everything together for the main
|
||||||
|
graphical debugger. Implements the debugger's graphical frontend, all of the
|
||||||
|
debugger-specific UI, the debugger executable's command line interface, and
|
||||||
|
all of the built-in visualizers.
|
||||||
|
- `rdi_breakpad_from_pdb` (`P2B_`): Our implementation, using the codebase's RDI
|
||||||
|
technology, for extracting information from PDBs and generating Breakpad text
|
||||||
|
dumps.
|
||||||
|
- `rdi_dump` (no namespace): A dumper utility program for dumping
|
||||||
|
textualizations of RDI debug info files.
|
||||||
|
- `rdi_format` (no namespace): A layer which includes the `lib_rdi_format` layer
|
||||||
|
and bundles it with codebase-specific helpers, to easily include the library
|
||||||
|
in codebase programs, and have it be integrated with codebase constructs.
|
||||||
|
- `rdi_from_dwarf` (`D2R_`): Our in-progress implementation of DWARF-to-RDI
|
||||||
|
conversion.
|
||||||
|
- `rdi_from_pdb` (`P2R_`): Our implementation of PDB-to-RDI conversion.
|
||||||
|
- `rdi_make` (no namespace): A layer which includes the `lib_rdi_make` layer and
|
||||||
|
bundles it with codebase-specific helpers, to easily include the library in
|
||||||
|
codebase programs, and have it be integrated with codebase constructs.
|
||||||
|
- `regs` (`REGS_`): Types, helper functions, and metadata for registers on
|
||||||
|
supported architectures. Used in reading/writing registers in `demon`, or in
|
||||||
|
looking up register metadata.
|
||||||
|
- `render` (`R_`): An abstraction layer providing an abstract API for rendering
|
||||||
|
using various GPU APIs under a common interface. Does not implement a high
|
||||||
|
level drawing API - this layer is strictly for minimally abstracting on an
|
||||||
|
as-needed basis. Higher level drawing features are implemented in the `draw`
|
||||||
|
layer.
|
||||||
|
- `scratch` (no namespace): Scratch space for small and transient test programs.
|
||||||
|
- `task_system` (`TS_`): Implements a system for kicking off asynchronous tasks
|
||||||
|
and obtaining artifacts from those tasks once they've completed.
|
||||||
|
- `texture_cache` (`TEX_`): Implements an asynchronously-filled cache for GPU
|
||||||
|
texture data, filled by data sourced in the `hash_store` layer's cache. Used
|
||||||
|
for asynchronously preparing data for visualization.
|
||||||
|
- `text_cache` (`TXT_`): Implements an asynchronously-filled cache for textual
|
||||||
|
analysis data (tokens, line ranges, and so on), filled by data sourced in the
|
||||||
|
`hash_store` layer's cache. Used for asynchronously preparing data for
|
||||||
|
visualization (like for the source code viewer).
|
||||||
|
- `third_party` (no namespace): External code from other projects, which some
|
||||||
|
layers in the codebase depend on. All external code is included and built
|
||||||
|
directly within the codebase.
|
||||||
|
- `ui` (`UI_`): Machinery for building graphical user interfaces. Provides a
|
||||||
|
core immediate mode hierarchical user interface data structure building
|
||||||
|
API, and has helper layers for building some higher-level widgets.
|
||||||
|
|||||||
@@ -1,119 +1,139 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
cd /D "%~dp0"
|
cd /D "%~dp0"
|
||||||
|
|
||||||
:: --- Usage Notes (2024/1/10) ------------------------------------------------
|
:: --- Usage Notes (2024/1/10) ------------------------------------------------
|
||||||
::
|
::
|
||||||
:: This is a central build script for the RAD Debugger project. It takes a list
|
:: This is a central build script for the RAD Debugger project, for use in
|
||||||
:: of simple alphanumeric-only arguments which control (a) what is built, (b)
|
:: Windows development environments. It takes a list of simple alphanumeric-
|
||||||
:: which compiler & linker are used, and (c) extra high-level build options. By
|
:: only arguments which control (a) what is built, (b) which compiler & linker
|
||||||
:: default, if no options are passed, then the main "raddbg" graphical debugger
|
:: are used, and (c) extra high-level build options. By default, if no options
|
||||||
:: is built.
|
:: are passed, then the main "raddbg" graphical debugger is built.
|
||||||
::
|
::
|
||||||
:: Below is a non-exhaustive list of possible ways to use the script:
|
:: Below is a non-exhaustive list of possible ways to use the script:
|
||||||
:: `build raddbg`
|
:: `build raddbg`
|
||||||
:: `build raddbg clang`
|
:: `build raddbg clang`
|
||||||
:: `build raddbg release`
|
:: `build raddbg release`
|
||||||
:: `build raddbg asan telemetry`
|
:: `build raddbg asan telemetry`
|
||||||
:: `build raddbgi_from_pdb`
|
:: `build rdi_from_pdb`
|
||||||
::
|
::
|
||||||
:: For a full list of possible build targets and their build command lines,
|
:: For a full list of possible build targets and their build command lines,
|
||||||
:: search for @build_targets in this file.
|
:: search for @build_targets in this file.
|
||||||
::
|
::
|
||||||
:: Below is a list of all possible non-target command line options:
|
:: Below is a list of all possible non-target command line options:
|
||||||
::
|
::
|
||||||
:: - `asan`: enable address sanitizer
|
:: - `asan`: enable address sanitizer
|
||||||
:: - `telemetry`: enable RAD telemetry profiling support
|
:: - `telemetry`: enable RAD telemetry profiling support
|
||||||
|
|
||||||
:: --- Unpack Arguments -------------------------------------------------------
|
:: --- Unpack Arguments -------------------------------------------------------
|
||||||
for %%a in (%*) do set "%%a=1"
|
for %%a in (%*) do set "%%a=1"
|
||||||
if not "%msvc%"=="1" if not "%clang%"=="1" set msvc=1
|
if not "%msvc%"=="1" if not "%clang%"=="1" set msvc=1
|
||||||
if not "%release%"=="1" set debug=1
|
if not "%release%"=="1" set debug=1
|
||||||
if "%debug%"=="1" set release=0 && echo [debug mode]
|
if "%debug%"=="1" set release=0 && echo [debug mode]
|
||||||
if "%release%"=="1" set debug=0 && echo [release mode]
|
if "%release%"=="1" set debug=0 && echo [release mode]
|
||||||
if "%msvc%"=="1" set clang=0 && echo [msvc compile]
|
if "%msvc%"=="1" set clang=0 && echo [msvc compile]
|
||||||
if "%clang%"=="1" set msvc=0 && echo [clang compile]
|
if "%clang%"=="1" set msvc=0 && echo [clang compile]
|
||||||
if "%~1"=="" echo [default mode, assuming `raddbg` build] && set raddbg=1
|
if "%~1"=="" echo [default mode, assuming `raddbg` build] && set raddbg=1
|
||||||
|
if "%~1"=="release" if "%~2"=="" echo [default mode, assuming `raddbg` build] && set raddbg=1
|
||||||
:: --- Unpack Command Line Build Arguments ------------------------------------
|
|
||||||
set auto_compile_flags=
|
:: --- Unpack Command Line Build Arguments ------------------------------------
|
||||||
if "%telemetry%"=="1" set auto_compile_flags=%auto_compile_flags% -DPROFILE_TELEMETRY=1 && echo [telemetry profiling enabled]
|
set auto_compile_flags=
|
||||||
if "%asan%"=="1" set auto_compile_flags=%auto_compile_flags% -fsanitize=address && echo [asan enabled]
|
if "%telemetry%"=="1" set auto_compile_flags=%auto_compile_flags% -DPROFILE_TELEMETRY=1 && echo [telemetry profiling enabled]
|
||||||
|
if "%asan%"=="1" set auto_compile_flags=%auto_compile_flags% -fsanitize=address && echo [asan enabled]
|
||||||
:: --- Compile/Link Line Definitions ------------------------------------------
|
|
||||||
set cl_common= /I..\src\ /I..\local\ /nologo /FC /Z7
|
:: --- Compile/Link Line Definitions ------------------------------------------
|
||||||
set clang_common= -I..\src\ -I..\local\ -gcodeview -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-writable-strings -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf
|
set cl_common= /I..\src\ /I..\local\ /nologo /FC /Z7
|
||||||
set cl_debug= call cl /Od /DBUILD_DEBUG=1 %cl_common% %auto_compile_flags%
|
set clang_common= -I..\src\ -I..\local\ -gcodeview -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-writable-strings -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Wno-compare-distinct-pointer-types -Wno-initializer-overrides -Wno-incompatible-pointer-types-discards-qualifiers -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf -ferror-limit=10000
|
||||||
set cl_release= call cl /O2 /DBUILD_DEBUG=0 %cl_common% %auto_compile_flags%
|
set cl_debug= call cl /Od /Ob1 /DBUILD_DEBUG=1 %cl_common% %auto_compile_flags%
|
||||||
set clang_debug= call clang -g -O0 -DBUILD_DEBUG=1 %clang_common% %auto_compile_flags%
|
set cl_release= call cl /O2 /DBUILD_DEBUG=0 %cl_common% %auto_compile_flags%
|
||||||
set clang_release= call clang -g -O2 -DBUILD_DEBUG=0 %clang_common% %auto_compile_flags%
|
set clang_debug= call clang -g -O0 -DBUILD_DEBUG=1 %clang_common% %auto_compile_flags%
|
||||||
set cl_link= /link /MANIFEST:EMBED /INCREMENTAL:NO /natvis:"%~dp0\src\natvis\base.natvis" logo.res
|
set clang_release= call clang -g -O2 -DBUILD_DEBUG=0 %clang_common% %auto_compile_flags%
|
||||||
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker /natvis:"%~dp0\src\natvis\base.natvis" logo.res
|
set cl_link= /link /MANIFEST:EMBED /INCREMENTAL:NO /natvis:"%~dp0\src\natvis\base.natvis" /pdbaltpath:%%%%_PDB%%%%
|
||||||
set cl_out= /out:
|
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker /natvis:"%~dp0\src\natvis\base.natvis" -Xlinker /pdbaltpath:%%%%_PDB%%%%
|
||||||
set clang_out= -o
|
set cl_out= /out:
|
||||||
|
set clang_out= -o
|
||||||
:: --- Per-Build Settings -----------------------------------------------------
|
|
||||||
set link_dll=-DLL
|
:: --- Per-Build Settings -----------------------------------------------------
|
||||||
if "%msvc%"=="1" set only_compile=/c
|
set link_dll=-DLL
|
||||||
if "%clang%"=="1" set only_compile=-c
|
set link_icon=logo.res
|
||||||
if "%msvc%"=="1" set EHsc=/EHsc
|
if "%msvc%"=="1" set only_compile=/c
|
||||||
if "%clang%"=="1" set EHsc=
|
if "%clang%"=="1" set only_compile=-c
|
||||||
if "%msvc%"=="1" set rc=rc.exe
|
if "%msvc%"=="1" set EHsc=/EHsc
|
||||||
if "%clang%"=="1" set rc=llvm-rc.exe
|
if "%clang%"=="1" set EHsc=
|
||||||
|
if "%msvc%"=="1" set no_aslr=/DYNAMICBASE:NO
|
||||||
:: --- Choose Compile/Link Lines ----------------------------------------------
|
if "%clang%"=="1" set no_aslr=-Wl,/DYNAMICBASE:NO
|
||||||
if "%msvc%"=="1" set compile_debug=%cl_debug%
|
if "%msvc%"=="1" set rc=call rc
|
||||||
if "%msvc%"=="1" set compile_release=%cl_release%
|
if "%clang%"=="1" set rc=call llvm-rc
|
||||||
if "%msvc%"=="1" set compile_link=%cl_link%
|
|
||||||
if "%msvc%"=="1" set out=%cl_out%
|
:: --- Choose Compile/Link Lines ----------------------------------------------
|
||||||
if "%clang%"=="1" set compile_debug=%clang_debug%
|
if "%msvc%"=="1" set compile_debug=%cl_debug%
|
||||||
if "%clang%"=="1" set compile_release=%clang_release%
|
if "%msvc%"=="1" set compile_release=%cl_release%
|
||||||
if "%clang%"=="1" set compile_link=%clang_link%
|
if "%msvc%"=="1" set compile_link=%cl_link%
|
||||||
if "%clang%"=="1" set out=%clang_out%
|
if "%msvc%"=="1" set out=%cl_out%
|
||||||
if "%debug%"=="1" set compile=%compile_debug%
|
if "%clang%"=="1" set compile_debug=%clang_debug%
|
||||||
if "%release%"=="1" set compile=%compile_release%
|
if "%clang%"=="1" set compile_release=%clang_release%
|
||||||
|
if "%clang%"=="1" set compile_link=%clang_link%
|
||||||
:: --- Prep Directories -------------------------------------------------------
|
if "%clang%"=="1" set out=%clang_out%
|
||||||
if not exist build mkdir build
|
if "%debug%"=="1" set compile=%compile_debug%
|
||||||
if not exist local mkdir local
|
if "%release%"=="1" set compile=%compile_release%
|
||||||
|
|
||||||
:: --- Produce Logo Icon File -------------------------------------------------
|
:: --- Prep Directories -------------------------------------------------------
|
||||||
pushd build
|
if not exist build mkdir build
|
||||||
%rc% /nologo /fo logo.res ..\data\logo.rc || exit /b 1
|
if not exist local mkdir local
|
||||||
popd
|
|
||||||
|
:: --- Produce Logo Icon File -------------------------------------------------
|
||||||
:: --- Get Current Git Commit Id ----------------------------------------------
|
pushd build
|
||||||
for /f %%i in ('call git describe --always --dirty') do set compile=%compile% -DBUILD_GIT_HASH=\"%%i\"
|
%rc% /nologo /fo logo.res ..\data\logo.rc || exit /b 1
|
||||||
|
popd
|
||||||
:: --- Build & Run Metaprogram ------------------------------------------------
|
|
||||||
if "%no_meta%"=="1" echo [skipping metagen]
|
:: --- Get Current Git Commit Id ----------------------------------------------
|
||||||
if not "%no_meta%"=="1" (
|
for /f %%i in ('call git describe --always --dirty') do set compile=%compile% -DBUILD_GIT_HASH=\"%%i\"
|
||||||
pushd build
|
|
||||||
%compile_debug% ..\src\metagen\metagen_main.c %compile_link% %out%metagen.exe || exit /b 1
|
:: --- Build & Run Metaprogram ------------------------------------------------
|
||||||
metagen.exe || exit /b 1
|
if "%no_meta%"=="1" echo [skipping metagen]
|
||||||
popd
|
if not "%no_meta%"=="1" (
|
||||||
)
|
pushd build
|
||||||
|
%compile_debug% ..\src\metagen\metagen_main.c %compile_link% %out%metagen.exe || exit /b 1
|
||||||
:: --- Build Everything (@build_targets) --------------------------------------
|
metagen.exe || exit /b 1
|
||||||
pushd build
|
popd
|
||||||
if "%raddbg%"=="1" %compile% %gfx% ..\src\raddbg\raddbg_main.cpp %compile_link% %out%raddbg.exe || exit /b 1
|
)
|
||||||
if "%raddbgi_from_pdb%"=="1" %compile% ..\src\raddbgi_from_pdb\raddbgi_from_pdb_main.c %compile_link% %out%raddbgi_from_pdb.exe || exit /b 1
|
|
||||||
if "%raddbgi_from_dwarf%"=="1" %compile% ..\src\raddbgi_from_dwarf\raddbgi_from_dwarf.c %compile_link% %out%raddbgi_from_dwarf.exe || exit /b 1
|
:: --- Build Everything (@build_targets) --------------------------------------
|
||||||
if "%raddbgi_dump%"=="1" %compile% ..\src\raddbgi_dump\raddbgi_dump_main.c %compile_link% %out%raddbgi_dump.exe || exit /b 1
|
pushd build
|
||||||
if "%raddbgi_breakpad_from_pdb%"=="1" %compile% ..\src\raddbgi_breakpad_from_pdb\raddbgi_breakpad_from_pdb_main.c %compile_link% %out%raddbgi_breakpad_from_pdb.exe || exit /b 1
|
if "%raddbg%"=="1" set didbuild=1 && %compile% ..\src\raddbg\raddbg_main.c %compile_link% %link_icon% %out%raddbg.exe || exit /b 1
|
||||||
if "%ryan_scratch%"=="1" %compile% ..\src\scratch\ryan_scratch.c %compile_link% %out%ryan_scratch.exe || exit /b 1
|
if "%radlink%"=="1" set didbuild=1 && %compile% ..\src\linker\lnk.c %compile_link% %out%radlink.exe || exit /b 1
|
||||||
if "%cpp_tests%"=="1" %compile% ..\src\scratch\i_hate_c_plus_plus.cpp %compile_link% %out%cpp_tests.exe || exit /b 1
|
if "%rdi_from_pdb%"=="1" set didbuild=1 && %compile% ..\src\rdi_from_pdb\rdi_from_pdb_main.c %compile_link% %out%rdi_from_pdb.exe || exit /b 1
|
||||||
if "%look_at_raddbg%"=="1" %compile% ..\src\scratch\look_at_raddbg.c %compile_link% %out%look_at_raddbg.exe || exit /b 1
|
if "%rdi_from_dwarf%"=="1" set didbuild=1 && %compile% ..\src\rdi_from_dwarf\rdi_from_dwarf.c %compile_link% %out%rdi_from_dwarf.exe || exit /b 1
|
||||||
if "%mule_main%"=="1" del vc*.pdb mule*.pdb && %compile_release% %only_compile% ..\src\mule\mule_inline.cpp && %compile_release% %only_compile% ..\src\mule\mule_o2.cpp && %compile_debug% %EHsc% ..\src\mule\mule_main.cpp ..\src\mule\mule_c.c mule_inline.obj mule_o2.obj %compile_link% %out%mule_main.exe || exit /b 1
|
if "%rdi_dump%"=="1" set didbuild=1 && %compile% ..\src\rdi_dump\rdi_dump_main.c %compile_link% %out%rdi_dump.exe || exit /b 1
|
||||||
if "%mule_module%"=="1" %compile% ..\src\mule\mule_module.cpp %compile_link% %link_dll% %out%mule_module.dll || exit /b 1
|
if "%rdi_breakpad_from_pdb%"=="1" set didbuild=1 && %compile% ..\src\rdi_breakpad_from_pdb\rdi_breakpad_from_pdb_main.c %compile_link% %out%rdi_breakpad_from_pdb.exe || exit /b 1
|
||||||
if "%mule_hotload%"=="1" %compile% ..\src\mule\mule_hotload_main.c %compile_link% %out%mule_hotload.exe & %compile% ..\src\mule\mule_hotload_module_main.c %compile_link% %link_dll% %out%mule_hotload_module.dll || exit /b 1
|
if "%tester%"=="1" set didbuild=1 && %compile% ..\src\tester\tester_main.c %compile_link% %out%tester.exe || exit /b 1
|
||||||
popd
|
if "%ryan_scratch%"=="1" set didbuild=1 && %compile% ..\src\scratch\ryan_scratch.c %compile_link% %out%ryan_scratch.exe || exit /b 1
|
||||||
|
if "%parse_inline_sites%"=="1" set didbuild=1 && %compile% ..\src\scratch\parse_inline_sites.c %compile_link% %out%parse_inline_sites.exe || exit /b 1
|
||||||
:: --- Unset ------------------------------------------------------------------
|
if "%mule_main%"=="1" set didbuild=1 && del vc*.pdb mule*.pdb && %compile_release% %only_compile% ..\src\mule\mule_inline.cpp && %compile_release% %only_compile% ..\src\mule\mule_o2.cpp && %compile_debug% %EHsc% ..\src\mule\mule_main.cpp ..\src\mule\mule_c.c mule_inline.obj mule_o2.obj %compile_link% %no_aslr% %out%mule_main.exe || exit /b 1
|
||||||
for %%a in (%*) do set "%%a=0"
|
if "%mule_module%"=="1" set didbuild=1 && %compile% ..\src\mule\mule_module.cpp %compile_link% %link_dll% %out%mule_module.dll || exit /b 1
|
||||||
set raddbg=
|
if "%mule_hotload%"=="1" set didbuild=1 && %compile% ..\src\mule\mule_hotload_main.c %compile_link% %out%mule_hotload.exe & %compile% ..\src\mule\mule_hotload_module_main.c %compile_link% %link_dll% %out%mule_hotload_module.dll || exit /b 1
|
||||||
set compile=
|
if "%mule_peb_trample%"=="1" (
|
||||||
set compile_link=
|
set didbuild=1
|
||||||
set out=
|
if exist mule_peb_trample.exe move mule_peb_trample.exe mule_peb_trample_old_%random%.exe
|
||||||
set msvc=
|
if exist mule_peb_trample_new.pdb move mule_peb_trample_new.pdb mule_peb_trample_old_%random%.pdb
|
||||||
set debug=
|
if exist mule_peb_trample_new.rdi move mule_peb_trample_new.rdi mule_peb_trample_old_%random%.rdi
|
||||||
|
%compile% ..\src\mule\mule_peb_trample.c %compile_link% %out%mule_peb_trample_new.exe || exit /b 1
|
||||||
|
move mule_peb_trample_new.exe mule_peb_trample.exe
|
||||||
|
)
|
||||||
|
popd
|
||||||
|
|
||||||
|
:: --- Unset ------------------------------------------------------------------
|
||||||
|
for %%a in (%*) do set "%%a=0"
|
||||||
|
set raddbg=
|
||||||
|
set compile=
|
||||||
|
set compile_link=
|
||||||
|
set out=
|
||||||
|
set msvc=
|
||||||
|
set debug=
|
||||||
|
set release=
|
||||||
|
|
||||||
|
:: --- Warn On No Builds ------------------------------------------------------
|
||||||
|
if "%didbuild%"=="" (
|
||||||
|
echo [WARNING] no valid build target specified; must use build target names as arguments to this script, like `build raddbg` or `build rdi_from_pdb`.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
# --- Unpack Arguments --------------------------------------------------------
|
||||||
|
for arg in "$@"; do declare $arg='1'; done
|
||||||
|
if [ ! -v gcc ]; then clang=1; fi
|
||||||
|
if [ ! -v release ]; then debug=1; fi
|
||||||
|
if [ -v debug ]; then echo "[debug mode]"; fi
|
||||||
|
if [ -v release ]; then echo "[release mode]"; fi
|
||||||
|
if [ -v clang ]; then compiler="${CC:-clang}"; echo "[clang compile]"; fi
|
||||||
|
if [ -v gcc ]; then compiler="${CC:-gcc}"; echo "[gcc compile]"; fi
|
||||||
|
|
||||||
|
# --- Unpack Command Line Build Arguments -------------------------------------
|
||||||
|
auto_compile_flags=''
|
||||||
|
|
||||||
|
# --- Compile/Link Line Definitions -------------------------------------------
|
||||||
|
clang_common='-I../src/ -I../local/ -g -Wno-unknown-warning-option -fdiagnostics-absolute-paths -Wall -Wno-missing-braces -Wno-unused-function -Wno-writable-strings -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Wno-compare-distinct-pointer-types -Wno-initializer-overrides -Wno-incompatible-pointer-types-discards-qualifiers -Wno-for-loop-analysis -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf'
|
||||||
|
clang_debug="$compiler -g -O0 -DBUILD_DEBUG=1 ${clang_common} ${auto_compile_flags}"
|
||||||
|
clang_release="$compiler -g -O2 -DBUILD_DEBUG=0 ${clang_common} ${auto_compile_flags}"
|
||||||
|
clang_link="-lpthread -lm -lrt -ldl"
|
||||||
|
clang_out="-o"
|
||||||
|
gcc_common='-I../src/ -I../local/ -g -Wno-unknown-warning-option -Wall -Wno-missing-braces -Wno-unused-function -Wno-attributes -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-compare-distinct-pointer-types -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf'
|
||||||
|
gcc_debug="$compiler -g -O0 -DBUILD_DEBUG=1 ${gcc_common} ${auto_compile_flags}"
|
||||||
|
gcc_release="$compiler -g -O2 -DBUILD_DEBUG=0 ${gcc_common} ${auto_compile_flags}"
|
||||||
|
gcc_link="-lpthread -lm -lrt -ldl"
|
||||||
|
gcc_out="-o"
|
||||||
|
|
||||||
|
# --- Per-Build Settings ------------------------------------------------------
|
||||||
|
link_dll="-fPIC"
|
||||||
|
link_os_gfx="-lX11 -lXext"
|
||||||
|
|
||||||
|
# --- Choose Compile/Link Lines -----------------------------------------------
|
||||||
|
if [ -v gcc ]; then compile_debug="$gcc_debug"; fi
|
||||||
|
if [ -v gcc ]; then compile_release="$gcc_release"; fi
|
||||||
|
if [ -v gcc ]; then compile_link="$gcc_link"; fi
|
||||||
|
if [ -v gcc ]; then out="$gcc_out"; fi
|
||||||
|
if [ -v clang ]; then compile_debug="$clang_debug"; fi
|
||||||
|
if [ -v clang ]; then compile_release="$clang_release"; fi
|
||||||
|
if [ -v clang ]; then compile_link="$clang_link"; fi
|
||||||
|
if [ -v clang ]; then out="$clang_out"; fi
|
||||||
|
if [ -v debug ]; then compile="$compile_debug"; fi
|
||||||
|
if [ -v release ]; then compile="$compile_release"; fi
|
||||||
|
|
||||||
|
# --- Prep Directories --------------------------------------------------------
|
||||||
|
mkdir -p build
|
||||||
|
mkdir -p local
|
||||||
|
|
||||||
|
# --- Build & Run Metaprogram -------------------------------------------------
|
||||||
|
if [ -v no_meta ]; then echo "[skipping metagen]"; fi
|
||||||
|
if [ ! -v no_meta ]
|
||||||
|
then
|
||||||
|
cd build
|
||||||
|
$compile_debug ../src/metagen/metagen_main.c $compile_link $out metagen
|
||||||
|
./metagen
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --- Build Everything (@build_targets) ---------------------------------------
|
||||||
|
cd build
|
||||||
|
if [ -v raddbg ]; then didbuild=1 && $compile ../src/raddbg/raddbg_main.c $compile_link $link_os_gfx $out raddbg; fi
|
||||||
|
if [ -v rdi_from_pdb ]; then didbuild=1 && $compile ../src/rdi_from_pdb/rdi_from_pdb_main.c $compile_link $out rdi_from_pdb; fi
|
||||||
|
if [ -v rdi_from_dwarf ]; then didbuild=1 && $compile ../src/rdi_from_dwarf/rdi_from_dwarf.c $compile_link $out rdi_from_dwarf; fi
|
||||||
|
if [ -v rdi_dump ]; then didbuild=1 && $compile ../src/rdi_dump/rdi_dump_main.c $compile_link $out rdi_dump; fi
|
||||||
|
if [ -v rdi_breakpad_from_pdb ]; then didbuild=1 && $compile ../src/rdi_breakpad_from_pdb/rdi_breakpad_from_pdb_main.c $compile_link $out rdi_breakpad_from_pdb; fi
|
||||||
|
if [ -v ryan_scratch ]; then didbuild=1 && $compile ../src/scratch/ryan_scratch.c $compile_link $link_os_gfx $out ryan_scratch; fi
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# --- Warn On No Builds -------------------------------------------------------
|
||||||
|
if [ ! -v didbuild ]
|
||||||
|
then
|
||||||
|
echo "[WARNING] no valid build target specified; must use build target names as arguments to this script, like \`./build.sh raddbg\` or \`./build.sh rdi_from_pdb\`."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
+96
-174
@@ -1,174 +1,96 @@
|
|||||||
version(2);
|
version(2);
|
||||||
project_name = "The RAD Debugger";
|
project_name = "The RAD Debugger";
|
||||||
|
|
||||||
indent_width = "2";
|
indent_width = "2";
|
||||||
default_tab_width = "2";
|
default_tab_width = "2";
|
||||||
|
|
||||||
patterns =
|
patterns =
|
||||||
{
|
{
|
||||||
"*.c",
|
"*.c",
|
||||||
"*.cpp",
|
"*.cpp",
|
||||||
"*.h",
|
"*.h",
|
||||||
"*.inc",
|
"*.inc",
|
||||||
"*.hpp",
|
"*.hpp",
|
||||||
"*.bat",
|
"*.bat",
|
||||||
"*.sh",
|
"*.sh",
|
||||||
"*.4coder",
|
"*.4coder",
|
||||||
"*.glsl",
|
"*.glsl",
|
||||||
"*.bfs",
|
"*.bfs",
|
||||||
"*.html",
|
"*.html",
|
||||||
"*.txt",
|
"*.txt",
|
||||||
"*.md",
|
"*.md",
|
||||||
"*.mdesk",
|
"*.mdesk",
|
||||||
"*.asm",
|
"*.asm",
|
||||||
};
|
};
|
||||||
|
|
||||||
blacklist_patterns =
|
blacklist_patterns =
|
||||||
{
|
{
|
||||||
".*",
|
".*",
|
||||||
"metagen_base_*",
|
"metagen_base_*",
|
||||||
"metagen_os_*",
|
"metagen_os_*",
|
||||||
};
|
};
|
||||||
|
|
||||||
paths =
|
paths =
|
||||||
{
|
{
|
||||||
{ .path = ".", .recursive = false, .relative = true, },
|
{ .path = ".", .recursive = false, .relative = true, },
|
||||||
{ .path = "src", .recursive = true , .relative = true, },
|
{ .path = "src", .recursive = true , .relative = true, },
|
||||||
{ .path = "local", .recursive = true , .relative = true, },
|
{ .path = "local", .recursive = true , .relative = true, },
|
||||||
};
|
};
|
||||||
|
|
||||||
load_paths =
|
load_paths =
|
||||||
{
|
{
|
||||||
.win = paths,
|
.win = paths,
|
||||||
.linux = paths,
|
.linux = paths,
|
||||||
};
|
};
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
{
|
{
|
||||||
.rjf_f1 =
|
//- rjf: fkey command slots (change locally but do not commit)
|
||||||
{
|
.f1 = { .win = "build raddbg telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.win = "build raddbg telemetry",
|
.f2 = { .win = "build rdi_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.linux = "",
|
.f3 = { .win = "pushd build && raddbg.exe --user:local_dev.raddbg_user --project:local_dev.raddbg_project --xuto_run && popd",.linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
//- rjf: local target builds
|
||||||
.save_dirty_files = true,
|
.build_raddbg = { .win = "build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.cursor_at_end = false,
|
.build_rdi_from_pdb = { .win = "build rdi_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
},
|
.build_rdi_from_dwarf = { .win = "build rdi_from_dwarf", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.rjf_f2 =
|
.build_rdi_dump = { .win = "build rdi_dump", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
{
|
.build_rdi_breakpad_from_pdb = { .win = "build rdi_breakpad_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.win = "build raddbgi_from_pdb telemetry release",
|
.build_ryan_scratch = { .win = "build ryan_scratch", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.linux = "",
|
.build_mule_main = { .win = "build mule_main", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.out = "*compilation*",
|
.build_mule_module = { .win = "build mule_module", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.footer_panel = true,
|
.build_mule_hotload = { .win = "build mule_hotload", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.save_dirty_files = true,
|
.build_mule_peb_trample = { .win = "build mule_peb_trample", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
//- rjf: wsl target builds
|
||||||
.rjf_f3 =
|
.build_raddbg_wsl = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
{
|
.build_rdi_from_pdb_wsl = { .win = "wsl ./build.sh rdi_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.win = "pushd build && raddbg.exe --user:local_dev.raddbg_user --profile:local_dev.raddbg_profile && popd",
|
.build_rdi_from_dwarf_wsl = { .win = "wsl ./build.sh rdi_from_dwarf", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.linux = "",
|
.build_rdi_dump_wsl = { .win = "wsl ./build.sh rdi_dump", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.out = "*compilation*",
|
.build_rdi_breakpad_from_pdb_wsl = { .win = "wsl ./build.sh rdi_breakpad_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.footer_panel = true,
|
.build_ryan_scratch_wsl = { .win = "wsl ./build.sh ryan_scratch", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.save_dirty_files = true,
|
.build_mule_main_wsl = { .win = "wsl ./build.sh mule_main", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.cursor_at_end = false,
|
.build_mule_module_wsl = { .win = "wsl ./build.sh mule_module", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
},
|
.build_mule_hotload_wsl = { .win = "wsl ./build.sh mule_hotload", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.rjf_f4 =
|
.build_mule_peb_trample_wsl = { .win = "wsl ./build.sh mule_peb_trample", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
{
|
|
||||||
.win = "build raddbgi_from_pdb release telemetry && pushd build && raddbgi_from_pdb.exe --exe:UnrealEditorFortnite.exe --pdb:UnrealEditorFortnite.pdb --out:UnrealEditorFortnite.raddbgi --capture && popd",
|
//- rjf: local target runs
|
||||||
.linux = "",
|
.run_raddbg = { .win = "pushd build && raddbg.exe && popd", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||||
.out = "*compilation*",
|
};
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
fkey_command =
|
||||||
.cursor_at_end = false,
|
{
|
||||||
},
|
.F1 = "f1",
|
||||||
.rjf_f5 =
|
.F2 = "f2",
|
||||||
{
|
.F3 = "f3",
|
||||||
.win = "pushd build && raddbgi_from_pdb.exe --exe:raddbg.exe --pdb:raddbg.pdb --out:raddbg.raddbg --capture && popd",
|
};
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
fkey_command_override =
|
||||||
.footer_panel = true,
|
{
|
||||||
.save_dirty_files = true,
|
.rjf =
|
||||||
.cursor_at_end = false,
|
{
|
||||||
},
|
.F1 = "f1",
|
||||||
.build_raddbg =
|
.F2 = "f2",
|
||||||
{
|
.F3 = "f3",
|
||||||
.win = "build raddbg",
|
},
|
||||||
.linux = "",
|
};
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
.build_raddbg_release_telemetry =
|
|
||||||
{
|
|
||||||
.win = "build raddbg release telemetry",
|
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
.build_raddbgi_from_pdb =
|
|
||||||
{
|
|
||||||
.win = "build raddbgi_from_pdb",
|
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
.build_raddbgi_dump =
|
|
||||||
{
|
|
||||||
.win = "build raddbgi_dump",
|
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
.build_mule_main =
|
|
||||||
{
|
|
||||||
.win = "build mule_main",
|
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
.build_ryan_scratch =
|
|
||||||
{
|
|
||||||
.win = "build ryan_scratch",
|
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
.run_raddbg =
|
|
||||||
{
|
|
||||||
.win = "pushd build && raddbg.exe && popd",
|
|
||||||
.linux = "",
|
|
||||||
.out = "*compilation*",
|
|
||||||
.footer_panel = true,
|
|
||||||
.save_dirty_files = true,
|
|
||||||
.cursor_at_end = false,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
fkey_command =
|
|
||||||
{
|
|
||||||
.F1 = "build_raddbg",
|
|
||||||
.F3 = "run_raddbg",
|
|
||||||
};
|
|
||||||
|
|
||||||
fkey_command_override =
|
|
||||||
{
|
|
||||||
.rjf =
|
|
||||||
{
|
|
||||||
.F1 = "rjf_f1",
|
|
||||||
.F2 = "rjf_f2",
|
|
||||||
.F3 = "rjf_f3",
|
|
||||||
.F4 = "rjf_f4",
|
|
||||||
.F5 = "rjf_f5",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|||||||
+247
-302
@@ -1,302 +1,247 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// Implementation
|
//~ rjf: Arena Functions
|
||||||
|
|
||||||
internal Arena *
|
//- rjf: arena creation/destruction
|
||||||
arena_alloc__sized(U64 init_res, U64 init_cmt)
|
|
||||||
{
|
internal Arena *
|
||||||
ProfBeginFunction();
|
arena_alloc_(ArenaParams *params)
|
||||||
Assert(ARENA_HEADER_SIZE < init_cmt && init_cmt <= init_res);
|
{
|
||||||
|
// rjf: round up reserve/commit sizes
|
||||||
void *memory = 0;
|
U64 reserve_size = params->reserve_size;
|
||||||
U64 res = 0;
|
U64 commit_size = params->commit_size;
|
||||||
U64 cmt = 0;
|
if(params->flags & ArenaFlag_LargePages)
|
||||||
B32 large_pages = os_large_pages_enabled();
|
{
|
||||||
if(large_pages)
|
reserve_size = AlignPow2(reserve_size, os_get_system_info()->large_page_size);
|
||||||
{
|
commit_size = AlignPow2(commit_size, os_get_system_info()->large_page_size);
|
||||||
U64 page_size = os_large_page_size();
|
}
|
||||||
res = AlignPow2(init_res, page_size);
|
else
|
||||||
#if OS_WINDOWS
|
{
|
||||||
cmt = res;
|
reserve_size = AlignPow2(reserve_size, os_get_system_info()->page_size);
|
||||||
#else
|
commit_size = AlignPow2(commit_size, os_get_system_info()->page_size);
|
||||||
cmt = AlignPow2(init_cmt, page_size);
|
}
|
||||||
#endif
|
|
||||||
memory = os_reserve_large(res);
|
// rjf: reserve/commit initial block
|
||||||
if(!os_commit_large(memory, cmt))
|
void *base = params->optional_backing_buffer;
|
||||||
{
|
if(base == 0)
|
||||||
memory = 0;
|
{
|
||||||
os_release(memory, res);
|
if(params->flags & ArenaFlag_LargePages)
|
||||||
}
|
{
|
||||||
}
|
base = os_reserve_large(reserve_size);
|
||||||
else
|
os_commit_large(base, commit_size);
|
||||||
{
|
}
|
||||||
U64 page_size = os_page_size();
|
else
|
||||||
res = AlignPow2(init_res, page_size);
|
{
|
||||||
cmt = AlignPow2(init_cmt, page_size);
|
base = os_reserve(reserve_size);
|
||||||
memory = os_reserve(res);
|
os_commit(base, commit_size);
|
||||||
if(!os_commit(memory, cmt))
|
}
|
||||||
{
|
}
|
||||||
memory = 0;
|
|
||||||
os_release(memory, res);
|
// rjf: panic on arena creation failure
|
||||||
}
|
#if OS_FEATURE_GRAPHICAL
|
||||||
}
|
if(Unlikely(base == 0))
|
||||||
|
{
|
||||||
Arena *arena = (Arena*)memory;
|
os_graphical_message(1, str8_lit("Fatal Allocation Failure"), str8_lit("Unexpected memory allocation failure."));
|
||||||
if(arena)
|
os_abort(1);
|
||||||
{
|
}
|
||||||
AsanPoisonMemoryRegion(memory, cmt);
|
#endif
|
||||||
AsanUnpoisonMemoryRegion(memory, ARENA_HEADER_SIZE);
|
|
||||||
arena->prev = 0;
|
// rjf: extract arena header & fill
|
||||||
arena->current = arena;
|
Arena *arena = (Arena *)base;
|
||||||
arena->base_pos = 0;
|
arena->current = arena;
|
||||||
arena->pos = ARENA_HEADER_SIZE;
|
arena->flags = params->flags;
|
||||||
arena->cmt = cmt;
|
arena->cmt_size = (U32)params->commit_size;
|
||||||
arena->res = res;
|
arena->res_size = params->reserve_size;
|
||||||
arena->align = 8;
|
arena->base_pos = 0;
|
||||||
arena->grow = 1;
|
arena->pos = ARENA_HEADER_SIZE;
|
||||||
arena->large_pages = large_pages;
|
arena->cmt = commit_size;
|
||||||
}
|
arena->res = reserve_size;
|
||||||
|
#if ARENA_FREE_LIST
|
||||||
ProfEnd();
|
arena->free_size = 0;
|
||||||
return arena;
|
arena->free_last = 0;
|
||||||
}
|
#endif
|
||||||
|
AsanPoisonMemoryRegion(base, commit_size);
|
||||||
internal Arena *
|
AsanUnpoisonMemoryRegion(base, ARENA_HEADER_SIZE);
|
||||||
arena_alloc(void)
|
return arena;
|
||||||
{
|
}
|
||||||
ProfBeginFunction();
|
|
||||||
|
internal void
|
||||||
U64 init_res, init_cmt;
|
arena_release(Arena *arena)
|
||||||
if (os_large_pages_enabled()) {
|
{
|
||||||
init_res = ARENA_RESERVE_SIZE_LARGE_PAGES;
|
for(Arena *n = arena->current, *prev = 0; n != 0; n = prev)
|
||||||
init_cmt = ARENA_COMMIT_SIZE_LARGE_PAGES;
|
{
|
||||||
} else {
|
prev = n->prev;
|
||||||
init_res = ARENA_RESERVE_SIZE;
|
os_release(n, n->res);
|
||||||
init_cmt = ARENA_COMMIT_SIZE;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Arena *arena = arena_alloc__sized(init_res, init_cmt);
|
//- rjf: arena push/pop core functions
|
||||||
|
|
||||||
ProfEnd();
|
internal void *
|
||||||
return arena;
|
arena_push(Arena *arena, U64 size, U64 align)
|
||||||
}
|
{
|
||||||
|
Arena *current = arena->current;
|
||||||
internal void
|
U64 pos_pre = AlignPow2(current->pos, align);
|
||||||
arena_release(Arena *arena)
|
U64 pos_pst = pos_pre + size;
|
||||||
{
|
|
||||||
for (Arena *node = arena->current, *prev = 0; node != 0; node = prev) {
|
// rjf: chain, if needed
|
||||||
prev = node->prev;
|
if(current->res < pos_pst && !(arena->flags & ArenaFlag_NoChain))
|
||||||
os_release(node, node->res);
|
{
|
||||||
}
|
Arena *new_block = 0;
|
||||||
}
|
|
||||||
|
#if ARENA_FREE_LIST
|
||||||
internal U64
|
Arena *prev_block;
|
||||||
arena_huge_push_threshold(void)
|
for(new_block = arena->free_last, prev_block = 0; new_block != 0; prev_block = new_block, new_block = new_block->prev)
|
||||||
{
|
{
|
||||||
U64 reserve_size = os_large_pages_enabled() ? ARENA_RESERVE_SIZE_LARGE_PAGES : ARENA_RESERVE_SIZE;
|
if(new_block->res >= AlignPow2(size, align))
|
||||||
U64 threshold = (reserve_size - ARENA_HEADER_SIZE) / 2 + 1;
|
{
|
||||||
return threshold;
|
if(prev_block)
|
||||||
}
|
{
|
||||||
|
prev_block->prev = new_block->prev;
|
||||||
internal void *
|
}
|
||||||
arena_push__impl(Arena *arena, U64 size)
|
else
|
||||||
{
|
{
|
||||||
Arena *current = arena->current;
|
arena->free_last = new_block->prev;
|
||||||
U64 pos_mem = AlignPow2(current->pos, arena->align);
|
}
|
||||||
U64 pos_new = pos_mem + size;
|
arena->free_size -= new_block->res_size;
|
||||||
|
AsanUnpoisonMemoryRegion((U8*)new_block + ARENA_HEADER_SIZE, new_block->res_size - ARENA_HEADER_SIZE);
|
||||||
if (current->res < pos_new && arena->grow) {
|
break;
|
||||||
Arena *new_block;
|
}
|
||||||
|
}
|
||||||
// normal growth path
|
#endif
|
||||||
if (size < arena_huge_push_threshold()) {
|
|
||||||
new_block = arena_alloc();
|
if(new_block == 0)
|
||||||
}
|
{
|
||||||
// huge growth path
|
U64 res_size = current->res_size;
|
||||||
else {
|
U64 cmt_size = current->cmt_size;
|
||||||
U64 new_block_size = size + ARENA_HEADER_SIZE;
|
if(size + ARENA_HEADER_SIZE > res_size)
|
||||||
new_block = arena_alloc__sized(new_block_size, new_block_size);
|
{
|
||||||
}
|
res_size = AlignPow2(size + ARENA_HEADER_SIZE, align);
|
||||||
|
cmt_size = AlignPow2(size + ARENA_HEADER_SIZE, align);
|
||||||
if (new_block) {
|
}
|
||||||
new_block->base_pos = current->base_pos + current->res;
|
new_block = arena_alloc(.reserve_size = res_size,
|
||||||
SLLStackPush_N(arena->current, new_block, prev);
|
.commit_size = cmt_size,
|
||||||
|
.flags = current->flags);
|
||||||
current = new_block;
|
new_block->base_pos = current->base_pos + current->res;
|
||||||
pos_mem = AlignPow2(current->pos, current->align);
|
SLLStackPush_N(arena->current, new_block, prev);
|
||||||
pos_new = pos_mem + size;
|
}
|
||||||
}
|
|
||||||
}
|
current = new_block;
|
||||||
|
pos_pre = AlignPow2(current->pos, align);
|
||||||
if (current->cmt < pos_new) {
|
pos_pst = pos_pre + size;
|
||||||
U64 cmt_new_aligned, cmt_new_clamped, cmt_new_size;
|
}
|
||||||
B32 is_cmt_ok;
|
|
||||||
|
// rjf: commit new pages, if needed
|
||||||
if (current->large_pages) {
|
if(current->cmt < pos_pst)
|
||||||
cmt_new_aligned = AlignPow2(pos_new, ARENA_COMMIT_SIZE_LARGE_PAGES);
|
{
|
||||||
cmt_new_clamped = ClampTop(cmt_new_aligned, current->res);
|
U64 cmt_pst_aligned = pos_pst + current->cmt_size-1;
|
||||||
cmt_new_size = cmt_new_clamped - current->cmt;
|
cmt_pst_aligned -= cmt_pst_aligned%current->cmt_size;
|
||||||
is_cmt_ok = os_commit_large((U8*)current + current->cmt, cmt_new_size);
|
U64 cmt_pst_clamped = ClampTop(cmt_pst_aligned, current->res);
|
||||||
} else {
|
U64 cmt_size = cmt_pst_clamped - current->cmt;
|
||||||
cmt_new_aligned = AlignPow2(pos_new, ARENA_COMMIT_SIZE);
|
U8 *cmt_ptr = (U8 *)current + current->cmt;
|
||||||
cmt_new_clamped = ClampTop(cmt_new_aligned, current->res);
|
if(current->flags & ArenaFlag_LargePages)
|
||||||
cmt_new_size = cmt_new_clamped - current->cmt;
|
{
|
||||||
is_cmt_ok = os_commit((U8*)current + current->cmt, cmt_new_size);
|
os_commit_large(cmt_ptr, cmt_size);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (is_cmt_ok) {
|
{
|
||||||
current->cmt = cmt_new_clamped;
|
os_commit(cmt_ptr, cmt_size);
|
||||||
}
|
}
|
||||||
}
|
current->cmt = cmt_pst_clamped;
|
||||||
|
}
|
||||||
void *memory = 0;
|
|
||||||
|
// rjf: push onto current block
|
||||||
if (current->cmt >= pos_new) {
|
void *result = 0;
|
||||||
memory = (U8*)current + pos_mem;
|
if(current->cmt >= pos_pst)
|
||||||
current->pos = pos_new;
|
{
|
||||||
AsanUnpoisonMemoryRegion(memory, size);
|
result = (U8 *)current+pos_pre;
|
||||||
}
|
current->pos = pos_pst;
|
||||||
|
AsanUnpoisonMemoryRegion(result, size);
|
||||||
#if OS_FEATURE_GRAPHICAL
|
}
|
||||||
if(Unlikely(memory == 0))
|
|
||||||
{
|
// rjf: panic on failure
|
||||||
os_graphical_message(1, str8_lit("Fatal Allocation Failure"), str8_lit("Unexpected memory allocation failure."));
|
#if OS_FEATURE_GRAPHICAL
|
||||||
os_exit_process(1);
|
if(Unlikely(result == 0))
|
||||||
}
|
{
|
||||||
#endif
|
os_graphical_message(1, str8_lit("Fatal Allocation Failure"), str8_lit("Unexpected memory allocation failure."));
|
||||||
|
os_abort(1);
|
||||||
return memory;
|
}
|
||||||
}
|
#endif
|
||||||
|
|
||||||
internal U64
|
return result;
|
||||||
arena_pos(Arena *arena)
|
}
|
||||||
{
|
|
||||||
Arena *current = arena->current;
|
internal U64
|
||||||
U64 pos = current->base_pos + current->pos;
|
arena_pos(Arena *arena)
|
||||||
return pos;
|
{
|
||||||
}
|
Arena *current = arena->current;
|
||||||
|
U64 pos = current->base_pos + current->pos;
|
||||||
internal void
|
return pos;
|
||||||
arena_pop_to(Arena *arena, U64 big_pos_unclamped)
|
}
|
||||||
{
|
|
||||||
U64 big_pos = ClampBot(ARENA_HEADER_SIZE, big_pos_unclamped);
|
internal void
|
||||||
|
arena_pop_to(Arena *arena, U64 pos)
|
||||||
// unroll the chain
|
{
|
||||||
Arena *current = arena->current;
|
U64 big_pos = ClampBot(ARENA_HEADER_SIZE, pos);
|
||||||
for (Arena *prev = 0; current->base_pos >= big_pos; current = prev) {
|
Arena *current = arena->current;
|
||||||
prev = current->prev;
|
|
||||||
os_release(current, current->res);
|
#if ARENA_FREE_LIST
|
||||||
}
|
for(Arena *prev = 0; current->base_pos >= big_pos; current = prev)
|
||||||
AssertAlways(current);
|
{
|
||||||
arena->current = current;
|
prev = current->prev;
|
||||||
|
current->pos = ARENA_HEADER_SIZE;
|
||||||
// compute arena-relative position
|
arena->free_size += current->res_size;
|
||||||
U64 new_pos = big_pos - current->base_pos;
|
SLLStackPush_N(arena->free_last, current, prev);
|
||||||
AssertAlways(new_pos <= current->pos);
|
AsanPoisonMemoryRegion((U8*)current + ARENA_HEADER_SIZE, current->res_size - ARENA_HEADER_SIZE);
|
||||||
|
}
|
||||||
// poison popped memory block
|
#else
|
||||||
AsanPoisonMemoryRegion((U8*)current + new_pos, (current->pos - new_pos));
|
for(Arena *prev = 0; current->base_pos >= big_pos; current = prev)
|
||||||
|
{
|
||||||
// update position
|
prev = current->prev;
|
||||||
current->pos = new_pos;
|
os_release(current, current->res);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
internal void
|
arena->current = current;
|
||||||
arena_absorb(Arena *arena, Arena *sub)
|
U64 new_pos = big_pos - current->base_pos;
|
||||||
{
|
AssertAlways(new_pos <= current->pos);
|
||||||
// base adjustment
|
AsanPoisonMemoryRegion((U8*)current + new_pos, (current->pos - new_pos));
|
||||||
Arena *current = arena->current;
|
current->pos = new_pos;
|
||||||
U64 base_adjust = current->base_pos + current->res;
|
}
|
||||||
for (Arena *node = sub->current; node != 0; node = node->prev) {
|
|
||||||
node->base_pos += base_adjust;
|
//- rjf: arena push/pop helpers
|
||||||
}
|
|
||||||
|
internal void
|
||||||
// attach sub to arena
|
arena_clear(Arena *arena)
|
||||||
sub->prev = arena->current;
|
{
|
||||||
arena->current = sub->current;
|
arena_pop_to(arena, 0);
|
||||||
sub->current = sub;
|
}
|
||||||
}
|
|
||||||
|
internal void
|
||||||
////////////////////////////////
|
arena_pop(Arena *arena, U64 amt)
|
||||||
// Wrappers
|
{
|
||||||
|
U64 pos_old = arena_pos(arena);
|
||||||
internal void *
|
U64 pos_new = pos_old;
|
||||||
arena_push(Arena *arena, U64 size)
|
if(amt < pos_old)
|
||||||
{
|
{
|
||||||
void *memory = arena_push__impl(arena, size);
|
pos_new = pos_old - amt;
|
||||||
return memory;
|
}
|
||||||
}
|
arena_pop_to(arena, pos_new);
|
||||||
|
}
|
||||||
internal void *
|
|
||||||
arena_push_contiguous(Arena *arena, U64 size)
|
//- rjf: temporary arena scopes
|
||||||
{
|
|
||||||
B32 restore = arena->grow;
|
internal Temp
|
||||||
arena->grow = 0;
|
temp_begin(Arena *arena)
|
||||||
void *memory = arena_push(arena, size);
|
{
|
||||||
arena->grow = restore;
|
U64 pos = arena_pos(arena);
|
||||||
return memory;
|
Temp temp = {arena, pos};
|
||||||
}
|
return temp;
|
||||||
|
}
|
||||||
internal void
|
|
||||||
arena_push_align(Arena *arena, U64 align)
|
internal void
|
||||||
{
|
temp_end(Temp temp)
|
||||||
Assert(IsPow2(align));
|
{
|
||||||
U64 amt = AlignPadPow2(arena->pos, align);
|
arena_pop_to(temp.arena, temp.pos);
|
||||||
void *ptr = arena_push(arena, amt);
|
}
|
||||||
MemoryZero(ptr, amt);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
arena_put_back(Arena *arena, U64 amt)
|
|
||||||
{
|
|
||||||
U64 pos_old = arena_pos(arena);
|
|
||||||
U64 pos_new = pos_old;
|
|
||||||
if (amt < pos_old) {
|
|
||||||
pos_new = pos_old - amt;
|
|
||||||
}
|
|
||||||
arena_pop_to(arena, pos_new);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
arena_clear(Arena *arena)
|
|
||||||
{
|
|
||||||
arena_pop_to(arena, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal Temp
|
|
||||||
temp_begin(Arena *arena)
|
|
||||||
{
|
|
||||||
U64 pos = arena_pos(arena);
|
|
||||||
Temp temp = {arena, pos};
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
temp_end(Temp temp)
|
|
||||||
{
|
|
||||||
arena_pop_to(temp.arena, temp.pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ NOTE(allen): "Mini-Arena" Helper
|
|
||||||
|
|
||||||
internal B32
|
|
||||||
ensure_commit(void **cmtptr, void *pos, U64 cmt_block_size){
|
|
||||||
B32 result = 0;
|
|
||||||
U8 *cmt = (U8*)*cmtptr;
|
|
||||||
if (cmt < (U8*)pos){
|
|
||||||
U64 cmt_size_raw = (U8*)pos - cmt;
|
|
||||||
U64 cmt_size = AlignPow2(cmt_size_raw, cmt_block_size);
|
|
||||||
if (os_commit(cmt, cmt_size)){
|
|
||||||
*cmtptr = cmt + cmt_size;
|
|
||||||
result = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
result = 1;
|
|
||||||
}
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
+95
-87
@@ -1,87 +1,95 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_ARENA_H
|
#ifndef BASE_ARENA_H
|
||||||
#define BASE_ARENA_H
|
#define BASE_ARENA_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Constants
|
//~ rjf: Constants
|
||||||
|
|
||||||
#define ARENA_HEADER_SIZE 128
|
#if ARENA_FREE_LIST
|
||||||
|
# define ARENA_HEADER_SIZE 128
|
||||||
#ifndef ARENA_RESERVE_SIZE
|
#else
|
||||||
# define ARENA_RESERVE_SIZE MB(64)
|
# define ARENA_HEADER_SIZE 64
|
||||||
#endif
|
#endif
|
||||||
#ifndef ARENA_COMMIT_SIZE
|
|
||||||
# define ARENA_COMMIT_SIZE KB(64)
|
////////////////////////////////
|
||||||
#endif
|
//~ rjf: Types
|
||||||
|
|
||||||
#ifndef ARENA_RESERVE_SIZE_LARGE_PAGES
|
typedef U32 ArenaFlags;
|
||||||
# define ARENA_RESERVE_SIZE_LARGE_PAGES MB(8)
|
enum
|
||||||
#endif
|
{
|
||||||
#ifndef ARENA_COMMIT_SIZE_LARGE_PAGES
|
ArenaFlag_NoChain = (1<<0),
|
||||||
# define ARENA_COMMIT_SIZE_LARGE_PAGES MB(2)
|
ArenaFlag_LargePages = (1<<1),
|
||||||
#endif
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
typedef struct ArenaParams ArenaParams;
|
||||||
//~ rjf: Arena Types
|
struct ArenaParams
|
||||||
|
{
|
||||||
typedef struct Arena Arena;
|
ArenaFlags flags;
|
||||||
struct Arena
|
U64 reserve_size;
|
||||||
{
|
U64 commit_size;
|
||||||
struct Arena *prev;
|
void *optional_backing_buffer;
|
||||||
struct Arena *current;
|
};
|
||||||
U64 base_pos;
|
|
||||||
U64 pos;
|
typedef struct Arena Arena;
|
||||||
U64 cmt;
|
struct Arena
|
||||||
U64 res;
|
{
|
||||||
U64 align;
|
Arena *prev; // previous arena in chain
|
||||||
B8 grow;
|
Arena *current; // current arena in chain
|
||||||
B8 large_pages;
|
ArenaFlags flags;
|
||||||
};
|
U32 cmt_size;
|
||||||
|
U64 res_size;
|
||||||
typedef struct Temp Temp;
|
U64 base_pos;
|
||||||
struct Temp
|
U64 pos;
|
||||||
{
|
U64 cmt;
|
||||||
Arena *arena;
|
U64 res;
|
||||||
U64 pos;
|
#if ARENA_FREE_LIST
|
||||||
};
|
U64 free_size;
|
||||||
|
Arena *free_last;
|
||||||
////////////////////////////////
|
#endif
|
||||||
// Implementation
|
};
|
||||||
|
StaticAssert(sizeof(Arena) <= ARENA_HEADER_SIZE, arena_header_size_check);
|
||||||
internal Arena* arena_alloc__sized(U64 init_res, U64 init_cmt);
|
|
||||||
|
typedef struct Temp Temp;
|
||||||
internal Arena* arena_alloc(void);
|
struct Temp
|
||||||
internal void arena_release(Arena *arena);
|
{
|
||||||
|
Arena *arena;
|
||||||
internal void* arena_push__impl(Arena *arena, U64 size);
|
U64 pos;
|
||||||
internal U64 arena_pos(Arena *arena);
|
};
|
||||||
internal void arena_pop_to(Arena *arena, U64 pos);
|
|
||||||
|
////////////////////////////////
|
||||||
internal void arena_absorb(Arena *arena, Arena *sub);
|
//~ rjf: Global Defaults
|
||||||
|
|
||||||
////////////////////////////////
|
global U64 arena_default_reserve_size = MB(64);
|
||||||
// Wrappers
|
global U64 arena_default_commit_size = KB(64);
|
||||||
|
global ArenaFlags arena_default_flags = 0;
|
||||||
internal void* arena_push(Arena *arena, U64 size);
|
|
||||||
internal void* arena_push_contiguous(Arena *arena, U64 size);
|
////////////////////////////////
|
||||||
internal void arena_clear(Arena *arena);
|
//~ rjf: Arena Functions
|
||||||
internal void arena_push_align(Arena *arena, U64 align);
|
|
||||||
internal void arena_put_back(Arena *arena, U64 amt);
|
//- rjf: arena creation/destruction
|
||||||
|
internal Arena *arena_alloc_(ArenaParams *params);
|
||||||
internal Temp temp_begin(Arena *arena);
|
#define arena_alloc(...) arena_alloc_(&(ArenaParams){.reserve_size = arena_default_reserve_size, .commit_size = arena_default_commit_size, .flags = arena_default_flags, __VA_ARGS__})
|
||||||
internal void temp_end(Temp temp);
|
internal void arena_release(Arena *arena);
|
||||||
|
|
||||||
////////////////////////////////
|
//- rjf: arena push/pop/pos core functions
|
||||||
//~ NOTE(allen): "Mini-Arena" Helper
|
internal void *arena_push(Arena *arena, U64 size, U64 align);
|
||||||
|
internal U64 arena_pos(Arena *arena);
|
||||||
internal B32 ensure_commit(void **cmt, void *pos, U64 cmt_block_size);
|
internal void arena_pop_to(Arena *arena, U64 pos);
|
||||||
|
|
||||||
////////////////////////////////
|
//- rjf: arena push/pop helpers
|
||||||
//~ NOTE(allen): Main API Macros
|
internal void arena_clear(Arena *arena);
|
||||||
|
internal void arena_pop(Arena *arena, U64 amt);
|
||||||
#define push_array_no_zero(a,T,c) (T*)arena_push((a), sizeof(T)*(c))
|
|
||||||
#define push_array(a,T,c) (T*)MemoryZero(push_array_no_zero(a,T,c), sizeof(T)*(c))
|
//- rjf: temporary arena scopes
|
||||||
|
internal Temp temp_begin(Arena *arena);
|
||||||
#endif // BASE_ARENA_H
|
internal void temp_end(Temp temp);
|
||||||
|
|
||||||
|
//- rjf: push helper macros
|
||||||
|
#define push_array_no_zero_aligned(a, T, c, align) (T *)arena_push((a), sizeof(T)*(c), (align))
|
||||||
|
#define push_array_aligned(a, T, c, align) (T *)MemoryZero(push_array_no_zero_aligned(a, T, c, align), sizeof(T)*(c))
|
||||||
|
#define push_array_no_zero(a, T, c) push_array_no_zero_aligned(a, T, c, Max(8, AlignOf(T)))
|
||||||
|
#define push_array(a, T, c) push_array_aligned(a, T, c, Max(8, AlignOf(T)))
|
||||||
|
|
||||||
|
#endif // BASE_ARENA_H
|
||||||
|
|||||||
+232
-230
@@ -1,230 +1,232 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(rjf): Command Line Option Parsing
|
//~ NOTE(rjf): Command Line Option Parsing
|
||||||
|
|
||||||
internal U64
|
internal U64
|
||||||
cmd_line_hash_from_string(String8 string)
|
cmd_line_hash_from_string(String8 string)
|
||||||
{
|
{
|
||||||
U64 result = 5381;
|
U64 result = 5381;
|
||||||
for(U64 i = 0; i < string.size; i += 1)
|
for(U64 i = 0; i < string.size; i += 1)
|
||||||
{
|
{
|
||||||
result = ((result << 5) + result) + string.str[i];
|
result = ((result << 5) + result) + string.str[i];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal CmdLineOpt **
|
internal CmdLineOpt **
|
||||||
cmd_line_slot_from_string(CmdLine *cmd_line, String8 string)
|
cmd_line_slot_from_string(CmdLine *cmd_line, String8 string)
|
||||||
{
|
{
|
||||||
CmdLineOpt **slot = 0;
|
CmdLineOpt **slot = 0;
|
||||||
if(cmd_line->option_table_size != 0)
|
if(cmd_line->option_table_size != 0)
|
||||||
{
|
{
|
||||||
U64 hash = cmd_line_hash_from_string(string);
|
U64 hash = cmd_line_hash_from_string(string);
|
||||||
U64 bucket = hash % cmd_line->option_table_size;
|
U64 bucket = hash % cmd_line->option_table_size;
|
||||||
slot = &cmd_line->option_table[bucket];
|
slot = &cmd_line->option_table[bucket];
|
||||||
}
|
}
|
||||||
return slot;
|
return slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal CmdLineOpt *
|
internal CmdLineOpt *
|
||||||
cmd_line_opt_from_slot(CmdLineOpt **slot, String8 string)
|
cmd_line_opt_from_slot(CmdLineOpt **slot, String8 string)
|
||||||
{
|
{
|
||||||
CmdLineOpt *result = 0;
|
CmdLineOpt *result = 0;
|
||||||
for(CmdLineOpt *var = *slot; var; var = var->hash_next)
|
for(CmdLineOpt *var = *slot; var; var = var->hash_next)
|
||||||
{
|
{
|
||||||
if(str8_match(string, var->string, 0))
|
if(str8_match(string, var->string, 0))
|
||||||
{
|
{
|
||||||
result = var;
|
result = var;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
cmd_line_push_opt(CmdLineOptList *list, CmdLineOpt *var)
|
cmd_line_push_opt(CmdLineOptList *list, CmdLineOpt *var)
|
||||||
{
|
{
|
||||||
SLLQueuePush(list->first, list->last, var);
|
SLLQueuePush(list->first, list->last, var);
|
||||||
list->count += 1;
|
list->count += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal CmdLineOpt *
|
internal CmdLineOpt *
|
||||||
cmd_line_insert_opt(Arena *arena, CmdLine *cmd_line, String8 string, String8List values)
|
cmd_line_insert_opt(Arena *arena, CmdLine *cmd_line, String8 string, String8List values)
|
||||||
{
|
{
|
||||||
CmdLineOpt *var = 0;
|
CmdLineOpt *var = 0;
|
||||||
CmdLineOpt **slot = cmd_line_slot_from_string(cmd_line, string);
|
CmdLineOpt **slot = cmd_line_slot_from_string(cmd_line, string);
|
||||||
CmdLineOpt *existing_var = cmd_line_opt_from_slot(slot, string);
|
CmdLineOpt *existing_var = cmd_line_opt_from_slot(slot, string);
|
||||||
if(existing_var != 0)
|
if(existing_var != 0)
|
||||||
{
|
{
|
||||||
var = existing_var;
|
var = existing_var;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var = push_array(arena, CmdLineOpt, 1);
|
var = push_array(arena, CmdLineOpt, 1);
|
||||||
var->hash_next = *slot;
|
var->hash_next = *slot;
|
||||||
var->hash = cmd_line_hash_from_string(string);
|
var->hash = cmd_line_hash_from_string(string);
|
||||||
var->string = push_str8_copy(arena, string);
|
var->string = push_str8_copy(arena, string);
|
||||||
var->value_strings = values;
|
var->value_strings = values;
|
||||||
StringJoin join = {0};
|
StringJoin join = {0};
|
||||||
join.pre = str8_lit("");
|
join.pre = str8_lit("");
|
||||||
join.sep = str8_lit(",");
|
join.sep = str8_lit(",");
|
||||||
join.post = str8_lit("");
|
join.post = str8_lit("");
|
||||||
var->value_string = str8_list_join(arena, &var->value_strings, &join);
|
var->value_string = str8_list_join(arena, &var->value_strings, &join);
|
||||||
*slot = var;
|
*slot = var;
|
||||||
cmd_line_push_opt(&cmd_line->options, var);
|
cmd_line_push_opt(&cmd_line->options, var);
|
||||||
}
|
}
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal CmdLine
|
internal CmdLine
|
||||||
cmd_line_from_string_list(Arena *arena, String8List command_line)
|
cmd_line_from_string_list(Arena *arena, String8List command_line)
|
||||||
{
|
{
|
||||||
CmdLine parsed = {0};
|
CmdLine parsed = {0};
|
||||||
parsed.exe_name = command_line.first->string;
|
parsed.exe_name = command_line.first->string;
|
||||||
|
|
||||||
// NOTE(rjf): Set up config option table.
|
// NOTE(rjf): Set up config option table.
|
||||||
{
|
{
|
||||||
parsed.option_table_size = 4096;
|
parsed.option_table_size = 4096;
|
||||||
parsed.option_table = push_array(arena, CmdLineOpt *, parsed.option_table_size);
|
parsed.option_table = push_array(arena, CmdLineOpt *, parsed.option_table_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(rjf): Parse command line.
|
// NOTE(rjf): Parse command line.
|
||||||
B32 after_passthrough_option = 0;
|
B32 after_passthrough_option = 0;
|
||||||
for(String8Node *node = command_line.first->next, *next = 0; node != 0; node = next)
|
B32 first_passthrough = 1;
|
||||||
{
|
for(String8Node *node = command_line.first->next, *next = 0; node != 0; node = next)
|
||||||
next = node->next;
|
{
|
||||||
String8 option_name = node->string;
|
next = node->next;
|
||||||
|
String8 option_name = node->string;
|
||||||
// NOTE(rjf): Look at -- or - at the start of an argument to determine if it's
|
|
||||||
// a flag option. All arguments after a single "--" (with no trailing string
|
// NOTE(rjf): Look at -- or - at the start of an argument to determine if it's
|
||||||
// on the command line will be considered as input files.
|
// a flag option. All arguments after a single "--" (with no trailing string
|
||||||
B32 is_option = 1;
|
// on the command line will be considered as input files.
|
||||||
if(after_passthrough_option == 0)
|
B32 is_option = 1;
|
||||||
{
|
if(after_passthrough_option == 0)
|
||||||
if(str8_match(node->string, str8_lit("--"), 0))
|
{
|
||||||
{
|
if(str8_match(node->string, str8_lit("--"), 0))
|
||||||
after_passthrough_option = 1;
|
{
|
||||||
is_option = 0;
|
after_passthrough_option = 1;
|
||||||
}
|
is_option = 0;
|
||||||
else if(str8_match(str8_prefix(node->string, 2), str8_lit("--"), 0))
|
}
|
||||||
{
|
else if(str8_match(str8_prefix(node->string, 2), str8_lit("--"), 0))
|
||||||
option_name = str8_skip(option_name, 2);
|
{
|
||||||
}
|
option_name = str8_skip(option_name, 2);
|
||||||
else if(str8_match(str8_prefix(node->string, 1), str8_lit("-"), 0))
|
}
|
||||||
{
|
else if(str8_match(str8_prefix(node->string, 1), str8_lit("-"), 0))
|
||||||
option_name = str8_skip(option_name, 1);
|
{
|
||||||
}
|
option_name = str8_skip(option_name, 1);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
is_option = 0;
|
{
|
||||||
}
|
is_option = 0;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
is_option = 0;
|
{
|
||||||
}
|
is_option = 0;
|
||||||
|
}
|
||||||
// NOTE(rjf): This string is an option.
|
|
||||||
if(is_option)
|
// NOTE(rjf): This string is an option.
|
||||||
{
|
if(is_option)
|
||||||
B32 has_arguments = 0;
|
{
|
||||||
U64 arg_signifier_position1 = str8_find_needle(option_name, 0, str8_lit(":"), 0);
|
B32 has_arguments = 0;
|
||||||
U64 arg_signifier_position2 = str8_find_needle(option_name, 0, str8_lit("="), 0);
|
U64 arg_signifier_position1 = str8_find_needle(option_name, 0, str8_lit(":"), 0);
|
||||||
U64 arg_signifier_position = Min(arg_signifier_position1, arg_signifier_position2);
|
U64 arg_signifier_position2 = str8_find_needle(option_name, 0, str8_lit("="), 0);
|
||||||
String8 arg_portion_this_string = str8_skip(option_name, arg_signifier_position+1);
|
U64 arg_signifier_position = Min(arg_signifier_position1, arg_signifier_position2);
|
||||||
if(arg_signifier_position < option_name.size)
|
String8 arg_portion_this_string = str8_skip(option_name, arg_signifier_position+1);
|
||||||
{
|
if(arg_signifier_position < option_name.size)
|
||||||
has_arguments = 1;
|
{
|
||||||
}
|
has_arguments = 1;
|
||||||
option_name = str8_prefix(option_name, arg_signifier_position);
|
}
|
||||||
|
option_name = str8_prefix(option_name, arg_signifier_position);
|
||||||
String8List arguments = {0};
|
|
||||||
|
String8List arguments = {0};
|
||||||
// NOTE(rjf): Parse arguments.
|
|
||||||
if(has_arguments)
|
// NOTE(rjf): Parse arguments.
|
||||||
{
|
if(has_arguments)
|
||||||
for(String8Node *n = node; n; n = n->next)
|
{
|
||||||
{
|
for(String8Node *n = node; n; n = n->next)
|
||||||
next = n->next;
|
{
|
||||||
|
next = n->next;
|
||||||
String8 string = n->string;
|
|
||||||
if(n == node)
|
String8 string = n->string;
|
||||||
{
|
if(n == node)
|
||||||
string = arg_portion_this_string;
|
{
|
||||||
}
|
string = arg_portion_this_string;
|
||||||
|
}
|
||||||
U8 splits[] = { ',' };
|
|
||||||
String8List args_in_this_string = str8_split(arena, string, splits, ArrayCount(splits), 0);
|
U8 splits[] = { ',' };
|
||||||
for(String8Node *sub_arg = args_in_this_string.first; sub_arg; sub_arg = sub_arg->next)
|
String8List args_in_this_string = str8_split(arena, string, splits, ArrayCount(splits), 0);
|
||||||
{
|
for(String8Node *sub_arg = args_in_this_string.first; sub_arg; sub_arg = sub_arg->next)
|
||||||
str8_list_push(arena, &arguments, sub_arg->string);
|
{
|
||||||
}
|
str8_list_push(arena, &arguments, sub_arg->string);
|
||||||
if(!str8_match(str8_postfix(n->string, 1), str8_lit(","), 0) &&
|
}
|
||||||
(n != node || arg_portion_this_string.size != 0))
|
if(!str8_match(str8_postfix(n->string, 1), str8_lit(","), 0) &&
|
||||||
{
|
(n != node || arg_portion_this_string.size != 0))
|
||||||
break;
|
{
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// NOTE(rjf): Register config variable.
|
|
||||||
cmd_line_insert_opt(arena, &parsed, option_name, arguments);
|
// NOTE(rjf): Register config variable.
|
||||||
}
|
cmd_line_insert_opt(arena, &parsed, option_name, arguments);
|
||||||
|
}
|
||||||
// NOTE(rjf): Default path, treat as a passthrough config option to be
|
|
||||||
// handled by tool-specific code.
|
// NOTE(rjf): Default path, treat as a passthrough config option to be
|
||||||
else if(!str8_match(node->string, str8_lit("--"), 0))
|
// handled by tool-specific code.
|
||||||
{
|
else if(!str8_match(node->string, str8_lit("--"), 0) || !first_passthrough)
|
||||||
str8_list_push(arena, &parsed.inputs, node->string);
|
{
|
||||||
after_passthrough_option = 1;
|
str8_list_push(arena, &parsed.inputs, node->string);
|
||||||
}
|
after_passthrough_option = 1;
|
||||||
}
|
first_passthrough = 0;
|
||||||
|
}
|
||||||
return parsed;
|
}
|
||||||
}
|
|
||||||
|
return parsed;
|
||||||
internal CmdLineOpt *
|
}
|
||||||
cmd_line_opt_from_string(CmdLine *cmd_line, String8 name)
|
|
||||||
{
|
internal CmdLineOpt *
|
||||||
return cmd_line_opt_from_slot(cmd_line_slot_from_string(cmd_line, name), name);
|
cmd_line_opt_from_string(CmdLine *cmd_line, String8 name)
|
||||||
}
|
{
|
||||||
|
return cmd_line_opt_from_slot(cmd_line_slot_from_string(cmd_line, name), name);
|
||||||
internal String8List
|
}
|
||||||
cmd_line_strings(CmdLine *cmd_line, String8 name)
|
|
||||||
{
|
internal String8List
|
||||||
String8List result = {0};
|
cmd_line_strings(CmdLine *cmd_line, String8 name)
|
||||||
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
{
|
||||||
if(var != 0)
|
String8List result = {0};
|
||||||
{
|
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
||||||
result = var->value_strings;
|
if(var != 0)
|
||||||
}
|
{
|
||||||
return result;
|
result = var->value_strings;
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
internal String8
|
}
|
||||||
cmd_line_string(CmdLine *cmd_line, String8 name)
|
|
||||||
{
|
internal String8
|
||||||
String8 result = {0};
|
cmd_line_string(CmdLine *cmd_line, String8 name)
|
||||||
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
{
|
||||||
if(var != 0)
|
String8 result = {0};
|
||||||
{
|
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
||||||
result = var->value_string;
|
if(var != 0)
|
||||||
}
|
{
|
||||||
return result;
|
result = var->value_string;
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
internal B32
|
}
|
||||||
cmd_line_has_flag(CmdLine *cmd_line, String8 name)
|
|
||||||
{
|
internal B32
|
||||||
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
cmd_line_has_flag(CmdLine *cmd_line, String8 name)
|
||||||
return(var != 0);
|
{
|
||||||
}
|
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
||||||
|
return(var != 0);
|
||||||
internal B32
|
}
|
||||||
cmd_line_has_argument(CmdLine *cmd_line, String8 name)
|
|
||||||
{
|
internal B32
|
||||||
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
cmd_line_has_argument(CmdLine *cmd_line, String8 name)
|
||||||
return(var != 0 && var->value_strings.node_count > 0);
|
{
|
||||||
}
|
CmdLineOpt *var = cmd_line_opt_from_string(cmd_line, name);
|
||||||
|
return(var != 0 && var->value_strings.node_count > 0);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,54 +1,54 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_COMMAND_LINE_H
|
#ifndef BASE_COMMAND_LINE_H
|
||||||
#define BASE_COMMAND_LINE_H
|
#define BASE_COMMAND_LINE_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Parsed Command Line Types
|
//~ rjf: Parsed Command Line Types
|
||||||
|
|
||||||
typedef struct CmdLineOpt CmdLineOpt;
|
typedef struct CmdLineOpt CmdLineOpt;
|
||||||
struct CmdLineOpt
|
struct CmdLineOpt
|
||||||
{
|
{
|
||||||
CmdLineOpt *next;
|
CmdLineOpt *next;
|
||||||
CmdLineOpt *hash_next;
|
CmdLineOpt *hash_next;
|
||||||
U64 hash;
|
U64 hash;
|
||||||
String8 string;
|
String8 string;
|
||||||
String8List value_strings;
|
String8List value_strings;
|
||||||
String8 value_string;
|
String8 value_string;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct CmdLineOptList CmdLineOptList;
|
typedef struct CmdLineOptList CmdLineOptList;
|
||||||
struct CmdLineOptList
|
struct CmdLineOptList
|
||||||
{
|
{
|
||||||
U64 count;
|
U64 count;
|
||||||
CmdLineOpt *first;
|
CmdLineOpt *first;
|
||||||
CmdLineOpt *last;
|
CmdLineOpt *last;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct CmdLine CmdLine;
|
typedef struct CmdLine CmdLine;
|
||||||
struct CmdLine
|
struct CmdLine
|
||||||
{
|
{
|
||||||
String8 exe_name;
|
String8 exe_name;
|
||||||
CmdLineOptList options;
|
CmdLineOptList options;
|
||||||
String8List inputs;
|
String8List inputs;
|
||||||
U64 option_table_size;
|
U64 option_table_size;
|
||||||
CmdLineOpt **option_table;
|
CmdLineOpt **option_table;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(rjf): Command Line Option Parsing
|
//~ NOTE(rjf): Command Line Option Parsing
|
||||||
|
|
||||||
internal U64 cmd_line_hash_from_string(String8 string);
|
internal U64 cmd_line_hash_from_string(String8 string);
|
||||||
internal CmdLineOpt** cmd_line_slot_from_string(CmdLine *cmd_line, String8 string);
|
internal CmdLineOpt** cmd_line_slot_from_string(CmdLine *cmd_line, String8 string);
|
||||||
internal CmdLineOpt* cmd_line_opt_from_slot(CmdLineOpt **slot, String8 string);
|
internal CmdLineOpt* cmd_line_opt_from_slot(CmdLineOpt **slot, String8 string);
|
||||||
internal void cmd_line_push_opt(CmdLineOptList *list, CmdLineOpt *var);
|
internal void cmd_line_push_opt(CmdLineOptList *list, CmdLineOpt *var);
|
||||||
internal CmdLineOpt* cmd_line_insert_opt(Arena *arena, CmdLine *cmd_line, String8 string, String8List values);
|
internal CmdLineOpt* cmd_line_insert_opt(Arena *arena, CmdLine *cmd_line, String8 string, String8List values);
|
||||||
internal CmdLine cmd_line_from_string_list(Arena *arena, String8List arguments);
|
internal CmdLine cmd_line_from_string_list(Arena *arena, String8List arguments);
|
||||||
internal CmdLineOpt* cmd_line_opt_from_string(CmdLine *cmd_line, String8 name);
|
internal CmdLineOpt* cmd_line_opt_from_string(CmdLine *cmd_line, String8 name);
|
||||||
internal String8List cmd_line_strings(CmdLine *cmd_line, String8 name);
|
internal String8List cmd_line_strings(CmdLine *cmd_line, String8 name);
|
||||||
internal String8 cmd_line_string(CmdLine *cmd_line, String8 name);
|
internal String8 cmd_line_string(CmdLine *cmd_line, String8 name);
|
||||||
internal B32 cmd_line_has_flag(CmdLine *cmd_line, String8 name);
|
internal B32 cmd_line_has_flag(CmdLine *cmd_line, String8 name);
|
||||||
internal B32 cmd_line_has_argument(CmdLine *cmd_line, String8 name);
|
internal B32 cmd_line_has_argument(CmdLine *cmd_line, String8 name);
|
||||||
|
|
||||||
#endif // BASE_COMMAND_LINE_H
|
#endif // BASE_COMMAND_LINE_H
|
||||||
|
|||||||
+247
-237
@@ -1,237 +1,247 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_CONTEXT_CRACKING_H
|
#ifndef BASE_CONTEXT_CRACKING_H
|
||||||
#define BASE_CONTEXT_CRACKING_H
|
#define BASE_CONTEXT_CRACKING_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Clang OS/Arch Cracking
|
//~ rjf: Clang OS/Arch Cracking
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
|
|
||||||
# define COMPILER_CLANG 1
|
# define COMPILER_CLANG 1
|
||||||
|
|
||||||
# if defined(_WIN32)
|
# if defined(_WIN32)
|
||||||
# define OS_WINDOWS 1
|
# define OS_WINDOWS 1
|
||||||
# elif defined(__gnu_linux__) || defined(__linux__)
|
# elif defined(__gnu_linux__) || defined(__linux__)
|
||||||
# define OS_LINUX 1
|
# define OS_LINUX 1
|
||||||
# elif defined(__APPLE__) && defined(__MACH__)
|
# elif defined(__APPLE__) && defined(__MACH__)
|
||||||
# define OS_MAC 1
|
# define OS_MAC 1
|
||||||
# else
|
# else
|
||||||
# error This compiler/OS combo is not supported.
|
# error This compiler/OS combo is not supported.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
|
# if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
|
||||||
# define ARCH_X64 1
|
# define ARCH_X64 1
|
||||||
# elif defined(i386) || defined(__i386) || defined(__i386__)
|
# elif defined(i386) || defined(__i386) || defined(__i386__)
|
||||||
# define ARCH_X86 1
|
# define ARCH_X86 1
|
||||||
# elif defined(__aarch64__)
|
# elif defined(__aarch64__)
|
||||||
# define ARCH_ARM64 1
|
# define ARCH_ARM64 1
|
||||||
# elif defined(__arm__)
|
# elif defined(__arm__)
|
||||||
# define ARCH_ARM32 1
|
# define ARCH_ARM32 1
|
||||||
# else
|
# else
|
||||||
# error Architecture not supported.
|
# error Architecture not supported.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: MSVC OS/Arch Cracking
|
//~ rjf: MSVC OS/Arch Cracking
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
|
|
||||||
# define COMPILER_MSVC 1
|
# define COMPILER_MSVC 1
|
||||||
|
|
||||||
# if _MSC_VER >= 1920
|
# if _MSC_VER >= 1920
|
||||||
# define COMPILER_MSVC_YEAR 2019
|
# define COMPILER_MSVC_YEAR 2019
|
||||||
# elif _MSC_VER >= 1910
|
# elif _MSC_VER >= 1910
|
||||||
# define COMPILER_MSVC_YEAR 2017
|
# define COMPILER_MSVC_YEAR 2017
|
||||||
# elif _MSC_VER >= 1900
|
# elif _MSC_VER >= 1900
|
||||||
# define COMPILER_MSVC_YEAR 2015
|
# define COMPILER_MSVC_YEAR 2015
|
||||||
# elif _MSC_VER >= 1800
|
# elif _MSC_VER >= 1800
|
||||||
# define COMPILER_MSVC_YEAR 2013
|
# define COMPILER_MSVC_YEAR 2013
|
||||||
# elif _MSC_VER >= 1700
|
# elif _MSC_VER >= 1700
|
||||||
# define COMPILER_MSVC_YEAR 2012
|
# define COMPILER_MSVC_YEAR 2012
|
||||||
# elif _MSC_VER >= 1600
|
# elif _MSC_VER >= 1600
|
||||||
# define COMPILER_MSVC_YEAR 2010
|
# define COMPILER_MSVC_YEAR 2010
|
||||||
# elif _MSC_VER >= 1500
|
# elif _MSC_VER >= 1500
|
||||||
# define COMPILER_MSVC_YEAR 2008
|
# define COMPILER_MSVC_YEAR 2008
|
||||||
# elif _MSC_VER >= 1400
|
# elif _MSC_VER >= 1400
|
||||||
# define COMPILER_MSVC_YEAR 2005
|
# define COMPILER_MSVC_YEAR 2005
|
||||||
# else
|
# else
|
||||||
# define COMPILER_MSVC_YEAR 0
|
# define COMPILER_MSVC_YEAR 0
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(_WIN32)
|
# if defined(_WIN32)
|
||||||
# define OS_WINDOWS 1
|
# define OS_WINDOWS 1
|
||||||
# else
|
# else
|
||||||
# error This compiler/OS combo is not supported.
|
# error This compiler/OS combo is not supported.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(_M_AMD64)
|
# if defined(_M_AMD64)
|
||||||
# define ARCH_X64 1
|
# define ARCH_X64 1
|
||||||
# elif defined(_M_IX86)
|
# elif defined(_M_IX86)
|
||||||
# define ARCH_X86 1
|
# define ARCH_X86 1
|
||||||
# elif defined(_M_ARM64)
|
# elif defined(_M_ARM64)
|
||||||
# define ARCH_ARM64 1
|
# define ARCH_ARM64 1
|
||||||
# elif defined(_M_ARM)
|
# elif defined(_M_ARM)
|
||||||
# define ARCH_ARM32 1
|
# define ARCH_ARM32 1
|
||||||
# else
|
# else
|
||||||
# error Architecture not supported.
|
# error Architecture not supported.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: GCC OS/Arch Cracking
|
//~ rjf: GCC OS/Arch Cracking
|
||||||
|
|
||||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||||
|
|
||||||
# define COMPILER_GCC 1
|
# define COMPILER_GCC 1
|
||||||
|
|
||||||
# if defined(__gnu_linux__) || defined(__linux__)
|
# if defined(__gnu_linux__) || defined(__linux__)
|
||||||
# define OS_LINUX 1
|
# define OS_LINUX 1
|
||||||
# else
|
# else
|
||||||
# error This compiler/OS combo is not supported.
|
# error This compiler/OS combo is not supported.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
|
# if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)
|
||||||
# define ARCH_X64 1
|
# define ARCH_X64 1
|
||||||
# elif defined(i386) || defined(__i386) || defined(__i386__)
|
# elif defined(i386) || defined(__i386) || defined(__i386__)
|
||||||
# define ARCH_X86 1
|
# define ARCH_X86 1
|
||||||
# elif defined(__aarch64__)
|
# elif defined(__aarch64__)
|
||||||
# define ARCH_ARM64 1
|
# define ARCH_ARM64 1
|
||||||
# elif defined(__arm__)
|
# elif defined(__arm__)
|
||||||
# define ARCH_ARM32 1
|
# define ARCH_ARM32 1
|
||||||
# else
|
# else
|
||||||
# error Architecture not supported.
|
# error Architecture not supported.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# error Compiler not supported.
|
# error Compiler not supported.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Arch Cracking
|
//~ rjf: Arch Cracking
|
||||||
|
|
||||||
#if defined(ARCH_X64)
|
#if defined(ARCH_X64)
|
||||||
# define ARCH_64BIT 1
|
# define ARCH_64BIT 1
|
||||||
#elif defined(ARCH_X86)
|
#elif defined(ARCH_X86)
|
||||||
# define ARCH_32BIT 1
|
# define ARCH_32BIT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ARCH_ARM32 || ARCH_ARM64 || ARCH_X64 || ARCH_X86
|
#if ARCH_ARM32 || ARCH_ARM64 || ARCH_X64 || ARCH_X86
|
||||||
# define ARCH_LITTLE_ENDIAN 1
|
# define ARCH_LITTLE_ENDIAN 1
|
||||||
#else
|
#else
|
||||||
# error Endianness of this architecture not understood by context cracker.
|
# error Endianness of this architecture not understood by context cracker.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Language Cracking
|
//~ rjf: Language Cracking
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
# define LANG_CPP 1
|
# define LANG_CPP 1
|
||||||
#else
|
#else
|
||||||
# define LANG_C 1
|
# define LANG_C 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Build Option Cracking
|
//~ rjf: Build Option Cracking
|
||||||
|
|
||||||
#if !defined(BUILD_DEBUG)
|
#if !defined(BUILD_DEBUG)
|
||||||
# define BUILD_DEBUG 1
|
# define BUILD_DEBUG 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_SUPPLEMENTARY_UNIT)
|
#if !defined(BUILD_SUPPLEMENTARY_UNIT)
|
||||||
# define BUILD_SUPPLEMENTARY_UNIT 0
|
# define BUILD_SUPPLEMENTARY_UNIT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_ENTRY_DEFINING_UNIT)
|
#if !defined(BUILD_ENTRY_DEFINING_UNIT)
|
||||||
# define BUILD_ENTRY_DEFINING_UNIT 1
|
# define BUILD_ENTRY_DEFINING_UNIT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_CONSOLE_INTERFACE)
|
#if !defined(BUILD_CONSOLE_INTERFACE)
|
||||||
# define BUILD_CONSOLE_INTERFACE 0
|
# define BUILD_CONSOLE_INTERFACE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_VERSION_MAJOR)
|
#if !defined(BUILD_VERSION_MAJOR)
|
||||||
# define BUILD_VERSION_MAJOR 0
|
# define BUILD_VERSION_MAJOR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_VERSION_MINOR)
|
#if !defined(BUILD_VERSION_MINOR)
|
||||||
# define BUILD_VERSION_MINOR 0
|
# define BUILD_VERSION_MINOR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_VERSION_PATCH)
|
#if !defined(BUILD_VERSION_PATCH)
|
||||||
# define BUILD_VERSION_PATCH 0
|
# define BUILD_VERSION_PATCH 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUILD_VERSION_STRING_LITERAL Stringify(BUILD_VERSION_MAJOR) "." Stringify(BUILD_VERSION_MINOR) "." Stringify(BUILD_VERSION_PATCH)
|
#define BUILD_VERSION_STRING_LITERAL Stringify(BUILD_VERSION_MAJOR) "." Stringify(BUILD_VERSION_MINOR) "." Stringify(BUILD_VERSION_PATCH)
|
||||||
#if BUILD_DEBUG
|
#if BUILD_DEBUG
|
||||||
# define BUILD_MODE_STRING_LITERAL_APPEND " [Debug]"
|
# define BUILD_MODE_STRING_LITERAL_APPEND " [Debug]"
|
||||||
#else
|
#else
|
||||||
# define BUILD_MODE_STRING_LITERAL_APPEND ""
|
# define BUILD_MODE_STRING_LITERAL_APPEND ""
|
||||||
#endif
|
#endif
|
||||||
#if defined(BUILD_GIT_HASH)
|
#if defined(BUILD_GIT_HASH)
|
||||||
# define BUILD_GIT_HASH_STRING_LITERAL_APPEND " [" BUILD_GIT_HASH "]"
|
# define BUILD_GIT_HASH_STRING_LITERAL_APPEND " [" BUILD_GIT_HASH "]"
|
||||||
#else
|
#else
|
||||||
# define BUILD_GIT_HASH_STRING_LITERAL_APPEND ""
|
# define BUILD_GIT_HASH_STRING_LITERAL_APPEND ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_TITLE)
|
#if !defined(BUILD_TITLE)
|
||||||
# define BUILD_TITLE "Untitled"
|
# define BUILD_TITLE "Untitled"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_RELEASE_PHASE_STRING_LITERAL)
|
#if !defined(BUILD_RELEASE_PHASE_STRING_LITERAL)
|
||||||
# define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
# define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BUILD_ISSUES_LINK_STRING_LITERAL)
|
#if !defined(BUILD_ISSUES_LINK_STRING_LITERAL)
|
||||||
# define BUILD_ISSUES_LINK_STRING_LITERAL "https://github.com/EpicGames/raddebugger/issues"
|
# define BUILD_ISSUES_LINK_STRING_LITERAL "https://github.com/EpicGamesExt/raddebugger/issues"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUILD_TITLE_STRING_LITERAL BUILD_TITLE " (" BUILD_VERSION_STRING_LITERAL " " BUILD_RELEASE_PHASE_STRING_LITERAL ") - " __DATE__ "" BUILD_GIT_HASH_STRING_LITERAL_APPEND BUILD_MODE_STRING_LITERAL_APPEND
|
#define BUILD_TITLE_STRING_LITERAL BUILD_TITLE " (" BUILD_VERSION_STRING_LITERAL " " BUILD_RELEASE_PHASE_STRING_LITERAL ") - " __DATE__ "" BUILD_GIT_HASH_STRING_LITERAL_APPEND BUILD_MODE_STRING_LITERAL_APPEND
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Zero All Undefined Options
|
//~ rjf: Zero All Undefined Options
|
||||||
|
|
||||||
#if !defined(ARCH_32BIT)
|
#if !defined(ARCH_32BIT)
|
||||||
# define ARCH_32BIT 0
|
# define ARCH_32BIT 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(ARCH_64BIT)
|
#if !defined(ARCH_64BIT)
|
||||||
# define ARCH_64BIT 0
|
# define ARCH_64BIT 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(ARCH_X64)
|
#if !defined(ARCH_X64)
|
||||||
# define ARCH_X64 0
|
# define ARCH_X64 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(ARCH_X86)
|
#if !defined(ARCH_X86)
|
||||||
# define ARCH_X86 0
|
# define ARCH_X86 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(ARCH_ARM64)
|
#if !defined(ARCH_ARM64)
|
||||||
# define ARCH_ARM64 0
|
# define ARCH_ARM64 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(ARCH_ARM32)
|
#if !defined(ARCH_ARM32)
|
||||||
# define ARCH_ARM32 0
|
# define ARCH_ARM32 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(COMPILER_MSVC)
|
#if !defined(COMPILER_MSVC)
|
||||||
# define COMPILER_MSVC 0
|
# define COMPILER_MSVC 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(COMPILER_GCC)
|
#if !defined(COMPILER_GCC)
|
||||||
# define COMPILER_GCC 0
|
# define COMPILER_GCC 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(COMPILER_CLANG)
|
#if !defined(COMPILER_CLANG)
|
||||||
# define COMPILER_CLANG 0
|
# define COMPILER_CLANG 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(OS_WINDOWS)
|
#if !defined(OS_WINDOWS)
|
||||||
# define OS_WINDOWS 0
|
# define OS_WINDOWS 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(OS_LINUX)
|
#if !defined(OS_LINUX)
|
||||||
# define OS_LINUX 0
|
# define OS_LINUX 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(OS_MAC)
|
#if !defined(OS_MAC)
|
||||||
# define OS_MAC 0
|
# define OS_MAC 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(LANG_CPP)
|
#if !defined(LANG_CPP)
|
||||||
# define LANG_CPP 0
|
# define LANG_CPP 0
|
||||||
#endif
|
#endif
|
||||||
#if !defined(LANG_C)
|
#if !defined(LANG_C)
|
||||||
# define LANG_C 0
|
# define LANG_C 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // BASE_CONTEXT_CRACKING_H
|
////////////////////////////////
|
||||||
|
//~ rjf: Unsupported Errors
|
||||||
|
|
||||||
|
#if ARCH_X86
|
||||||
|
# error You tried to build in x86 (32 bit) mode, but currently, only building in x64 (64 bit) mode is supported.
|
||||||
|
#endif
|
||||||
|
#if !ARCH_X64
|
||||||
|
# error You tried to build with an unsupported architecture. Currently, only building in x64 mode is supported.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BASE_CONTEXT_CRACKING_H
|
||||||
|
|||||||
+562
-562
File diff suppressed because it is too large
Load Diff
+811
-768
File diff suppressed because it is too large
Load Diff
+127
-95
@@ -1,95 +1,127 @@
|
|||||||
internal void
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
main_thread_base_entry_point(void (*entry_point)(CmdLine *cmdline), char **arguments, U64 arguments_count)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
{
|
|
||||||
#if PROFILE_TELEMETRY
|
internal void
|
||||||
local_persist U8 tm_data[MB(64)];
|
main_thread_base_entry_point(void (*entry_point)(CmdLine *cmdline), char **arguments, U64 arguments_count)
|
||||||
tmLoadLibrary(TM_RELEASE);
|
{
|
||||||
tmSetMaxThreadCount(256);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
tmInitialize(sizeof(tm_data), (char *)tm_data);
|
ThreadNameF("[main thread]");
|
||||||
#endif
|
|
||||||
TCTX tctx;
|
//- rjf: set up telemetry
|
||||||
tctx_init_and_equip(&tctx);
|
#if PROFILE_TELEMETRY
|
||||||
ThreadNameF("[main thread]");
|
local_persist U8 tm_data[MB(64)];
|
||||||
Temp scratch = scratch_begin(0, 0);
|
tmLoadLibrary(TM_RELEASE);
|
||||||
String8List command_line_argument_strings = os_string_list_from_argcv(scratch.arena, (int)arguments_count, arguments);
|
tmSetMaxThreadCount(256);
|
||||||
CmdLine cmdline = cmd_line_from_string_list(scratch.arena, command_line_argument_strings);
|
tmInitialize(sizeof(tm_data), (char *)tm_data);
|
||||||
B32 capture = cmd_line_has_flag(&cmdline, str8_lit("capture"));
|
#endif
|
||||||
if(capture)
|
|
||||||
{
|
//- rjf: parse command line
|
||||||
ProfBeginCapture(arguments[0]);
|
String8List command_line_argument_strings = os_string_list_from_argcv(scratch.arena, (int)arguments_count, arguments);
|
||||||
}
|
CmdLine cmdline = cmd_line_from_string_list(scratch.arena, command_line_argument_strings);
|
||||||
#if defined(OS_CORE_H)
|
|
||||||
os_init();
|
//- rjf: begin captures
|
||||||
#endif
|
B32 capture = cmd_line_has_flag(&cmdline, str8_lit("capture"));
|
||||||
#if defined(TASK_SYSTEM_H)
|
if(capture)
|
||||||
ts_init();
|
{
|
||||||
#endif
|
ProfBeginCapture(arguments[0]);
|
||||||
#if defined(HASH_STORE_H)
|
}
|
||||||
hs_init();
|
|
||||||
#endif
|
//- rjf: initialize all included layers
|
||||||
#if defined(FILE_STREAM_H)
|
#if defined(TASK_SYSTEM_H) && !defined(TS_INIT_MANUAL)
|
||||||
fs_init();
|
ts_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(TEXT_CACHE_H)
|
#if defined(HASH_STORE_H) && !defined(HS_INIT_MANUAL)
|
||||||
txt_init();
|
hs_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(DASM_CACHE_H)
|
#if defined(FILE_STREAM_H) && !defined(FS_INIT_MANUAL)
|
||||||
dasm_init();
|
fs_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(DBGI_H)
|
#if defined(TEXT_CACHE_H) && !defined(TXT_INIT_MANUAL)
|
||||||
dbgi_init();
|
txt_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(TXTI_H)
|
#if defined(MUTABLE_TEXT_H) && !defined(MTX_INIT_MANUAL)
|
||||||
txti_init();
|
mtx_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(DEMON_CORE_H)
|
#if defined(DASM_CACHE_H) && !defined(DASM_INIT_MANUAL)
|
||||||
dmn_init();
|
dasm_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(CTRL_CORE_H)
|
#if defined(DBGI_H) && !defined(DBGI_INIT_MANUAL)
|
||||||
ctrl_init();
|
di_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(DASM_H)
|
#if defined(FUZZY_SEARCH_H) && !defined(FZY_INIT_MANUAL)
|
||||||
dasmi_init();
|
fzy_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(OS_GRAPHICAL_H)
|
#if defined(DEMON_CORE_H) && !defined(DMN_INIT_MANUAL)
|
||||||
os_graphical_init();
|
dmn_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(FONT_PROVIDER_H)
|
#if defined(CTRL_CORE_H) && !defined(CTRL_INIT_MANUAL)
|
||||||
fp_init();
|
ctrl_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(RENDER_CORE_H)
|
#if defined(OS_GFX_H) && !defined(OS_GFX_INIT_MANUAL)
|
||||||
r_init(&cmdline);
|
os_gfx_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(TEXTURE_CACHE_H)
|
#if defined(FONT_PROVIDER_H) && !defined(FP_INIT_MANUAL)
|
||||||
tex_init();
|
fp_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(GEO_CACHE_H)
|
#if defined(RENDER_CORE_H) && !defined(R_INIT_MANUAL)
|
||||||
geo_init();
|
r_init(&cmdline);
|
||||||
#endif
|
#endif
|
||||||
#if defined(FONT_CACHE_H)
|
#if defined(TEXTURE_CACHE_H) && !defined(TEX_INIT_MANUAL)
|
||||||
f_init();
|
tex_init();
|
||||||
#endif
|
#endif
|
||||||
#if defined(DF_CORE_H)
|
#if defined(GEO_CACHE_H) && !defined(GEO_INIT_MANUAL)
|
||||||
DF_StateDeltaHistory *hist = df_state_delta_history_alloc();
|
geo_init();
|
||||||
df_core_init(&cmdline, hist);
|
#endif
|
||||||
#endif
|
#if defined(FONT_CACHE_H) && !defined(FNT_INIT_MANUAL)
|
||||||
#if defined(DF_GFX_H)
|
fnt_init();
|
||||||
df_gfx_init(update_and_render, df_state_delta_history());
|
#endif
|
||||||
#endif
|
#if defined(DBG_ENGINE_CORE_H) && !defined(D_INIT_MANUAL)
|
||||||
entry_point(&cmdline);
|
d_init();
|
||||||
if(capture)
|
#endif
|
||||||
{
|
#if defined(RADDBG_CORE_H) && !defined(RD_INIT_MANUAL)
|
||||||
ProfEndCapture();
|
rd_init(&cmdline);
|
||||||
}
|
#endif
|
||||||
scratch_end(scratch);
|
|
||||||
tctx_release();
|
//- rjf: call into entry point
|
||||||
}
|
entry_point(&cmdline);
|
||||||
|
|
||||||
internal void
|
//- rjf: end captures
|
||||||
supplement_thread_base_entry_point(void (*entry_point)(void *params), void *params)
|
if(capture)
|
||||||
{
|
{
|
||||||
TCTX tctx;
|
ProfEndCapture();
|
||||||
tctx_init_and_equip(&tctx);
|
}
|
||||||
entry_point(params);
|
scratch_end(scratch);
|
||||||
tctx_release();
|
}
|
||||||
}
|
|
||||||
|
internal void
|
||||||
|
supplement_thread_base_entry_point(void (*entry_point)(void *params), void *params)
|
||||||
|
{
|
||||||
|
TCTX tctx;
|
||||||
|
tctx_init_and_equip(&tctx);
|
||||||
|
entry_point(params);
|
||||||
|
tctx_release();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
update(void)
|
||||||
|
{
|
||||||
|
ProfTick(0);
|
||||||
|
#if defined(TEXT_CACHE_H)
|
||||||
|
txt_user_clock_tick();
|
||||||
|
#endif
|
||||||
|
#if defined(DASM_CACHE_H)
|
||||||
|
dasm_user_clock_tick();
|
||||||
|
#endif
|
||||||
|
#if defined(GEO_CACHE_H)
|
||||||
|
geo_user_clock_tick();
|
||||||
|
#endif
|
||||||
|
#if defined(TEXTURE_CACHE_H)
|
||||||
|
tex_user_clock_tick();
|
||||||
|
#endif
|
||||||
|
#if OS_FEATURE_GRAPHICAL
|
||||||
|
B32 result = frame();
|
||||||
|
#else
|
||||||
|
B32 result = 0;
|
||||||
|
#endif
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|||||||
+11
-10
@@ -1,10 +1,11 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_ENTRY_POINT_H
|
#ifndef BASE_ENTRY_POINT_H
|
||||||
#define BASE_ENTRY_POINT_H
|
#define BASE_ENTRY_POINT_H
|
||||||
|
|
||||||
internal void main_thread_base_entry_point(void (*entry_point)(CmdLine *cmdline), char **arguments, U64 arguments_count);
|
internal void main_thread_base_entry_point(void (*entry_point)(CmdLine *cmdline), char **arguments, U64 arguments_count);
|
||||||
internal void supplement_thread_base_entry_point(void (*entry_point)(void *params), void *params);
|
internal void supplement_thread_base_entry_point(void (*entry_point)(void *params), void *params);
|
||||||
|
internal B32 update(void);
|
||||||
#endif // BASE_ENTRY_POINT_H
|
|
||||||
|
#endif // BASE_ENTRY_POINT_H
|
||||||
|
|||||||
+20
-18
@@ -1,18 +1,20 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Base Includes
|
//~ rjf: Base Includes
|
||||||
|
|
||||||
#undef RADDBG_LAYER_COLOR
|
#undef MARKUP_LAYER_COLOR
|
||||||
#define RADDBG_LAYER_COLOR 0.20f, 0.60f, 0.80f
|
#define MARKUP_LAYER_COLOR 0.20f, 0.60f, 0.80f
|
||||||
|
|
||||||
#include "base_core.c"
|
#include "base_core.c"
|
||||||
#include "base_profile.c"
|
#include "base_profile.c"
|
||||||
#include "base_arena.c"
|
#include "base_arena.c"
|
||||||
#include "base_math.c"
|
#include "base_math.c"
|
||||||
#include "base_strings.c"
|
#include "base_strings.c"
|
||||||
#include "base_thread_context.c"
|
#include "base_thread_context.c"
|
||||||
#include "base_command_line.c"
|
#include "base_command_line.c"
|
||||||
#include "base_markup.c"
|
#include "base_markup.c"
|
||||||
#include "base_entry_point.c"
|
#include "base_meta.c"
|
||||||
|
#include "base_log.c"
|
||||||
|
#include "base_entry_point.c"
|
||||||
|
|||||||
+24
-22
@@ -1,22 +1,24 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_INC_H
|
#ifndef BASE_INC_H
|
||||||
#define BASE_INC_H
|
#define BASE_INC_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Base Includes
|
//~ rjf: Base Includes
|
||||||
|
|
||||||
#include "base_context_cracking.h"
|
#include "base_context_cracking.h"
|
||||||
|
|
||||||
#include "base_core.h"
|
#include "base_core.h"
|
||||||
#include "base_profile.h"
|
#include "base_profile.h"
|
||||||
#include "base_arena.h"
|
#include "base_arena.h"
|
||||||
#include "base_math.h"
|
#include "base_math.h"
|
||||||
#include "base_strings.h"
|
#include "base_strings.h"
|
||||||
#include "base_thread_context.h"
|
#include "base_thread_context.h"
|
||||||
#include "base_command_line.h"
|
#include "base_command_line.h"
|
||||||
#include "base_markup.h"
|
#include "base_markup.h"
|
||||||
#include "base_entry_point.h"
|
#include "base_meta.h"
|
||||||
|
#include "base_log.h"
|
||||||
#endif // BASE_INC_H
|
#include "base_entry_point.h"
|
||||||
|
|
||||||
|
#endif // BASE_INC_H
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Globals/Thread-Locals
|
||||||
|
|
||||||
|
C_LINKAGE thread_static Log *log_active;
|
||||||
|
#if !BUILD_SUPPLEMENTARY_UNIT
|
||||||
|
C_LINKAGE thread_static Log *log_active = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Creation/Selection
|
||||||
|
|
||||||
|
internal Log *
|
||||||
|
log_alloc(void)
|
||||||
|
{
|
||||||
|
Arena *arena = arena_alloc();
|
||||||
|
Log *log = push_array(arena, Log, 1);
|
||||||
|
log->arena = arena;
|
||||||
|
return log;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
log_release(Log *log)
|
||||||
|
{
|
||||||
|
arena_release(log->arena);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
log_select(Log *log)
|
||||||
|
{
|
||||||
|
log_active = log;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Building/Clearing
|
||||||
|
|
||||||
|
internal void
|
||||||
|
log_msg(LogMsgKind kind, String8 string)
|
||||||
|
{
|
||||||
|
if(log_active != 0 && log_active->top_scope != 0)
|
||||||
|
{
|
||||||
|
String8 string_copy = push_str8_copy(log_active->arena, string);
|
||||||
|
str8_list_push(log_active->arena, &log_active->top_scope->strings[kind], string_copy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
log_msgf(LogMsgKind kind, char *fmt, ...)
|
||||||
|
{
|
||||||
|
if(log_active != 0)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(0, 0);
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
String8 string = push_str8fv(scratch.arena, fmt, args);
|
||||||
|
log_msg(kind, string);
|
||||||
|
va_end(args);
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Scopes
|
||||||
|
|
||||||
|
internal void
|
||||||
|
log_scope_begin(void)
|
||||||
|
{
|
||||||
|
if(log_active != 0)
|
||||||
|
{
|
||||||
|
U64 pos = arena_pos(log_active->arena);
|
||||||
|
LogScope *scope = push_array(log_active->arena, LogScope, 1);
|
||||||
|
scope->pos = pos;
|
||||||
|
SLLStackPush(log_active->top_scope, scope);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal LogScopeResult
|
||||||
|
log_scope_end(Arena *arena)
|
||||||
|
{
|
||||||
|
LogScopeResult result = {0};
|
||||||
|
if(log_active != 0)
|
||||||
|
{
|
||||||
|
LogScope *scope = log_active->top_scope;
|
||||||
|
if(scope != 0)
|
||||||
|
{
|
||||||
|
SLLStackPop(log_active->top_scope);
|
||||||
|
if(arena != 0)
|
||||||
|
{
|
||||||
|
for EachEnumVal(LogMsgKind, kind)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
String8 result_unindented = str8_list_join(scratch.arena, &scope->strings[kind], 0);
|
||||||
|
result.strings[kind] = indented_from_string(arena, result_unindented);
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arena_pop_to(log_active->arena, scope->pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
#ifndef BASE_LOG_H
|
||||||
|
#define BASE_LOG_H
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Types
|
||||||
|
|
||||||
|
typedef enum LogMsgKind
|
||||||
|
{
|
||||||
|
LogMsgKind_Info,
|
||||||
|
LogMsgKind_UserError,
|
||||||
|
LogMsgKind_COUNT
|
||||||
|
}
|
||||||
|
LogMsgKind;
|
||||||
|
|
||||||
|
typedef struct LogScope LogScope;
|
||||||
|
struct LogScope
|
||||||
|
{
|
||||||
|
LogScope *next;
|
||||||
|
U64 pos;
|
||||||
|
String8List strings[LogMsgKind_COUNT];
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct LogScopeResult LogScopeResult;
|
||||||
|
struct LogScopeResult
|
||||||
|
{
|
||||||
|
String8 strings[LogMsgKind_COUNT];
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct Log Log;
|
||||||
|
struct Log
|
||||||
|
{
|
||||||
|
Arena *arena;
|
||||||
|
LogScope *top_scope;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Creation/Selection
|
||||||
|
|
||||||
|
internal Log *log_alloc(void);
|
||||||
|
internal void log_release(Log *log);
|
||||||
|
internal void log_select(Log *log);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Building
|
||||||
|
|
||||||
|
internal void log_msg(LogMsgKind kind, String8 string);
|
||||||
|
internal void log_msgf(LogMsgKind kind, char *fmt, ...);
|
||||||
|
#define log_info(s) log_msg(LogMsgKind_Info, (s))
|
||||||
|
#define log_infof(fmt, ...) log_msgf(LogMsgKind_Info, (fmt), __VA_ARGS__)
|
||||||
|
#define log_user_error(s) log_msg(LogMsgKind_UserError, (s))
|
||||||
|
#define log_user_errorf(fmt, ...) log_msgf(LogMsgKind_UserError, (fmt), __VA_ARGS__)
|
||||||
|
|
||||||
|
#define LogInfoNamedBlock(s) DeferLoop(log_infof("%S:\n{\n", (s)), log_infof("}\n"))
|
||||||
|
#define LogInfoNamedBlockF(fmt, ...) DeferLoop((log_infof(fmt, __VA_ARGS__), log_infof(":\n{\n")), log_infof("}\n"))
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Log Scopes
|
||||||
|
|
||||||
|
internal void log_scope_begin(void);
|
||||||
|
internal LogScopeResult log_scope_end(Arena *arena);
|
||||||
|
|
||||||
|
#endif // BASE_LOG_H
|
||||||
+21
-21
@@ -1,21 +1,21 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
thread_name(String8 string)
|
set_thread_name(String8 string)
|
||||||
{
|
{
|
||||||
ProfThreadName("%.*s", str8_varg(string));
|
ProfThreadName("%.*s", str8_varg(string));
|
||||||
os_set_thread_name(string);
|
os_set_thread_name(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
thread_namef(char *fmt, ...)
|
set_thread_namef(char *fmt, ...)
|
||||||
{
|
{
|
||||||
Temp scratch = scratch_begin(0, 0);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
String8 string = push_str8fv(scratch.arena, fmt, args);
|
String8 string = push_str8fv(scratch.arena, fmt, args);
|
||||||
thread_name(string);
|
set_thread_name(string);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-12
@@ -1,12 +1,12 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_MARKUP_H
|
#ifndef BASE_MARKUP_H
|
||||||
#define BASE_MARKUP_H
|
#define BASE_MARKUP_H
|
||||||
|
|
||||||
internal void thread_namef(char *fmt, ...);
|
internal void set_thread_name(String8 string);
|
||||||
internal void thread_name(String8 string);
|
internal void set_thread_namef(char *fmt, ...);
|
||||||
#define ThreadNameF(...) (ProfThreadName(__VA_ARGS__), thread_namef(__VA_ARGS__))
|
#define ThreadNameF(...) (set_thread_namef(__VA_ARGS__))
|
||||||
#define ThreadName(str) (ProfThreadName("%s", str8_varg(str)), thread_name(str))
|
#define ThreadName(str) (set_thread_name(str))
|
||||||
|
|
||||||
#endif // BASE_MARKUP_H
|
#endif // BASE_MARKUP_H
|
||||||
|
|||||||
+616
-616
File diff suppressed because it is too large
Load Diff
+649
-649
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,422 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Info Lookups
|
||||||
|
|
||||||
|
internal Member *
|
||||||
|
member_from_name(Type *type, String8 name)
|
||||||
|
{
|
||||||
|
Member *member = &member_nil;
|
||||||
|
if(type->members != 0 && name.size != 0)
|
||||||
|
{
|
||||||
|
for(U64 idx = 0; idx < type->count; idx += 1)
|
||||||
|
{
|
||||||
|
if(str8_match(type->members[idx].name, name, 0))
|
||||||
|
{
|
||||||
|
member = &type->members[idx];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return member;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Info * Instance Operations
|
||||||
|
|
||||||
|
internal void
|
||||||
|
typed_data_rebase_ptrs(Type *type, String8 data, void *base_ptr)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(0, 0);
|
||||||
|
typedef struct RebaseTypeTask RebaseTypeTask;
|
||||||
|
struct RebaseTypeTask
|
||||||
|
{
|
||||||
|
RebaseTypeTask *next;
|
||||||
|
Type *type;
|
||||||
|
U8 *ptr;
|
||||||
|
};
|
||||||
|
RebaseTypeTask start_task = {0, type, data.str};
|
||||||
|
RebaseTypeTask *first_task = &start_task;
|
||||||
|
RebaseTypeTask *last_task = first_task;
|
||||||
|
for(RebaseTypeTask *t = first_task; t != 0; t = t->next)
|
||||||
|
{
|
||||||
|
switch(t->type->kind)
|
||||||
|
{
|
||||||
|
default:{}break;
|
||||||
|
case TypeKind_Ptr:
|
||||||
|
if(!(t->type->flags & TypeFlag_IsExternal))
|
||||||
|
{
|
||||||
|
*(U64 *)t->ptr = ((U64)(*(U8 **)t->ptr - (U8 *)base_ptr));
|
||||||
|
}break;
|
||||||
|
case TypeKind_Array:
|
||||||
|
{
|
||||||
|
for(U64 idx = 0; idx < t->type->count; idx += 1)
|
||||||
|
{
|
||||||
|
RebaseTypeTask *task = push_array(scratch.arena, RebaseTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->ptr = t->ptr + t->type->direct->size * idx;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case TypeKind_Struct:
|
||||||
|
{
|
||||||
|
for(U64 idx = 0; idx < t->type->count; idx += 1)
|
||||||
|
{
|
||||||
|
Member *member = &t->type->members[idx];
|
||||||
|
RebaseTypeTask *task = push_array(scratch.arena, RebaseTypeTask, 1);
|
||||||
|
task->type = member->type;
|
||||||
|
task->ptr = t->ptr + member->value;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal String8
|
||||||
|
serialized_from_typed_data(Arena *arena, Type *type, String8 data, TypeSerializeParams *params)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
String8List strings = {0};
|
||||||
|
str8_serial_begin(scratch.arena, &strings);
|
||||||
|
{
|
||||||
|
typedef struct SerializeTypeTask SerializeTypeTask;
|
||||||
|
struct SerializeTypeTask
|
||||||
|
{
|
||||||
|
SerializeTypeTask *next;
|
||||||
|
Type *type;
|
||||||
|
U64 count;
|
||||||
|
U8 *src;
|
||||||
|
Type *containing_type;
|
||||||
|
U8 *containing_ptr;
|
||||||
|
B32 is_post_header;
|
||||||
|
};
|
||||||
|
SerializeTypeTask start_task = {0, type, 1, data.str};
|
||||||
|
SerializeTypeTask *first_task = &start_task;
|
||||||
|
SerializeTypeTask *last_task = first_task;
|
||||||
|
for(SerializeTypeTask *t = first_task; t != 0; t = t->next)
|
||||||
|
{
|
||||||
|
switch(t->type->kind)
|
||||||
|
{
|
||||||
|
//- rjf: leaf -> just copy the data directly
|
||||||
|
default:
|
||||||
|
if(TypeKind_FirstLeaf <= t->type->kind && t->type->kind <= TypeKind_LastLeaf)
|
||||||
|
{
|
||||||
|
str8_serial_push_string(scratch.arena, &strings, str8(t->src, t->type->size*t->count));
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: pointers -> try to interpret/understand pointer & read/write, otherwise just write as plain data
|
||||||
|
case TypeKind_Ptr:
|
||||||
|
{
|
||||||
|
// rjf: unpack info about this pointer
|
||||||
|
TypeSerializePtrRefInfo *ptr_ref_info = 0;
|
||||||
|
for(U64 idx = 0; idx < params->ptr_ref_infos_count; idx += 1)
|
||||||
|
{
|
||||||
|
if(params->ptr_ref_infos[idx].type == t->type->direct)
|
||||||
|
{
|
||||||
|
ptr_ref_info = ¶ms->ptr_ref_infos[idx];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: indexification -> subtract base, divide direct size, write index
|
||||||
|
if(ptr_ref_info != 0 && ptr_ref_info->indexify_base != 0)
|
||||||
|
{
|
||||||
|
U64 ptr_value = 0;
|
||||||
|
MemoryCopy(&ptr_value, t->src, sizeof(ptr_value));
|
||||||
|
U64 ptr_write_value = ((U64)((U8 *)ptr_value - (U8 *)ptr_ref_info->indexify_base)/t->type->direct->size);
|
||||||
|
str8_serial_push_struct(scratch.arena, &strings, &ptr_write_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: offsetification -> subtract base, write offsets
|
||||||
|
else if(ptr_ref_info != 0 && ptr_ref_info->offsetify_base != 0)
|
||||||
|
{
|
||||||
|
U64 ptr_value = 0;
|
||||||
|
MemoryCopy(&ptr_value, t->src, sizeof(ptr_value));
|
||||||
|
U64 ptr_write_value = (U64)((U8 *)ptr_value - (U8 *)ptr_ref_info->offsetify_base);
|
||||||
|
str8_serial_push_struct(scratch.arena, &strings, &ptr_write_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: size-by-member (pre-header): still potentially dependent on other members which
|
||||||
|
// delimit our size, so push a new post-header task for pointer.
|
||||||
|
else if(t->type->count_delimiter_name.size != 0 && !t->is_post_header)
|
||||||
|
{
|
||||||
|
SerializeTypeTask *task = push_array(scratch.arena, SerializeTypeTask, 1);
|
||||||
|
task->type = t->type;
|
||||||
|
task->count = t->count;
|
||||||
|
task->src = t->src;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
task->is_post_header = 1;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: size-by-member (post-header): all flat parts of containing struct have been
|
||||||
|
// iterated, so now we can read the size, & descend to new task to read pointer
|
||||||
|
// destination contents
|
||||||
|
else if(t->type->count_delimiter_name.size != 0 && t->is_post_header)
|
||||||
|
{
|
||||||
|
// rjf: determine count of this pointer
|
||||||
|
U64 count = 0;
|
||||||
|
{
|
||||||
|
Member *count_member = member_from_name(t->containing_type, t->type->count_delimiter_name);
|
||||||
|
MemoryCopy(&count, t->containing_ptr + count_member->value, count_member->type->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: push task
|
||||||
|
SerializeTypeTask *task = push_array(scratch.arena, SerializeTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->count = count;
|
||||||
|
task->src = *(void **)t->src;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: catch-all: write pointer value
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str8_serial_push_string(scratch.arena, &strings, str8(t->src, t->type->size*t->count));
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: arrays -> descend to underlying type, + count
|
||||||
|
case TypeKind_Array:
|
||||||
|
{
|
||||||
|
SerializeTypeTask *task = push_array(scratch.arena, SerializeTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->count = t->type->count;
|
||||||
|
task->src = t->src;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: struct -> descend to members
|
||||||
|
case TypeKind_Struct:
|
||||||
|
{
|
||||||
|
U64 off = 0;
|
||||||
|
for(U64 idx = 0; idx < t->count; idx += 1)
|
||||||
|
{
|
||||||
|
for(U64 member_idx = 0; member_idx < t->type->count; member_idx += 1)
|
||||||
|
{
|
||||||
|
if(t->type->members[member_idx].flags & MemberFlag_DoNotSerialize)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SerializeTypeTask *task = push_array(scratch.arena, SerializeTypeTask, 1);
|
||||||
|
task->type = t->type->members[member_idx].type;
|
||||||
|
task->count = 1;
|
||||||
|
task->src = t->src + idx*t->type->size + t->type->members[member_idx].value;
|
||||||
|
task->containing_type = t->type;
|
||||||
|
task->containing_ptr = t->src;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: enum -> descend to basic type interpretation
|
||||||
|
case TypeKind_Enum:
|
||||||
|
{
|
||||||
|
SerializeTypeTask *task = push_array(scratch.arena, SerializeTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->count = t->count;
|
||||||
|
task->src = t->src;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String8 result = str8_serial_end(arena, &strings);
|
||||||
|
scratch_end(scratch);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal String8
|
||||||
|
deserialized_from_typed_data(Arena *arena, Type *type, String8 data, TypeSerializeParams *params)
|
||||||
|
{
|
||||||
|
String8 result = {0};
|
||||||
|
result.size = type->size;
|
||||||
|
result.str = push_array(arena, U8, result.size);
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
typedef struct DeserializeTypeTask DeserializeTypeTask;
|
||||||
|
struct DeserializeTypeTask
|
||||||
|
{
|
||||||
|
DeserializeTypeTask *next;
|
||||||
|
Type *type;
|
||||||
|
U64 count;
|
||||||
|
U8 *dst;
|
||||||
|
Type *containing_type;
|
||||||
|
U8 *containing_ptr;
|
||||||
|
B32 is_post_header;
|
||||||
|
};
|
||||||
|
U64 read_off = 0;
|
||||||
|
DeserializeTypeTask start_task = {0, type, 1, result.str};
|
||||||
|
DeserializeTypeTask *first_task = &start_task;
|
||||||
|
DeserializeTypeTask *last_task = first_task;
|
||||||
|
for(DeserializeTypeTask *t = first_task; t != 0; t = t->next)
|
||||||
|
{
|
||||||
|
U8 *t_src = data.str + read_off;
|
||||||
|
switch(t->type->kind)
|
||||||
|
{
|
||||||
|
//- rjf: leaf -> copy the data directly
|
||||||
|
default:
|
||||||
|
if(TypeKind_FirstLeaf <= t->type->kind && t->type->kind <= TypeKind_LastLeaf)
|
||||||
|
{
|
||||||
|
MemoryCopy(t->dst, t_src, t->type->size*t->count);
|
||||||
|
read_off += t->type->size*t->count;
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: pointers -> try to interpret/understand pointer & read/write, otherwise skip
|
||||||
|
case TypeKind_Ptr:
|
||||||
|
{
|
||||||
|
// rjf: unpack info about this pointer
|
||||||
|
TypeSerializePtrRefInfo *ptr_ref_info = 0;
|
||||||
|
for(U64 idx = 0; idx < params->ptr_ref_infos_count; idx += 1)
|
||||||
|
{
|
||||||
|
if(params->ptr_ref_infos[idx].type == t->type->direct)
|
||||||
|
{
|
||||||
|
ptr_ref_info = ¶ms->ptr_ref_infos[idx];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: indexification -> add base, multiply direct size
|
||||||
|
if(ptr_ref_info != 0 && ptr_ref_info->indexify_base != 0)
|
||||||
|
{
|
||||||
|
U64 ptr_value = 0;
|
||||||
|
MemoryCopy(&ptr_value, t_src, sizeof(ptr_value));
|
||||||
|
U64 ptr_write_value = (ptr_value + (U64)ptr_ref_info->indexify_base) * t->type->direct->size;
|
||||||
|
MemoryCopy(t->dst, &ptr_write_value, sizeof(ptr_write_value));
|
||||||
|
read_off += sizeof(ptr_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: offsetification -> subtract base, write offsets
|
||||||
|
else if(ptr_ref_info != 0 && ptr_ref_info->offsetify_base != 0)
|
||||||
|
{
|
||||||
|
U64 ptr_value = 0;
|
||||||
|
MemoryCopy(&ptr_value, t_src, sizeof(ptr_value));
|
||||||
|
U64 ptr_write_value = ptr_value + (U64)ptr_ref_info->offsetify_base;
|
||||||
|
MemoryCopy(t->dst, &ptr_write_value, sizeof(ptr_write_value));
|
||||||
|
read_off += sizeof(ptr_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: size-by-member (pre-header): still potentially dependent on other members which
|
||||||
|
// delimit our size, so push a new post-header task for pointer.
|
||||||
|
else if(t->type->count_delimiter_name.size != 0 && !t->is_post_header)
|
||||||
|
{
|
||||||
|
DeserializeTypeTask *task = push_array(scratch.arena, DeserializeTypeTask, 1);
|
||||||
|
task->type = t->type;
|
||||||
|
task->count = t->count;
|
||||||
|
task->dst = t->dst;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
task->is_post_header = 1;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: size-by-member (post-header): all flat parts of containing struct have been
|
||||||
|
// iterated, so now we can read the size, & descend to new task to read pointer
|
||||||
|
// destination contents
|
||||||
|
else if(t->type->count_delimiter_name.size != 0 && t->is_post_header)
|
||||||
|
{
|
||||||
|
// rjf: determine count of this pointer
|
||||||
|
U64 count = 0;
|
||||||
|
{
|
||||||
|
Member *count_member = member_from_name(t->containing_type, t->type->count_delimiter_name);
|
||||||
|
MemoryCopy(&count, t->containing_ptr + count_member->value, count_member->type->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: allocate buffer for pointer destination; write address into pointer value slot
|
||||||
|
U64 ptr_dest_buffer_size = (count+1)*t->type->direct->size;
|
||||||
|
U8 *ptr_dest_buffer = push_array(arena, U8, ptr_dest_buffer_size);
|
||||||
|
MemoryCopy(t->dst, &ptr_dest_buffer, sizeof(ptr_dest_buffer));
|
||||||
|
|
||||||
|
// rjf: push task
|
||||||
|
DeserializeTypeTask *task = push_array(scratch.arena, DeserializeTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->count = count;
|
||||||
|
task->dst = ptr_dest_buffer;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: catch-all: read pointer value
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MemoryCopy(t->dst, t_src, t->type->size*t->count);
|
||||||
|
read_off += t->type->size*t->count;
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: arrays -> descend to underlying type, + count
|
||||||
|
case TypeKind_Array:
|
||||||
|
{
|
||||||
|
DeserializeTypeTask *task = push_array(scratch.arena, DeserializeTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->count = t->type->count;
|
||||||
|
task->dst = t->dst;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: struct -> descend to members
|
||||||
|
case TypeKind_Struct:
|
||||||
|
{
|
||||||
|
for(U64 idx = 0; idx < t->count; idx += 1)
|
||||||
|
{
|
||||||
|
for(U64 member_idx = 0; member_idx < t->type->count; member_idx += 1)
|
||||||
|
{
|
||||||
|
if(t->type->members[member_idx].flags & MemberFlag_DoNotSerialize)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
DeserializeTypeTask *task = push_array(scratch.arena, DeserializeTypeTask, 1);
|
||||||
|
task->type = t->type->members[member_idx].type;
|
||||||
|
task->count = 1;
|
||||||
|
task->dst = t->dst + idx*t->type->size + t->type->members[member_idx].value;
|
||||||
|
task->containing_type = t->type;
|
||||||
|
task->containing_ptr = t->dst;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
|
||||||
|
//- rjf: enum -> descend to basic type interpretation
|
||||||
|
case TypeKind_Enum:
|
||||||
|
{
|
||||||
|
DeserializeTypeTask *task = push_array(scratch.arena, DeserializeTypeTask, 1);
|
||||||
|
task->type = t->type->direct;
|
||||||
|
task->count = t->count;
|
||||||
|
task->dst = t->dst;
|
||||||
|
task->containing_type = t->containing_type;
|
||||||
|
task->containing_ptr = t->containing_ptr;
|
||||||
|
SLLQueuePush(first_task, last_task, task);
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(params->advance_out != 0)
|
||||||
|
{
|
||||||
|
params->advance_out[0] = read_off;
|
||||||
|
}
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal String8
|
||||||
|
deep_copy_from_typed_data(Arena *arena, Type *type, String8 data, TypeSerializeParams *params)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
String8 data_srlz = serialized_from_typed_data(scratch.arena, type, data, params);
|
||||||
|
String8 data_copy = deserialized_from_typed_data(arena, type, data_srlz, params);
|
||||||
|
scratch_end(scratch);
|
||||||
|
return data_copy;
|
||||||
|
}
|
||||||
@@ -0,0 +1,274 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
#ifndef BASE_META_H
|
||||||
|
#define BASE_META_H
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Meta Markup Features
|
||||||
|
|
||||||
|
#define EmbedFile(name, path)
|
||||||
|
#define TweakB32(name, default) (TWEAK_##name)
|
||||||
|
#define TweakF32(name, default, min, max) (TWEAK_##name)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Tweak Info Tables
|
||||||
|
|
||||||
|
typedef struct TweakB32Info TweakB32Info;
|
||||||
|
struct TweakB32Info
|
||||||
|
{
|
||||||
|
String8 name;
|
||||||
|
B32 default_value;
|
||||||
|
B32 *value_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct TweakF32Info TweakF32Info;
|
||||||
|
struct TweakF32Info
|
||||||
|
{
|
||||||
|
String8 name;
|
||||||
|
F32 default_value;
|
||||||
|
Rng1F32 value_range;
|
||||||
|
F32 *value_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct TweakB32InfoTable TweakB32InfoTable;
|
||||||
|
struct TweakB32InfoTable
|
||||||
|
{
|
||||||
|
TweakB32Info *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct TweakF32InfoTable TweakF32InfoTable;
|
||||||
|
struct TweakF32InfoTable
|
||||||
|
{
|
||||||
|
TweakF32Info *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct EmbedInfo EmbedInfo;
|
||||||
|
struct EmbedInfo
|
||||||
|
{
|
||||||
|
String8 name;
|
||||||
|
String8 *data;
|
||||||
|
U128 *hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct EmbedInfoTable EmbedInfoTable;
|
||||||
|
struct EmbedInfoTable
|
||||||
|
{
|
||||||
|
EmbedInfo *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Info Types
|
||||||
|
|
||||||
|
typedef enum TypeKind
|
||||||
|
{
|
||||||
|
TypeKind_Null,
|
||||||
|
|
||||||
|
// rjf: leaves
|
||||||
|
TypeKind_Void, TypeKind_FirstLeaf = TypeKind_Void,
|
||||||
|
TypeKind_U8,
|
||||||
|
TypeKind_U16,
|
||||||
|
TypeKind_U32,
|
||||||
|
TypeKind_U64,
|
||||||
|
TypeKind_S8,
|
||||||
|
TypeKind_S16,
|
||||||
|
TypeKind_S32,
|
||||||
|
TypeKind_S64,
|
||||||
|
TypeKind_B8,
|
||||||
|
TypeKind_B16,
|
||||||
|
TypeKind_B32,
|
||||||
|
TypeKind_B64,
|
||||||
|
TypeKind_F32,
|
||||||
|
TypeKind_F64, TypeKind_LastLeaf = TypeKind_F64,
|
||||||
|
|
||||||
|
// rjf: operators
|
||||||
|
TypeKind_Ptr,
|
||||||
|
TypeKind_Array,
|
||||||
|
|
||||||
|
// rjf: user-defined-types
|
||||||
|
TypeKind_Struct,
|
||||||
|
TypeKind_Union,
|
||||||
|
TypeKind_Enum,
|
||||||
|
|
||||||
|
TypeKind_COUNT
|
||||||
|
}
|
||||||
|
TypeKind;
|
||||||
|
|
||||||
|
typedef U32 TypeFlags;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TypeFlag_IsExternal = (1<<0),
|
||||||
|
TypeFlag_IsPlainText = (1<<1),
|
||||||
|
TypeFlag_IsCodeText = (1<<2),
|
||||||
|
TypeFlag_IsPathText = (1<<3),
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef U32 MemberFlags;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MemberFlag_DoNotSerialize = (1<<0),
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct Type Type;
|
||||||
|
typedef struct Member Member;
|
||||||
|
struct Member
|
||||||
|
{
|
||||||
|
String8 name;
|
||||||
|
String8 pretty_name;
|
||||||
|
Type *type;
|
||||||
|
U64 value;
|
||||||
|
MemberFlags flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct Type Type;
|
||||||
|
struct Type
|
||||||
|
{
|
||||||
|
TypeKind kind;
|
||||||
|
TypeFlags flags;
|
||||||
|
U64 size;
|
||||||
|
Type *direct;
|
||||||
|
String8 name;
|
||||||
|
String8 count_delimiter_name; // gathered from surrounding members, turns *->[1] into *->[N]
|
||||||
|
U64 count;
|
||||||
|
Member *members;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Serialization Parameters
|
||||||
|
|
||||||
|
typedef struct TypeSerializePtrRefInfo TypeSerializePtrRefInfo;
|
||||||
|
struct TypeSerializePtrRefInfo
|
||||||
|
{
|
||||||
|
Type *type; // pointers to this
|
||||||
|
void *indexify_base; // can be indexified using this
|
||||||
|
void *offsetify_base; // can be offsetified using this
|
||||||
|
void *nil_ptr; // is terminal if matching 0 or this
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct TypeSerializeParams TypeSerializeParams;
|
||||||
|
struct TypeSerializeParams
|
||||||
|
{
|
||||||
|
U64 *advance_out;
|
||||||
|
TypeSerializePtrRefInfo *ptr_ref_infos;
|
||||||
|
U64 ptr_ref_infos_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Name -> Type Info
|
||||||
|
|
||||||
|
#define type(T) (&T##__type)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Info Table Initializer Helpers
|
||||||
|
|
||||||
|
#define member_lit_comp(S, ti, m, ...) {str8_lit_comp(#m), {0}, (ti), OffsetOf(S, m), __VA_ARGS__}
|
||||||
|
#define struct_members(S) read_only global Member S##__members[] =
|
||||||
|
#define struct_type(S, ...) read_only global Type S##__type = {TypeKind_Struct, 0, sizeof(S), &type_nil, str8_lit_comp(#S), {0}, ArrayCount(S##__members), S##__members, __VA_ARGS__}
|
||||||
|
#define named_struct_type(name, S, ...) read_only global Type name##__type = {TypeKind_Struct, 0, sizeof(S), &type_nil, str8_lit_comp(#name), {0}, ArrayCount(name##__members), name##__members, __VA_ARGS__}
|
||||||
|
#define ptr_type(name, ti, ...) read_only global Type name = {TypeKind_Ptr, 0, sizeof(void *), (ti), __VA_ARGS__}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Globals
|
||||||
|
|
||||||
|
read_only global Type type_nil = {TypeKind_Null, 0, 0, &type_nil};
|
||||||
|
read_only global Member member_nil = {{0}, {0}, &type_nil};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Built-In Types
|
||||||
|
|
||||||
|
//- rjf: leaves
|
||||||
|
read_only global Type void__type = {TypeKind_Void, 0, 0, &type_nil, str8_lit_comp("void")};
|
||||||
|
read_only global Type U8__type = {TypeKind_U8, 0, sizeof(U8), &type_nil, str8_lit_comp("U8")};
|
||||||
|
read_only global Type U16__type = {TypeKind_U16, 0, sizeof(U16), &type_nil, str8_lit_comp("U16")};
|
||||||
|
read_only global Type U32__type = {TypeKind_U32, 0, sizeof(U32), &type_nil, str8_lit_comp("U32")};
|
||||||
|
read_only global Type U64__type = {TypeKind_U64, 0, sizeof(U64), &type_nil, str8_lit_comp("U64")};
|
||||||
|
read_only global Type S8__type = {TypeKind_S8, 0, sizeof(S8), &type_nil, str8_lit_comp("S8")};
|
||||||
|
read_only global Type S16__type = {TypeKind_S16, 0, sizeof(S16), &type_nil, str8_lit_comp("S16")};
|
||||||
|
read_only global Type S32__type = {TypeKind_S32, 0, sizeof(S32), &type_nil, str8_lit_comp("S32")};
|
||||||
|
read_only global Type S64__type = {TypeKind_S64, 0, sizeof(S64), &type_nil, str8_lit_comp("S64")};
|
||||||
|
read_only global Type B8__type = {TypeKind_B8, 0, sizeof(B8), &type_nil, str8_lit_comp("B8")};
|
||||||
|
read_only global Type B16__type = {TypeKind_B16, 0, sizeof(B16), &type_nil, str8_lit_comp("B16")};
|
||||||
|
read_only global Type B32__type = {TypeKind_B32, 0, sizeof(B32), &type_nil, str8_lit_comp("B32")};
|
||||||
|
read_only global Type B64__type = {TypeKind_B64, 0, sizeof(B64), &type_nil, str8_lit_comp("B64")};
|
||||||
|
read_only global Type F32__type = {TypeKind_F32, 0, sizeof(F32), &type_nil, str8_lit_comp("F32")};
|
||||||
|
read_only global Type F64__type = {TypeKind_F64, 0, sizeof(F64), &type_nil, str8_lit_comp("F64")};
|
||||||
|
|
||||||
|
//- rjf: Rng1U64
|
||||||
|
struct_members(Rng1U64)
|
||||||
|
{
|
||||||
|
member_lit_comp(Rng1U64, type(U64), min),
|
||||||
|
member_lit_comp(Rng1U64, type(U64), max),
|
||||||
|
};
|
||||||
|
struct_type(Rng1U64);
|
||||||
|
|
||||||
|
//- rjf: String8
|
||||||
|
ptr_type(String8__str_ptr_type, type(U8), str8_lit_comp("size"));
|
||||||
|
struct_members(String8)
|
||||||
|
{
|
||||||
|
member_lit_comp(String8, &String8__str_ptr_type, str),
|
||||||
|
member_lit_comp(String8, type(U64), size),
|
||||||
|
};
|
||||||
|
struct_type(String8);
|
||||||
|
|
||||||
|
//- rjf: String8Node
|
||||||
|
extern Type String8Node__type;
|
||||||
|
Type String8Node__ptr_type = {TypeKind_Ptr, 0, sizeof(void *), &String8Node__type};
|
||||||
|
Member String8Node__members[] =
|
||||||
|
{
|
||||||
|
{str8_lit_comp("next"), {0}, &String8Node__ptr_type, OffsetOf(String8Node, next)},
|
||||||
|
{str8_lit_comp("string"), {0}, type(String8), OffsetOf(String8Node, string)},
|
||||||
|
};
|
||||||
|
Type String8Node__type =
|
||||||
|
{
|
||||||
|
TypeKind_Struct,
|
||||||
|
0,
|
||||||
|
sizeof(String8Node),
|
||||||
|
&type_nil,
|
||||||
|
str8_lit_comp("String8Node"),
|
||||||
|
{0},
|
||||||
|
ArrayCount(String8Node__members),
|
||||||
|
String8Node__members,
|
||||||
|
};
|
||||||
|
|
||||||
|
//- rjf: String8List
|
||||||
|
Member String8List__members[] =
|
||||||
|
{
|
||||||
|
{str8_lit_comp("first"), {0}, &String8Node__ptr_type, OffsetOf(String8List, first)},
|
||||||
|
{str8_lit_comp("last"), {0}, &String8Node__ptr_type, OffsetOf(String8List, last), MemberFlag_DoNotSerialize},
|
||||||
|
{str8_lit_comp("node_count"), {0}, type(U64), OffsetOf(String8List, node_count)},
|
||||||
|
{str8_lit_comp("total_size"), {0}, type(U64), OffsetOf(String8List, total_size)},
|
||||||
|
};
|
||||||
|
Type String8List__type =
|
||||||
|
{
|
||||||
|
TypeKind_Struct,
|
||||||
|
0,
|
||||||
|
sizeof(String8List),
|
||||||
|
&type_nil,
|
||||||
|
str8_lit_comp("String8List"),
|
||||||
|
{0},
|
||||||
|
ArrayCount(String8List__members),
|
||||||
|
String8List__members,
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Info Lookups
|
||||||
|
|
||||||
|
internal Member *member_from_name(Type *type, String8 name);
|
||||||
|
#define EachMember(T, it) (Member *it = (type(T))->members; it != 0 && it < (type(T))->members + (type(T))->count; it += 1)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Type Info * Instance Operations
|
||||||
|
|
||||||
|
internal void typed_data_rebase_ptrs(Type *type, String8 data, void *base_ptr);
|
||||||
|
internal String8 serialized_from_typed_data(Arena *arena, Type *type, String8 data, TypeSerializeParams *params);
|
||||||
|
internal String8 deserialized_from_typed_data(Arena *arena, Type *type, String8 data, TypeSerializeParams *params);
|
||||||
|
internal String8 deep_copy_from_typed_data(Arena *arena, Type *type, String8 data, TypeSerializeParams *params);
|
||||||
|
#define struct_rebase_ptrs(T, ptr, base) typed_data_rebase_ptrs(type(T), str8_struct(ptr), (base))
|
||||||
|
#define serialized_from_struct(arena, T, ptr, ...) serialized_from_typed_data((arena), type(T), str8_struct(ptr), &(TypeSerializeParams){.ptr_ref_infos = 0, __VA_ARGS__})
|
||||||
|
#define struct_from_serialized(arena, T, string, ...) (T *)deserialized_from_typed_data((arena), type(T), (string), &(TypeSerializeParams){.ptr_ref_infos = 0, __VA_ARGS__}).str
|
||||||
|
#define deep_copy_from_struct(arena, T, ptr, ...) (T *)deep_copy_from_typed_data((arena), type(T), str8_struct(ptr), &(TypeSerializeParams){.ptr_ref_infos = 0, __VA_ARGS__}).str
|
||||||
|
|
||||||
|
#endif // BASE_META_H
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|||||||
+74
-74
@@ -1,74 +1,74 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_PROFILE_H
|
#ifndef BASE_PROFILE_H
|
||||||
#define BASE_PROFILE_H
|
#define BASE_PROFILE_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Zero Settings
|
//~ rjf: Zero Settings
|
||||||
|
|
||||||
#if !defined(PROFILE_TELEMETRY)
|
#if !defined(PROFILE_TELEMETRY)
|
||||||
# define PROFILE_TELEMETRY 0
|
# define PROFILE_TELEMETRY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MARKUP_LAYER_COLOR)
|
#if !defined(MARKUP_LAYER_COLOR)
|
||||||
# define MARKUP_LAYER_COLOR 1.00f, 0.00f, 1.00f
|
# define MARKUP_LAYER_COLOR 1.00f, 0.00f, 1.00f
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Third Party Includes
|
//~ rjf: Third Party Includes
|
||||||
|
|
||||||
#if PROFILE_TELEMETRY
|
#if PROFILE_TELEMETRY
|
||||||
# include "rad_tm.h"
|
# include "rad_tm.h"
|
||||||
# if OS_WINDOWS
|
# if OS_WINDOWS
|
||||||
# pragma comment(lib, "rad_tm_win64.lib")
|
# pragma comment(lib, "rad_tm_win64.lib")
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Telemetry Profile Defines
|
//~ rjf: Telemetry Profile Defines
|
||||||
|
|
||||||
#if PROFILE_TELEMETRY
|
#if PROFILE_TELEMETRY
|
||||||
# define ProfBegin(...) tmEnter(0, 0, __VA_ARGS__)
|
# define ProfBegin(...) tmEnter(0, 0, __VA_ARGS__)
|
||||||
# define ProfBeginDynamic(...) (TM_API_PTR ? TM_API_PTR->_tmEnterZoneV_Core(0, 0, __FILE__, &g_telemetry_filename_id, __LINE__, __VA_ARGS__) : (void)0)
|
# define ProfBeginDynamic(...) (TM_API_PTR ? TM_API_PTR->_tmEnterZoneV_Core(0, 0, __FILE__, &g_telemetry_filename_id, __LINE__, __VA_ARGS__) : (void)0)
|
||||||
# define ProfEnd(...) (TM_API_PTR ? TM_API_PTR->_tmLeaveZone(0) : (void)0)
|
# define ProfEnd(...) (TM_API_PTR ? TM_API_PTR->_tmLeaveZone(0) : (void)0)
|
||||||
# define ProfTick(...) tmTick(0)
|
# define ProfTick(...) tmTick(0)
|
||||||
# define ProfIsCapturing(...) tmRunning()
|
# define ProfIsCapturing(...) tmRunning()
|
||||||
# define ProfBeginCapture(...) tmOpen(0, __VA_ARGS__, __DATE__, "localhost", TMCT_TCP, TELEMETRY_DEFAULT_PORT, TMOF_INIT_NETWORKING|TMOF_CAPTURE_CONTEXT_SWITCHES, 100)
|
# define ProfBeginCapture(...) tmOpen(0, __VA_ARGS__, __DATE__, "localhost", TMCT_TCP, TELEMETRY_DEFAULT_PORT, TMOF_INIT_NETWORKING|TMOF_CAPTURE_CONTEXT_SWITCHES, 100)
|
||||||
# define ProfEndCapture(...) tmClose(0)
|
# define ProfEndCapture(...) tmClose(0)
|
||||||
# define ProfThreadName(...) (TM_API_PTR ? TM_API_PTR->_tmThreadName(0, 0, __VA_ARGS__) : (void)0)
|
# define ProfThreadName(...) (TM_API_PTR ? TM_API_PTR->_tmThreadName(0, 0, __VA_ARGS__) : (void)0)
|
||||||
# define ProfMsg(...) (TM_API_PTR ? TM_API_PTR->_tmMessageV_Core(0, TMMF_ICON_NOTE, __FILE__, &g_telemetry_filename_id, __LINE__, __VA_ARGS__) : (void)0)
|
# define ProfMsg(...) (TM_API_PTR ? TM_API_PTR->_tmMessageV_Core(0, TMMF_ICON_NOTE, __FILE__, &g_telemetry_filename_id, __LINE__, __VA_ARGS__) : (void)0)
|
||||||
# define ProfBeginLockWait(...) tmStartWaitForLock(0, 0, __VA_ARGS__)
|
# define ProfBeginLockWait(...) tmStartWaitForLock(0, 0, __VA_ARGS__)
|
||||||
# define ProfEndLockWait(...) tmEndWaitForLock(0)
|
# define ProfEndLockWait(...) tmEndWaitForLock(0)
|
||||||
# define ProfLockTake(...) tmAcquiredLock(0, 0, __VA_ARGS__)
|
# define ProfLockTake(...) tmAcquiredLock(0, 0, __VA_ARGS__)
|
||||||
# define ProfLockDrop(...) tmReleasedLock(0, __VA_ARGS__)
|
# define ProfLockDrop(...) tmReleasedLock(0, __VA_ARGS__)
|
||||||
# define ProfColor(color) tmZoneColorSticky(color)
|
# define ProfColor(color) tmZoneColorSticky(color)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Zeroify Undefined Defines
|
//~ rjf: Zeroify Undefined Defines
|
||||||
|
|
||||||
#if !defined(ProfBegin)
|
#if !defined(ProfBegin)
|
||||||
# define ProfBegin(...) (0)
|
# define ProfBegin(...) (0)
|
||||||
# define ProfBeginDynamic(...) (0)
|
# define ProfBeginDynamic(...) (0)
|
||||||
# define ProfEnd(...) (0)
|
# define ProfEnd(...) (0)
|
||||||
# define ProfTick(...) (0)
|
# define ProfTick(...) (0)
|
||||||
# define ProfIsCapturing(...) (0)
|
# define ProfIsCapturing(...) (0)
|
||||||
# define ProfBeginCapture(...) (0)
|
# define ProfBeginCapture(...) (0)
|
||||||
# define ProfEndCapture(...) (0)
|
# define ProfEndCapture(...) (0)
|
||||||
# define ProfThreadName(...) (0)
|
# define ProfThreadName(...) (0)
|
||||||
# define ProfMsg(...) (0)
|
# define ProfMsg(...) (0)
|
||||||
# define ProfBeginLockWait(...) (0)
|
# define ProfBeginLockWait(...) (0)
|
||||||
# define ProfEndLockWait(...) (0)
|
# define ProfEndLockWait(...) (0)
|
||||||
# define ProfLockTake(...) (0)
|
# define ProfLockTake(...) (0)
|
||||||
# define ProfLockDrop(...) (0)
|
# define ProfLockDrop(...) (0)
|
||||||
# define ProfColor(...) (0)
|
# define ProfColor(...) (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Helper Wrappers
|
//~ rjf: Helper Wrappers
|
||||||
|
|
||||||
#define ProfBeginFunction(...) ProfBegin(this_function_name)
|
#define ProfBeginFunction(...) ProfBegin(this_function_name)
|
||||||
#define ProfScope(...) DeferLoop(ProfBeginDynamic(__VA_ARGS__), ProfEnd())
|
#define ProfScope(...) DeferLoop(ProfBeginDynamic(__VA_ARGS__), ProfEnd())
|
||||||
|
|
||||||
#endif // BASE_PROFILE_H
|
#endif // BASE_PROFILE_H
|
||||||
|
|||||||
+2073
-1937
File diff suppressed because it is too large
Load Diff
+388
-376
@@ -1,376 +1,388 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_STRINGS_H
|
#ifndef BASE_STRINGS_H
|
||||||
#define BASE_STRINGS_H
|
#define BASE_STRINGS_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Third Party Includes
|
//~ rjf: Third Party Includes
|
||||||
|
|
||||||
#define STB_SPRINTF_DECORATE(name) raddbg_##name
|
#define STB_SPRINTF_DECORATE(name) raddbg_##name
|
||||||
#include "third_party/stb/stb_sprintf.h"
|
#include "third_party/stb/stb_sprintf.h"
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: String Types
|
//~ rjf: String Types
|
||||||
|
|
||||||
typedef struct String8 String8;
|
typedef struct String8 String8;
|
||||||
struct String8
|
struct String8
|
||||||
{
|
{
|
||||||
U8 *str;
|
U8 *str;
|
||||||
U64 size;
|
U64 size;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct String16 String16;
|
typedef struct String16 String16;
|
||||||
struct String16
|
struct String16
|
||||||
{
|
{
|
||||||
U16 *str;
|
U16 *str;
|
||||||
U64 size;
|
U64 size;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct String32 String32;
|
typedef struct String32 String32;
|
||||||
struct String32
|
struct String32
|
||||||
{
|
{
|
||||||
U32 *str;
|
U32 *str;
|
||||||
U64 size;
|
U64 size;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: String List & Array Types
|
//~ rjf: String List & Array Types
|
||||||
|
|
||||||
typedef struct String8Node String8Node;
|
typedef struct String8Node String8Node;
|
||||||
struct String8Node
|
struct String8Node
|
||||||
{
|
{
|
||||||
String8Node *next;
|
String8Node *next;
|
||||||
String8 string;
|
String8 string;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct String8MetaNode String8MetaNode;
|
typedef struct String8MetaNode String8MetaNode;
|
||||||
struct String8MetaNode
|
struct String8MetaNode
|
||||||
{
|
{
|
||||||
String8MetaNode *next;
|
String8MetaNode *next;
|
||||||
String8Node *node;
|
String8Node *node;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct String8List String8List;
|
typedef struct String8List String8List;
|
||||||
struct String8List
|
struct String8List
|
||||||
{
|
{
|
||||||
String8Node *first;
|
String8Node *first;
|
||||||
String8Node *last;
|
String8Node *last;
|
||||||
U64 node_count;
|
U64 node_count;
|
||||||
U64 total_size;
|
U64 total_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct String8Array String8Array;
|
typedef struct String8Array String8Array;
|
||||||
struct String8Array
|
struct String8Array
|
||||||
{
|
{
|
||||||
String8 *strings;
|
String8 *v;
|
||||||
U64 count;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: String Matching, Splitting, & Joining Types
|
//~ rjf: String Matching, Splitting, & Joining Types
|
||||||
|
|
||||||
typedef U32 StringMatchFlags;
|
typedef U32 StringMatchFlags;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
StringMatchFlag_CaseInsensitive = (1 << 0),
|
StringMatchFlag_CaseInsensitive = (1 << 0),
|
||||||
StringMatchFlag_RightSideSloppy = (1 << 1),
|
StringMatchFlag_RightSideSloppy = (1 << 1),
|
||||||
StringMatchFlag_SlashInsensitive = (1 << 2),
|
StringMatchFlag_SlashInsensitive = (1 << 2),
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef U32 StringSplitFlags;
|
typedef U32 StringSplitFlags;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
StringSplitFlag_KeepEmpties = (1 << 0),
|
StringSplitFlag_KeepEmpties = (1 << 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum PathStyle
|
typedef enum PathStyle
|
||||||
{
|
{
|
||||||
PathStyle_Relative,
|
PathStyle_Null,
|
||||||
PathStyle_WindowsAbsolute,
|
PathStyle_Relative,
|
||||||
PathStyle_UnixAbsolute,
|
PathStyle_WindowsAbsolute,
|
||||||
|
PathStyle_UnixAbsolute,
|
||||||
#if OS_WINDOWS
|
|
||||||
PathStyle_SystemAbsolute = PathStyle_WindowsAbsolute
|
#if OS_WINDOWS
|
||||||
#elif OS_LINUX
|
PathStyle_SystemAbsolute = PathStyle_WindowsAbsolute
|
||||||
PathStyle_SystemAbsolute = PathStyle_UnixAbsolute
|
#elif OS_LINUX
|
||||||
#else
|
PathStyle_SystemAbsolute = PathStyle_UnixAbsolute
|
||||||
# error "absolute path style is undefined for this OS"
|
#else
|
||||||
#endif
|
# error "absolute path style is undefined for this OS"
|
||||||
}
|
#endif
|
||||||
PathStyle;
|
}
|
||||||
|
PathStyle;
|
||||||
typedef struct StringJoin StringJoin;
|
|
||||||
struct StringJoin
|
typedef struct StringJoin StringJoin;
|
||||||
{
|
struct StringJoin
|
||||||
String8 pre;
|
{
|
||||||
String8 sep;
|
String8 pre;
|
||||||
String8 post;
|
String8 sep;
|
||||||
};
|
String8 post;
|
||||||
|
};
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Pair Types
|
////////////////////////////////
|
||||||
|
//~ rjf: String Pair Types
|
||||||
typedef struct String8TxtPtPair String8TxtPtPair;
|
|
||||||
struct String8TxtPtPair
|
typedef struct String8TxtPtPair String8TxtPtPair;
|
||||||
{
|
struct String8TxtPtPair
|
||||||
String8 string;
|
{
|
||||||
TxtPt pt;
|
String8 string;
|
||||||
};
|
TxtPt pt;
|
||||||
|
};
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: UTF Decoding Types
|
////////////////////////////////
|
||||||
|
//~ rjf: UTF Decoding Types
|
||||||
typedef struct UnicodeDecode UnicodeDecode;
|
|
||||||
struct UnicodeDecode
|
typedef struct UnicodeDecode UnicodeDecode;
|
||||||
{
|
struct UnicodeDecode
|
||||||
U32 inc;
|
{
|
||||||
U32 codepoint;
|
U32 inc;
|
||||||
};
|
U32 codepoint;
|
||||||
|
};
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Fuzzy Matching Types
|
////////////////////////////////
|
||||||
|
//~ rjf: String Fuzzy Matching Types
|
||||||
typedef struct FuzzyMatchRangeNode FuzzyMatchRangeNode;
|
|
||||||
struct FuzzyMatchRangeNode
|
typedef struct FuzzyMatchRangeNode FuzzyMatchRangeNode;
|
||||||
{
|
struct FuzzyMatchRangeNode
|
||||||
FuzzyMatchRangeNode *next;
|
{
|
||||||
Rng1U64 range;
|
FuzzyMatchRangeNode *next;
|
||||||
};
|
Rng1U64 range;
|
||||||
|
};
|
||||||
typedef struct FuzzyMatchRangeList FuzzyMatchRangeList;
|
|
||||||
struct FuzzyMatchRangeList
|
typedef struct FuzzyMatchRangeList FuzzyMatchRangeList;
|
||||||
{
|
struct FuzzyMatchRangeList
|
||||||
FuzzyMatchRangeNode *first;
|
{
|
||||||
FuzzyMatchRangeNode *last;
|
FuzzyMatchRangeNode *first;
|
||||||
U64 count;
|
FuzzyMatchRangeNode *last;
|
||||||
U64 needle_part_count;
|
U64 count;
|
||||||
U64 total_dim;
|
U64 needle_part_count;
|
||||||
};
|
U64 total_dim;
|
||||||
|
};
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Character Classification & Conversion Functions
|
////////////////////////////////
|
||||||
|
//~ rjf: Character Classification & Conversion Functions
|
||||||
internal B32 char_is_space(U8 c);
|
|
||||||
internal B32 char_is_upper(U8 c);
|
internal B32 char_is_space(U8 c);
|
||||||
internal B32 char_is_lower(U8 c);
|
internal B32 char_is_upper(U8 c);
|
||||||
internal B32 char_is_alpha(U8 c);
|
internal B32 char_is_lower(U8 c);
|
||||||
internal B32 char_is_slash(U8 c);
|
internal B32 char_is_alpha(U8 c);
|
||||||
internal B32 char_is_digit(U8 c, U32 base);
|
internal B32 char_is_slash(U8 c);
|
||||||
internal U8 char_to_lower(U8 c);
|
internal B32 char_is_digit(U8 c, U32 base);
|
||||||
internal U8 char_to_upper(U8 c);
|
internal U8 char_to_lower(U8 c);
|
||||||
internal U8 char_to_correct_slash(U8 c);
|
internal U8 char_to_upper(U8 c);
|
||||||
|
internal U8 char_to_correct_slash(U8 c);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: C-String Measurement
|
////////////////////////////////
|
||||||
|
//~ rjf: C-String Measurement
|
||||||
internal U64 cstring8_length(U8 *c);
|
|
||||||
internal U64 cstring16_length(U16 *c);
|
internal U64 cstring8_length(U8 *c);
|
||||||
internal U64 cstring32_length(U32 *c);
|
internal U64 cstring16_length(U16 *c);
|
||||||
|
internal U64 cstring32_length(U32 *c);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Constructors
|
////////////////////////////////
|
||||||
|
//~ rjf: String Constructors
|
||||||
#define str8_lit(S) str8((U8*)(S), sizeof(S) - 1)
|
|
||||||
#define str8_lit_comp(S) {(U8*)(S), sizeof(S) - 1,}
|
#define str8_lit(S) str8((U8*)(S), sizeof(S) - 1)
|
||||||
#define str8_varg(S) (int)((S).size), ((S).str)
|
#define str8_lit_comp(S) {(U8*)(S), sizeof(S) - 1,}
|
||||||
|
#define str8_varg(S) (int)((S).size), ((S).str)
|
||||||
#define str8_array(S,C) str8((U8*)(S), sizeof(*(S))*(C))
|
|
||||||
#define str8_array_fixed(S) str8((U8*)(S), sizeof(S))
|
#define str8_array(S,C) str8((U8*)(S), sizeof(*(S))*(C))
|
||||||
#define str8_struct(S) str8((U8*)(S), sizeof(*(S)))
|
#define str8_array_fixed(S) str8((U8*)(S), sizeof(S))
|
||||||
|
#define str8_struct(S) str8((U8*)(S), sizeof(*(S)))
|
||||||
internal String8 str8(U8 *str, U64 size);
|
|
||||||
internal String8 str8_range(U8 *first, U8 *one_past_last);
|
internal String8 str8(U8 *str, U64 size);
|
||||||
internal String8 str8_zero(void);
|
internal String8 str8_range(U8 *first, U8 *one_past_last);
|
||||||
internal String16 str16(U16 *str, U64 size);
|
internal String8 str8_zero(void);
|
||||||
internal String16 str16_range(U16 *first, U16 *one_past_last);
|
internal String16 str16(U16 *str, U64 size);
|
||||||
internal String16 str16_zero(void);
|
internal String16 str16_range(U16 *first, U16 *one_past_last);
|
||||||
internal String32 str32(U32 *str, U64 size);
|
internal String16 str16_zero(void);
|
||||||
internal String32 str32_range(U32 *first, U32 *one_past_last);
|
internal String32 str32(U32 *str, U64 size);
|
||||||
internal String32 str32_zero(void);
|
internal String32 str32_range(U32 *first, U32 *one_past_last);
|
||||||
internal String8 str8_cstring(char *c);
|
internal String32 str32_zero(void);
|
||||||
internal String16 str16_cstring(U16 *c);
|
internal String8 str8_cstring(char *c);
|
||||||
internal String32 str32_cstring(U32 *c);
|
internal String16 str16_cstring(U16 *c);
|
||||||
internal String8 str8_cstring_capped(void *cstr, void *cap);
|
internal String32 str32_cstring(U32 *c);
|
||||||
|
internal String8 str8_cstring_capped(void *cstr, void *cap);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Stylization
|
////////////////////////////////
|
||||||
|
//~ rjf: String Stylization
|
||||||
internal String8 upper_from_str8(Arena *arena, String8 string);
|
|
||||||
internal String8 lower_from_str8(Arena *arena, String8 string);
|
internal String8 upper_from_str8(Arena *arena, String8 string);
|
||||||
internal String8 backslashed_from_str8(Arena *arena, String8 string);
|
internal String8 lower_from_str8(Arena *arena, String8 string);
|
||||||
|
internal String8 backslashed_from_str8(Arena *arena, String8 string);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Matching
|
////////////////////////////////
|
||||||
|
//~ rjf: String Matching
|
||||||
internal B32 str8_match(String8 a, String8 b, StringMatchFlags flags);
|
|
||||||
internal U64 str8_find_needle(String8 string, U64 start_pos, String8 needle, StringMatchFlags flags);
|
internal B32 str8_match(String8 a, String8 b, StringMatchFlags flags);
|
||||||
internal B32 str8_ends_with(String8 string, String8 end, StringMatchFlags flags);
|
internal U64 str8_find_needle(String8 string, U64 start_pos, String8 needle, StringMatchFlags flags);
|
||||||
|
internal B32 str8_ends_with(String8 string, String8 end, StringMatchFlags flags);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Slicing
|
////////////////////////////////
|
||||||
|
//~ rjf: String Slicing
|
||||||
internal String8 str8_substr(String8 str, Rng1U64 range);
|
|
||||||
internal String8 str8_prefix(String8 str, U64 size);
|
internal String8 str8_substr(String8 str, Rng1U64 range);
|
||||||
internal String8 str8_skip(String8 str, U64 amt);
|
internal String8 str8_prefix(String8 str, U64 size);
|
||||||
internal String8 str8_postfix(String8 str, U64 size);
|
internal String8 str8_skip(String8 str, U64 amt);
|
||||||
internal String8 str8_chop(String8 str, U64 amt);
|
internal String8 str8_postfix(String8 str, U64 size);
|
||||||
internal String8 str8_skip_chop_whitespace(String8 string);
|
internal String8 str8_chop(String8 str, U64 amt);
|
||||||
|
internal String8 str8_skip_chop_whitespace(String8 string);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Formatting & Copying
|
////////////////////////////////
|
||||||
|
//~ rjf: String Formatting & Copying
|
||||||
internal String8 push_str8_cat(Arena *arena, String8 s1, String8 s2);
|
|
||||||
internal String8 push_str8_copy(Arena *arena, String8 s);
|
internal String8 push_str8_cat(Arena *arena, String8 s1, String8 s2);
|
||||||
internal String8 push_str8fv(Arena *arena, char *fmt, va_list args);
|
internal String8 push_str8_copy(Arena *arena, String8 s);
|
||||||
internal String8 push_str8f(Arena *arena, char *fmt, ...);
|
internal String8 push_str8fv(Arena *arena, char *fmt, va_list args);
|
||||||
|
internal String8 push_str8f(Arena *arena, char *fmt, ...);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String <=> Integer Conversions
|
////////////////////////////////
|
||||||
|
//~ rjf: String <=> Integer Conversions
|
||||||
//- rjf: string -> integer
|
|
||||||
internal S64 sign_from_str8(String8 string, String8 *string_tail);
|
//- rjf: string -> integer
|
||||||
internal B32 str8_is_integer(String8 string, U32 radix);
|
internal S64 sign_from_str8(String8 string, String8 *string_tail);
|
||||||
internal U64 u64_from_str8(String8 string, U32 radix);
|
internal B32 str8_is_integer(String8 string, U32 radix);
|
||||||
internal S64 s64_from_str8(String8 string, U32 radix);
|
internal U64 u64_from_str8(String8 string, U32 radix);
|
||||||
internal B32 try_u64_from_str8_c_rules(String8 string, U64 *x);
|
internal S64 s64_from_str8(String8 string, U32 radix);
|
||||||
internal B32 try_s64_from_str8_c_rules(String8 string, S64 *x);
|
internal B32 try_u64_from_str8_c_rules(String8 string, U64 *x);
|
||||||
|
internal B32 try_s64_from_str8_c_rules(String8 string, S64 *x);
|
||||||
//- rjf: integer -> string
|
|
||||||
internal String8 str8_from_memory_size(Arena *arena, U64 z);
|
//- rjf: integer -> string
|
||||||
internal String8 str8_from_u64(Arena *arena, U64 u64, U32 radix, U8 min_digits, U8 digit_group_separator);
|
internal String8 str8_from_memory_size(Arena *arena, U64 z);
|
||||||
internal String8 str8_from_s64(Arena *arena, S64 s64, U32 radix, U8 min_digits, U8 digit_group_separator);
|
internal String8 str8_from_u64(Arena *arena, U64 u64, U32 radix, U8 min_digits, U8 digit_group_separator);
|
||||||
|
internal String8 str8_from_s64(Arena *arena, S64 s64, U32 radix, U8 min_digits, U8 digit_group_separator);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String <=> Float Conversions
|
////////////////////////////////
|
||||||
|
//~ rjf: String <=> Float Conversions
|
||||||
internal F64 f64_from_str8(String8 string);
|
|
||||||
|
internal F64 f64_from_str8(String8 string);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String List Construction Functions
|
////////////////////////////////
|
||||||
|
//~ rjf: String List Construction Functions
|
||||||
internal String8Node* str8_list_push_node(String8List *list, String8Node *node);
|
|
||||||
internal String8Node* str8_list_push_node_set_string(String8List *list, String8Node *node, String8 string);
|
internal String8Node* str8_list_push_node(String8List *list, String8Node *node);
|
||||||
internal String8Node* str8_list_push_node_front(String8List *list, String8Node *node);
|
internal String8Node* str8_list_push_node_set_string(String8List *list, String8Node *node, String8 string);
|
||||||
internal String8Node* str8_list_push_node_front_set_string(String8List *list, String8Node *node, String8 string);
|
internal String8Node* str8_list_push_node_front(String8List *list, String8Node *node);
|
||||||
internal String8Node* str8_list_push(Arena *arena, String8List *list, String8 string);
|
internal String8Node* str8_list_push_node_front_set_string(String8List *list, String8Node *node, String8 string);
|
||||||
internal String8Node* str8_list_push_front(Arena *arena, String8List *list, String8 string);
|
internal String8Node* str8_list_push(Arena *arena, String8List *list, String8 string);
|
||||||
internal void str8_list_concat_in_place(String8List *list, String8List *to_push);
|
internal String8Node* str8_list_push_front(Arena *arena, String8List *list, String8 string);
|
||||||
internal String8Node* str8_list_push_aligner(Arena *arena, String8List *list, U64 min, U64 align);
|
internal void str8_list_concat_in_place(String8List *list, String8List *to_push);
|
||||||
internal String8Node* str8_list_pushf(Arena *arena, String8List *list, char *fmt, ...);
|
internal String8Node* str8_list_push_aligner(Arena *arena, String8List *list, U64 min, U64 align);
|
||||||
internal String8Node* str8_list_push_frontf(Arena *arena, String8List *list, char *fmt, ...);
|
internal String8Node* str8_list_pushf(Arena *arena, String8List *list, char *fmt, ...);
|
||||||
internal String8List str8_list_copy(Arena *arena, String8List *list);
|
internal String8Node* str8_list_push_frontf(Arena *arena, String8List *list, char *fmt, ...);
|
||||||
#define str8_list_first(list) ((list)->first ? (list)->first->string : str8_zero())
|
internal String8List str8_list_copy(Arena *arena, String8List *list);
|
||||||
|
#define str8_list_first(list) ((list)->first ? (list)->first->string : str8_zero())
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Splitting & Joining
|
////////////////////////////////
|
||||||
|
//~ rjf: String Splitting & Joining
|
||||||
internal String8List str8_split(Arena *arena, String8 string, U8 *split_chars, U64 split_char_count, StringSplitFlags flags);
|
|
||||||
internal String8List str8_split_by_string_chars(Arena *arena, String8 string, String8 split_chars, StringSplitFlags flags);
|
internal String8List str8_split(Arena *arena, String8 string, U8 *split_chars, U64 split_char_count, StringSplitFlags flags);
|
||||||
internal String8List str8_list_split_by_string_chars(Arena *arena, String8List list, String8 split_chars, StringSplitFlags flags);
|
internal String8List str8_split_by_string_chars(Arena *arena, String8 string, String8 split_chars, StringSplitFlags flags);
|
||||||
internal String8 str8_list_join(Arena *arena, String8List *list, StringJoin *optional_params);
|
internal String8List str8_list_split_by_string_chars(Arena *arena, String8List list, String8 split_chars, StringSplitFlags flags);
|
||||||
internal void str8_list_from_flags(Arena *arena, String8List *list, U32 flags, String8 *flag_string_table, U32 flag_string_count);
|
internal String8 str8_list_join(Arena *arena, String8List *list, StringJoin *optional_params);
|
||||||
|
internal void str8_list_from_flags(Arena *arena, String8List *list, U32 flags, String8 *flag_string_table, U32 flag_string_count);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf; String Arrays
|
////////////////////////////////
|
||||||
|
//~ rjf; String Arrays
|
||||||
internal String8Array str8_array_from_list(Arena *arena, String8List *list);
|
|
||||||
internal String8Array str8_array_reserve(Arena *arena, U64 count);
|
internal String8Array str8_array_from_list(Arena *arena, String8List *list);
|
||||||
|
internal String8Array str8_array_reserve(Arena *arena, U64 count);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Path Helpers
|
////////////////////////////////
|
||||||
|
//~ rjf: String Path Helpers
|
||||||
internal String8 str8_chop_last_slash(String8 string);
|
|
||||||
internal String8 str8_skip_last_slash(String8 string);
|
internal String8 str8_chop_last_slash(String8 string);
|
||||||
internal String8 str8_chop_last_dot(String8 string);
|
internal String8 str8_skip_last_slash(String8 string);
|
||||||
internal String8 str8_skip_last_dot(String8 string);
|
internal String8 str8_chop_last_dot(String8 string);
|
||||||
|
internal String8 str8_skip_last_dot(String8 string);
|
||||||
internal PathStyle path_style_from_str8(String8 string);
|
|
||||||
internal String8List str8_split_path(Arena *arena, String8 string);
|
internal PathStyle path_style_from_str8(String8 string);
|
||||||
internal void str8_path_list_resolve_dots_in_place(String8List *path, PathStyle style);
|
internal String8List str8_split_path(Arena *arena, String8 string);
|
||||||
internal String8 str8_path_list_join_by_style(Arena *arena, String8List *path, PathStyle style);
|
internal void str8_path_list_resolve_dots_in_place(String8List *path, PathStyle style);
|
||||||
|
internal String8 str8_path_list_join_by_style(Arena *arena, String8List *path, PathStyle style);
|
||||||
internal String8TxtPtPair str8_txt_pt_pair_from_string(String8 string);
|
|
||||||
|
internal String8TxtPtPair str8_txt_pt_pair_from_string(String8 string);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: UTF-8 & UTF-16 Decoding/Encoding
|
////////////////////////////////
|
||||||
|
//~ rjf: UTF-8 & UTF-16 Decoding/Encoding
|
||||||
internal UnicodeDecode utf8_decode(U8 *str, U64 max);
|
|
||||||
internal UnicodeDecode utf16_decode(U16 *str, U64 max);
|
internal UnicodeDecode utf8_decode(U8 *str, U64 max);
|
||||||
internal U32 utf8_encode(U8 *str, U32 codepoint);
|
internal UnicodeDecode utf16_decode(U16 *str, U64 max);
|
||||||
internal U32 utf16_encode(U16 *str, U32 codepoint);
|
internal U32 utf8_encode(U8 *str, U32 codepoint);
|
||||||
internal U32 utf8_from_utf32_single(U8 *buffer, U32 character);
|
internal U32 utf16_encode(U16 *str, U32 codepoint);
|
||||||
|
internal U32 utf8_from_utf32_single(U8 *buffer, U32 character);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Unicode String Conversions
|
////////////////////////////////
|
||||||
|
//~ rjf: Unicode String Conversions
|
||||||
internal String8 str8_from_16(Arena *arena, String16 in);
|
|
||||||
internal String16 str16_from_8(Arena *arena, String8 in);
|
internal String8 str8_from_16(Arena *arena, String16 in);
|
||||||
internal String8 str8_from_32(Arena *arena, String32 in);
|
internal String16 str16_from_8(Arena *arena, String8 in);
|
||||||
internal String32 str32_from_8(Arena *arena, String8 in);
|
internal String8 str8_from_32(Arena *arena, String32 in);
|
||||||
|
internal String32 str32_from_8(Arena *arena, String8 in);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Basic Types & Space Enum -> String Conversions
|
////////////////////////////////
|
||||||
|
//~ rjf: Basic Types & Space Enum -> String Conversions
|
||||||
internal String8 string_from_dimension(Dimension dimension);
|
|
||||||
internal String8 string_from_side(Side side);
|
internal String8 string_from_dimension(Dimension dimension);
|
||||||
internal String8 string_from_operating_system(OperatingSystem os);
|
internal String8 string_from_side(Side side);
|
||||||
internal String8 string_from_architecture(Architecture arch);
|
internal String8 string_from_operating_system(OperatingSystem os);
|
||||||
|
internal String8 string_from_arch(Arch arch);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Time Types -> String
|
////////////////////////////////
|
||||||
|
//~ rjf: Time Types -> String
|
||||||
internal String8 string_from_week_day(WeekDay week_day);
|
|
||||||
internal String8 string_from_month(Month month);
|
internal String8 string_from_week_day(WeekDay week_day);
|
||||||
internal String8 push_date_time_string(Arena *arena, DateTime *date_time);
|
internal String8 string_from_month(Month month);
|
||||||
internal String8 push_file_name_date_time_string(Arena *arena, DateTime *date_time);
|
internal String8 push_date_time_string(Arena *arena, DateTime *date_time);
|
||||||
internal String8 string_from_elapsed_time(Arena *arena, DateTime dt);
|
internal String8 push_file_name_date_time_string(Arena *arena, DateTime *date_time);
|
||||||
|
internal String8 string_from_elapsed_time(Arena *arena, DateTime dt);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Textual String Wrapping
|
////////////////////////////////
|
||||||
|
//~ rjf: Basic Text Indentation
|
||||||
internal String8List wrapped_lines_from_string(Arena *arena, String8 string, U64 first_line_max_width, U64 max_width, U64 wrap_indent);
|
|
||||||
|
internal String8 indented_from_string(Arena *arena, String8 string);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String <-> Color
|
////////////////////////////////
|
||||||
|
//~ rjf: Text Escaping
|
||||||
internal String8 hex_string_from_rgba_4f32(Arena *arena, Vec4F32 rgba);
|
|
||||||
internal Vec4F32 rgba_from_hex_string_4f32(String8 hex_string);
|
internal String8 escaped_from_raw_str8(Arena *arena, String8 string);
|
||||||
|
internal String8 raw_from_escaped_str8(Arena *arena, String8 string);
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: String Fuzzy Matching
|
////////////////////////////////
|
||||||
|
//~ rjf: Text Wrapping
|
||||||
internal FuzzyMatchRangeList fuzzy_match_find(Arena *arena, String8 needle, String8 haystack);
|
|
||||||
internal FuzzyMatchRangeList fuzzy_match_range_list_copy(Arena *arena, FuzzyMatchRangeList *src);
|
internal String8List wrapped_lines_from_string(Arena *arena, String8 string, U64 first_line_max_width, U64 max_width, U64 wrap_indent);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(allen): Serialization Helpers
|
//~ rjf: String <-> Color
|
||||||
|
|
||||||
internal void str8_serial_begin(Arena *arena, String8List *srl);
|
internal String8 hex_string_from_rgba_4f32(Arena *arena, Vec4F32 rgba);
|
||||||
internal String8 str8_serial_end(Arena *arena, String8List *srl);
|
internal Vec4F32 rgba_from_hex_string_4f32(String8 hex_string);
|
||||||
internal void str8_serial_write_to_dst(String8List *srl, void *out);
|
|
||||||
internal U64 str8_serial_push_align(Arena *arena, String8List *srl, U64 align);
|
////////////////////////////////
|
||||||
internal void * str8_serial_push_size(Arena *arena, String8List *srl, U64 size);
|
//~ rjf: String Fuzzy Matching
|
||||||
internal void * str8_serial_push_data(Arena *arena, String8List *srl, void *data, U64 size);
|
|
||||||
internal void str8_serial_push_data_list(Arena *arena, String8List *srl, String8Node *first);
|
internal FuzzyMatchRangeList fuzzy_match_find(Arena *arena, String8 needle, String8 haystack);
|
||||||
internal void str8_serial_push_u64(Arena *arena, String8List *srl, U64 x);
|
internal FuzzyMatchRangeList fuzzy_match_range_list_copy(Arena *arena, FuzzyMatchRangeList *src);
|
||||||
internal void str8_serial_push_u32(Arena *arena, String8List *srl, U32 x);
|
|
||||||
internal void str8_serial_push_u16(Arena *arena, String8List *srl, U16 x);
|
////////////////////////////////
|
||||||
internal void str8_serial_push_u8(Arena *arena, String8List *srl, U8 x);
|
//~ NOTE(allen): Serialization Helpers
|
||||||
internal void str8_serial_push_cstr(Arena *arena, String8List *srl, String8 str);
|
|
||||||
internal void str8_serial_push_string(Arena *arena, String8List *srl, String8 str);
|
internal void str8_serial_begin(Arena *arena, String8List *srl);
|
||||||
#define str8_serial_push_array(arena, srl, ptr, count) str8_serial_push_data(arena, srl, ptr, sizeof(*(ptr)) * (count))
|
internal String8 str8_serial_end(Arena *arena, String8List *srl);
|
||||||
#define str8_serial_push_struct(arena, srl, ptr) str8_serial_push_array(arena, srl, ptr, 1)
|
internal void str8_serial_write_to_dst(String8List *srl, void *out);
|
||||||
|
internal U64 str8_serial_push_align(Arena *arena, String8List *srl, U64 align);
|
||||||
////////////////////////////////
|
internal void * str8_serial_push_size(Arena *arena, String8List *srl, U64 size);
|
||||||
//~ rjf: Deserialization Helpers
|
internal void * str8_serial_push_data(Arena *arena, String8List *srl, void *data, U64 size);
|
||||||
|
internal void str8_serial_push_data_list(Arena *arena, String8List *srl, String8Node *first);
|
||||||
internal U64 str8_deserial_read(String8 string, U64 off, void *read_dst, U64 read_size, U64 granularity);
|
internal void str8_serial_push_u64(Arena *arena, String8List *srl, U64 x);
|
||||||
internal U64 str8_deserial_find_first_match(String8 string, U64 off, U16 scan_val);
|
internal void str8_serial_push_u32(Arena *arena, String8List *srl, U32 x);
|
||||||
internal void * str8_deserial_get_raw_ptr(String8 string, U64 off, U64 size);internal U64 str8_deserial_read_cstr(String8 string, U64 off, String8 *cstr_out);
|
internal void str8_serial_push_u16(Arena *arena, String8List *srl, U16 x);
|
||||||
internal U64 str8_deserial_read_windows_utf16_string16(String8 string, U64 off, String16 *str_out);
|
internal void str8_serial_push_u8(Arena *arena, String8List *srl, U8 x);
|
||||||
internal U64 str8_deserial_read_block(String8 string, U64 off, U64 size, String8 *block_out);
|
internal void str8_serial_push_cstr(Arena *arena, String8List *srl, String8 str);
|
||||||
#define str8_deserial_read_array(string, off, ptr, count) str8_deserial_read((string), (off), (ptr), sizeof(*(ptr))*(count), sizeof(*(ptr)))
|
internal void str8_serial_push_string(Arena *arena, String8List *srl, String8 str);
|
||||||
#define str8_deserial_read_struct(string, off, ptr) str8_deserial_read((string), (off), (ptr), sizeof(*(ptr)), sizeof(*(ptr)))
|
#define str8_serial_push_array(arena, srl, ptr, count) str8_serial_push_data(arena, srl, ptr, sizeof(*(ptr)) * (count))
|
||||||
|
#define str8_serial_push_struct(arena, srl, ptr) str8_serial_push_array(arena, srl, ptr, 1)
|
||||||
#endif // BASE_STRINGS_H
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Deserialization Helpers
|
||||||
|
|
||||||
|
internal U64 str8_deserial_read(String8 string, U64 off, void *read_dst, U64 read_size, U64 granularity);
|
||||||
|
internal U64 str8_deserial_find_first_match(String8 string, U64 off, U16 scan_val);
|
||||||
|
internal void * str8_deserial_get_raw_ptr(String8 string, U64 off, U64 size);internal U64 str8_deserial_read_cstr(String8 string, U64 off, String8 *cstr_out);
|
||||||
|
internal U64 str8_deserial_read_windows_utf16_string16(String8 string, U64 off, String16 *str_out);
|
||||||
|
internal U64 str8_deserial_read_block(String8 string, U64 off, U64 size, String8 *block_out);
|
||||||
|
#define str8_deserial_read_array(string, off, ptr, count) str8_deserial_read((string), (off), (ptr), sizeof(*(ptr))*(count), sizeof(*(ptr)))
|
||||||
|
#define str8_deserial_read_struct(string, off, ptr) str8_deserial_read((string), (off), (ptr), sizeof(*(ptr)), sizeof(*(ptr)))
|
||||||
|
|
||||||
|
#endif // BASE_STRINGS_H
|
||||||
|
|||||||
@@ -1,87 +1,87 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// NOTE(allen): Thread Context Functions
|
// NOTE(allen): Thread Context Functions
|
||||||
|
|
||||||
C_LINKAGE thread_static TCTX* tctx_thread_local;
|
C_LINKAGE thread_static TCTX* tctx_thread_local;
|
||||||
#if !BUILD_SUPPLEMENTARY_UNIT
|
#if !BUILD_SUPPLEMENTARY_UNIT
|
||||||
C_LINKAGE thread_static TCTX* tctx_thread_local = 0;
|
C_LINKAGE thread_static TCTX* tctx_thread_local = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
tctx_init_and_equip(TCTX *tctx){
|
tctx_init_and_equip(TCTX *tctx){
|
||||||
MemoryZeroStruct(tctx);
|
MemoryZeroStruct(tctx);
|
||||||
Arena **arena_ptr = tctx->arenas;
|
Arena **arena_ptr = tctx->arenas;
|
||||||
for (U64 i = 0; i < ArrayCount(tctx->arenas); i += 1, arena_ptr += 1){
|
for (U64 i = 0; i < ArrayCount(tctx->arenas); i += 1, arena_ptr += 1){
|
||||||
*arena_ptr = arena_alloc();
|
*arena_ptr = arena_alloc();
|
||||||
}
|
}
|
||||||
tctx_thread_local = tctx;
|
tctx_thread_local = tctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
tctx_release(void)
|
tctx_release(void)
|
||||||
{
|
{
|
||||||
for(U64 i = 0; i < ArrayCount(tctx_thread_local->arenas); i += 1)
|
for(U64 i = 0; i < ArrayCount(tctx_thread_local->arenas); i += 1)
|
||||||
{
|
{
|
||||||
arena_release(tctx_thread_local->arenas[i]);
|
arena_release(tctx_thread_local->arenas[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal TCTX*
|
internal TCTX*
|
||||||
tctx_get_equipped(void){
|
tctx_get_equipped(void){
|
||||||
return(tctx_thread_local);
|
return(tctx_thread_local);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Arena*
|
internal Arena*
|
||||||
tctx_get_scratch(Arena **conflicts, U64 count){
|
tctx_get_scratch(Arena **conflicts, U64 count){
|
||||||
TCTX *tctx = tctx_get_equipped();
|
TCTX *tctx = tctx_get_equipped();
|
||||||
|
|
||||||
Arena *result = 0;
|
Arena *result = 0;
|
||||||
Arena **arena_ptr = tctx->arenas;
|
Arena **arena_ptr = tctx->arenas;
|
||||||
for (U64 i = 0; i < ArrayCount(tctx->arenas); i += 1, arena_ptr += 1){
|
for (U64 i = 0; i < ArrayCount(tctx->arenas); i += 1, arena_ptr += 1){
|
||||||
Arena **conflict_ptr = conflicts;
|
Arena **conflict_ptr = conflicts;
|
||||||
B32 has_conflict = 0;
|
B32 has_conflict = 0;
|
||||||
for (U64 j = 0; j < count; j += 1, conflict_ptr += 1){
|
for (U64 j = 0; j < count; j += 1, conflict_ptr += 1){
|
||||||
if (*arena_ptr == *conflict_ptr){
|
if (*arena_ptr == *conflict_ptr){
|
||||||
has_conflict = 1;
|
has_conflict = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!has_conflict){
|
if (!has_conflict){
|
||||||
result = *arena_ptr;
|
result = *arena_ptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
tctx_set_thread_name(String8 string){
|
tctx_set_thread_name(String8 string){
|
||||||
TCTX *tctx = tctx_get_equipped();
|
TCTX *tctx = tctx_get_equipped();
|
||||||
U64 size = ClampTop(string.size, sizeof(tctx->thread_name));
|
U64 size = ClampTop(string.size, sizeof(tctx->thread_name));
|
||||||
MemoryCopy(tctx->thread_name, string.str, size);
|
MemoryCopy(tctx->thread_name, string.str, size);
|
||||||
tctx->thread_name_size = size;
|
tctx->thread_name_size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal String8
|
internal String8
|
||||||
tctx_get_thread_name(void){
|
tctx_get_thread_name(void){
|
||||||
TCTX *tctx = tctx_get_equipped();
|
TCTX *tctx = tctx_get_equipped();
|
||||||
String8 result = str8(tctx->thread_name, tctx->thread_name_size);
|
String8 result = str8(tctx->thread_name, tctx->thread_name_size);
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
tctx_write_srcloc(char *file_name, U64 line_number){
|
tctx_write_srcloc(char *file_name, U64 line_number){
|
||||||
TCTX *tctx = tctx_get_equipped();
|
TCTX *tctx = tctx_get_equipped();
|
||||||
tctx->file_name = file_name;
|
tctx->file_name = file_name;
|
||||||
tctx->line_number = line_number;
|
tctx->line_number = line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
tctx_read_srcloc(char **file_name, U64 *line_number){
|
tctx_read_srcloc(char **file_name, U64 *line_number){
|
||||||
TCTX *tctx = tctx_get_equipped();
|
TCTX *tctx = tctx_get_equipped();
|
||||||
*file_name = tctx->file_name;
|
*file_name = tctx->file_name;
|
||||||
*line_number = tctx->line_number;
|
*line_number = tctx->line_number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,41 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef BASE_THREAD_CONTEXT_H
|
#ifndef BASE_THREAD_CONTEXT_H
|
||||||
#define BASE_THREAD_CONTEXT_H
|
#define BASE_THREAD_CONTEXT_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// NOTE(allen): Thread Context
|
// NOTE(allen): Thread Context
|
||||||
|
|
||||||
typedef struct TCTX TCTX;
|
typedef struct TCTX TCTX;
|
||||||
struct TCTX
|
struct TCTX
|
||||||
{
|
{
|
||||||
Arena *arenas[2];
|
Arena *arenas[2];
|
||||||
|
|
||||||
U8 thread_name[32];
|
U8 thread_name[32];
|
||||||
U64 thread_name_size;
|
U64 thread_name_size;
|
||||||
|
|
||||||
char *file_name;
|
char *file_name;
|
||||||
U64 line_number;
|
U64 line_number;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// NOTE(allen): Thread Context Functions
|
// NOTE(allen): Thread Context Functions
|
||||||
|
|
||||||
internal void tctx_init_and_equip(TCTX *tctx);
|
internal void tctx_init_and_equip(TCTX *tctx);
|
||||||
internal void tctx_release(void);
|
internal void tctx_release(void);
|
||||||
internal TCTX* tctx_get_equipped(void);
|
internal TCTX* tctx_get_equipped(void);
|
||||||
|
|
||||||
internal Arena* tctx_get_scratch(Arena **conflicts, U64 count);
|
internal Arena* tctx_get_scratch(Arena **conflicts, U64 countt);
|
||||||
|
|
||||||
internal void tctx_set_thread_name(String8 name);
|
internal void tctx_set_thread_name(String8 name);
|
||||||
internal String8 tctx_get_thread_name(void);
|
internal String8 tctx_get_thread_name(void);
|
||||||
|
|
||||||
internal void tctx_write_srcloc(char *file_name, U64 line_number);
|
internal void tctx_write_srcloc(char *file_name, U64 line_number);
|
||||||
internal void tctx_read_srcloc(char **file_name, U64 *line_number);
|
internal void tctx_read_srcloc(char **file_name, U64 *line_number);
|
||||||
#define tctx_write_this_srcloc() tctx_write_srcloc(__FILE__, __LINE__)
|
#define tctx_write_this_srcloc() tctx_write_srcloc(__FILE__, __LINE__)
|
||||||
|
|
||||||
#define scratch_begin(conflicts, count) temp_begin(tctx_get_scratch((conflicts), (count)))
|
#define scratch_begin(conflicts, count) temp_begin(tctx_get_scratch((conflicts), (count)))
|
||||||
#define scratch_end(scratch) temp_end(scratch)
|
#define scratch_end(scratch) temp_end(scratch)
|
||||||
|
|
||||||
#endif //BASE_THREAD_CONTEXT_H
|
#endif // BASE_THREAD_CONTEXT_H
|
||||||
|
|||||||
+647
-507
File diff suppressed because it is too large
Load Diff
+3121
-2938
File diff suppressed because it is too large
Load Diff
+630
-622
File diff suppressed because it is too large
Load Diff
+2342
-2330
File diff suppressed because it is too large
Load Diff
@@ -1,82 +1,84 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef CODEVIEW_STRINGIZE_H
|
#ifndef CODEVIEW_STRINGIZE_H
|
||||||
#define CODEVIEW_STRINGIZE_H
|
#define CODEVIEW_STRINGIZE_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ CodeView Stringize Helper Types
|
//~ CodeView Stringize Helper Types
|
||||||
|
|
||||||
typedef struct CV_StringizeSymParams{
|
typedef struct CV_StringizeSymParams{
|
||||||
CV_Arch arch;
|
CV_Arch arch;
|
||||||
} CV_StringizeSymParams;
|
} CV_StringizeSymParams;
|
||||||
|
|
||||||
typedef struct CV_StringizeLeafParams{
|
typedef struct CV_StringizeLeafParams{
|
||||||
U32 dummy;
|
U32 dummy;
|
||||||
} CV_StringizeLeafParams;
|
} CV_StringizeLeafParams;
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ CodeView Common Stringize Functions
|
//~ CodeView Common Stringize Functions
|
||||||
|
|
||||||
internal void cv_stringize_numeric(Arena *arena, String8List *out, CV_NumericParsed *num);
|
internal void cv_stringize_numeric(Arena *arena, String8List *out, CV_NumericParsed *num);
|
||||||
|
|
||||||
internal void cv_stringize_lvar_addr_range(Arena *arena, String8List *out,
|
internal void cv_stringize_lvar_addr_range(Arena *arena, String8List *out,
|
||||||
CV_LvarAddrRange *range);
|
CV_LvarAddrRange *range);
|
||||||
internal void cv_stringize_lvar_addr_gap(Arena *arena, String8List *out, CV_LvarAddrGap *gap);
|
internal void cv_stringize_lvar_addr_gap(Arena *arena, String8List *out, CV_LvarAddrGap *gap);
|
||||||
internal void cv_stringize_lvar_addr_gap_list(Arena *arena, String8List *out,
|
internal void cv_stringize_lvar_addr_gap_list(Arena *arena, String8List *out,
|
||||||
void *first, void *opl);
|
void *first, void *opl);
|
||||||
|
|
||||||
internal String8 cv_string_from_basic_type(CV_BasicType basic_type);
|
internal String8 cv_string_from_basic_type(CV_BasicType basic_type);
|
||||||
internal String8 cv_string_from_c13_sub_section_kind(CV_C13_SubSectionKind kind);
|
internal String8 cv_string_from_c13_sub_section_kind(CV_C13SubSectionKind kind);
|
||||||
internal String8 cv_string_from_reg(CV_Arch arch, CV_Reg reg);
|
internal String8 cv_string_from_reg(CV_Arch arch, CV_Reg reg);
|
||||||
internal String8 cv_string_from_pointer_kind(CV_PointerKind ptr_kind);
|
internal String8 cv_string_from_pointer_kind(CV_PointerKind ptr_kind);
|
||||||
internal String8 cv_string_from_pointer_mode(CV_PointerMode ptr_mode);
|
internal String8 cv_string_from_pointer_mode(CV_PointerMode ptr_mode);
|
||||||
internal String8 cv_string_from_hfa_kind(CV_HFAKind hfa_kind);
|
internal String8 cv_string_from_hfa_kind(CV_HFAKind hfa_kind);
|
||||||
internal String8 cv_string_from_mo_com_udt_kind(CV_MoComUDTKind mo_com_udt_kind);
|
internal String8 cv_string_from_mo_com_udt_kind(CV_MoComUDTKind mo_com_udt_kind);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ CodeView Flags Stringize Functions
|
//~ CodeView Flags Stringize Functions
|
||||||
|
|
||||||
internal void cv_stringize_modifier_flags(Arena *arena, String8List *out,
|
internal void cv_stringize_modifier_flags(Arena *arena, String8List *out,
|
||||||
U32 indent, CV_ModifierFlags flags);
|
U32 indent, CV_ModifierFlags flags);
|
||||||
|
|
||||||
internal void cv_stringize_type_props(Arena *arena, String8List *out,
|
internal void cv_stringize_type_props(Arena *arena, String8List *out,
|
||||||
U32 indent, CV_TypeProps props);
|
U32 indent, CV_TypeProps props);
|
||||||
|
|
||||||
internal void cv_stringize_pointer_attribs(Arena *arena, String8List *out,
|
internal void cv_stringize_pointer_attribs(Arena *arena, String8List *out,
|
||||||
U32 indent, CV_PointerAttribs attribs);
|
U32 indent, CV_PointerAttribs attribs);
|
||||||
|
|
||||||
internal void cv_stringize_local_flags(Arena *arena, String8List *out,
|
internal void cv_stringize_local_flags(Arena *arena, String8List *out,
|
||||||
U32 indent, CV_LocalFlags flags);
|
U32 indent, CV_LocalFlags flags);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ CodeView Sym Stringize Functions
|
//~ CodeView Sym Stringize Functions
|
||||||
|
|
||||||
internal void cv_stringize_sym_parsed(Arena *arena, String8List *out, CV_SymParsed *sym);
|
internal void cv_stringize_sym_parsed(Arena *arena, String8List *out, CV_SymParsed *sym);
|
||||||
|
|
||||||
internal void cv_stringize_sym_range(Arena *arena, String8List *out,
|
internal void cv_stringize_sym_range(Arena *arena, String8List *out,
|
||||||
CV_RecRange *range, String8 data,
|
CV_RecRange *range, String8 data,
|
||||||
CV_StringizeSymParams *p);
|
CV_StringizeSymParams *p);
|
||||||
internal void cv_stringize_sym_array(Arena *arena, String8List *out,
|
internal void cv_stringize_sym_array(Arena *arena, String8List *out,
|
||||||
CV_RecRangeArray *ranges, String8 data,
|
CV_RecRangeArray *ranges, String8 data,
|
||||||
CV_StringizeSymParams *p);
|
CV_StringizeSymParams *p);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ CodeView Leaf Stringize Functions
|
//~ CodeView Leaf Stringize Functions
|
||||||
|
|
||||||
internal void cv_stringize_leaf_parsed(Arena *arena, String8List *out, CV_LeafParsed *leaf);
|
internal void cv_stringize_leaf_parsed(Arena *arena, String8List *out, CV_LeafParsed *leaf);
|
||||||
|
|
||||||
internal void cv_stringize_leaf_range(Arena *arena, String8List *out,
|
internal void cv_stringize_leaf_range(Arena *arena, String8List *out,
|
||||||
CV_RecRange *range, CV_TypeId itype, String8 data,
|
CV_RecRange *range, CV_TypeId itype, String8 data,
|
||||||
CV_StringizeLeafParams *p);
|
CV_StringizeLeafParams *p);
|
||||||
internal void cv_stringize_leaf_array(Arena *arena, String8List *out,
|
internal void cv_stringize_leaf_array(Arena *arena, String8List *out,
|
||||||
CV_RecRangeArray *ranges, CV_TypeId itype_first,
|
CV_RecRangeArray *ranges, CV_TypeId itype_first,
|
||||||
String8 data,
|
String8 data,
|
||||||
CV_StringizeLeafParams *p);
|
CV_StringizeLeafParams *p);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ CodeView C13 Stringize Functions
|
//~ CodeView C13 Stringize Functions
|
||||||
|
|
||||||
internal void cv_stringize_c13_parsed(Arena *arena, String8List *out, CV_C13Parsed *c13);
|
internal void cv_stringize_c13_parsed(Arena *arena, String8List *out, CV_C13Parsed *c13);
|
||||||
|
|
||||||
#endif // CODEVIEW_STRINGIZE_H
|
internal String8 cv_string_from_inline_range_kind(CV_InlineRangeKind kind);
|
||||||
|
|
||||||
|
#endif // CODEVIEW_STRINGIZE_H
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1377
-1119
File diff suppressed because it is too large
Load Diff
+56
-8
@@ -48,7 +48,7 @@ enum
|
|||||||
COFF_MachineType_UNKNOWN = 0x0,
|
COFF_MachineType_UNKNOWN = 0x0,
|
||||||
COFF_MachineType_X86 = 0x14c,
|
COFF_MachineType_X86 = 0x14c,
|
||||||
COFF_MachineType_X64 = 0x8664,
|
COFF_MachineType_X64 = 0x8664,
|
||||||
COFF_MachineType_ARM33 = 0x1d3,
|
COFF_MachineType_AM33 = 0x1d3,
|
||||||
COFF_MachineType_ARM = 0x1c0,
|
COFF_MachineType_ARM = 0x1c0,
|
||||||
COFF_MachineType_ARM64 = 0xaa64,
|
COFF_MachineType_ARM64 = 0xaa64,
|
||||||
COFF_MachineType_ARMNT = 0x1c4,
|
COFF_MachineType_ARMNT = 0x1c4,
|
||||||
@@ -556,6 +556,11 @@ typedef U32 COFF_FeatFlags;
|
|||||||
|
|
||||||
#define COFF_RES_ALIGN 4u
|
#define COFF_RES_ALIGN 4u
|
||||||
|
|
||||||
|
read_only U8 g_coff_res_magic[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct COFF_ResourceHeaderPrefix
|
typedef struct COFF_ResourceHeaderPrefix
|
||||||
{
|
{
|
||||||
U32 data_size;
|
U32 data_size;
|
||||||
@@ -643,14 +648,12 @@ typedef struct COFF_ResourceDirEntry
|
|||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|
||||||
// !<arch>\n
|
read_only global U8 g_coff_archive_sig[8] = "!<arch>\n";
|
||||||
#define COFF_ARCHIVE_SIG 0x0A3E686372613C21ULL
|
read_only global U8 g_coff_thin_archive_sig[8] = "!<thin>\n";
|
||||||
// !<thin>\n
|
|
||||||
#define COFF_THIN_ARCHIVE_SIG 0xA3E6E6968743C21ULL
|
|
||||||
|
|
||||||
|
#define COFF_ARCHIVE_ALIGN 2
|
||||||
#define COFF_ARCHIVE_MAX_SHORT_NAME_SIZE 15
|
#define COFF_ARCHIVE_MAX_SHORT_NAME_SIZE 15
|
||||||
|
#define COFF_ARCHIVE_MEMBER_HEADER_SIZE 60
|
||||||
#define COFF_ARCHIVE_ALIGN 2
|
|
||||||
|
|
||||||
typedef struct COFF_ArchiveMemberHeader
|
typedef struct COFF_ArchiveMemberHeader
|
||||||
{
|
{
|
||||||
@@ -817,6 +820,14 @@ typedef struct COFF_ArchiveParse
|
|||||||
String8 long_names;
|
String8 long_names;
|
||||||
} COFF_ArchiveParse;
|
} COFF_ArchiveParse;
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
|
||||||
|
typedef struct COFF_SectionHeaderArray
|
||||||
|
{
|
||||||
|
U64 count;
|
||||||
|
COFF_SectionHeader *v;
|
||||||
|
} COFF_SectionHeaderArray;
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Globals
|
//~ rjf: Globals
|
||||||
|
|
||||||
@@ -844,18 +855,48 @@ internal COFF_Symbol32Array coff_symbol_array_from_data(Arena *arena, String8 d
|
|||||||
internal COFF_Symbol16Node * coff_symbol16_list_push(Arena *arena, COFF_Symbol16List *list, COFF_Symbol16 symbol);
|
internal COFF_Symbol16Node * coff_symbol16_list_push(Arena *arena, COFF_Symbol16List *list, COFF_Symbol16 symbol);
|
||||||
internal COFF_RelocInfo coff_reloc_info_from_section_header(String8 data, COFF_SectionHeader *header);
|
internal COFF_RelocInfo coff_reloc_info_from_section_header(String8 data, COFF_SectionHeader *header);
|
||||||
|
|
||||||
internal U64 coff_word_size_from_machine(COFF_MachineType machine);
|
internal U64 coff_word_size_from_machine(COFF_MachineType machine);
|
||||||
|
internal U64 coff_default_exe_base_from_machine(COFF_MachineType machine);
|
||||||
|
internal U64 coff_default_dll_base_from_machine(COFF_MachineType machine);
|
||||||
|
|
||||||
internal String8 coff_make_import_lookup(Arena *arena, U16 hint, String8 name);
|
internal String8 coff_make_import_lookup(Arena *arena, U16 hint, String8 name);
|
||||||
internal U32 coff_make_ordinal_32(U16 hint);
|
internal U32 coff_make_ordinal_32(U16 hint);
|
||||||
internal U64 coff_make_ordinal_64(U16 hint);
|
internal U64 coff_make_ordinal_64(U16 hint);
|
||||||
|
|
||||||
|
internal String8 coff_make_import_header_by_name(Arena *arena,
|
||||||
|
String8 dll_name,
|
||||||
|
COFF_MachineType machine,
|
||||||
|
COFF_TimeStamp time_stamp,
|
||||||
|
String8 name,
|
||||||
|
U16 hint,
|
||||||
|
COFF_ImportHeaderType type);
|
||||||
|
internal String8 coff_make_import_header_by_ordinal(Arena *arena,
|
||||||
|
String8 dll_name,
|
||||||
|
COFF_MachineType machine,
|
||||||
|
COFF_TimeStamp time_stamp,
|
||||||
|
U16 ordinal,
|
||||||
|
COFF_ImportHeaderType type);
|
||||||
|
|
||||||
|
|
||||||
internal B32 coff_resource_id_is_equal(COFF_ResourceID a, COFF_ResourceID b);
|
internal B32 coff_resource_id_is_equal(COFF_ResourceID a, COFF_ResourceID b);
|
||||||
internal COFF_ResourceID coff_resource_id_copy(Arena *arena, COFF_ResourceID id);
|
internal COFF_ResourceID coff_resource_id_copy(Arena *arena, COFF_ResourceID id);
|
||||||
|
internal U64 coff_sizeof_resource_id(COFF_ResourceID id);
|
||||||
internal COFF_ResourceID coff_convert_resource_id(Arena *arena, COFF_ResourceID_16 *id_16);
|
internal COFF_ResourceID coff_convert_resource_id(Arena *arena, COFF_ResourceID_16 *id_16);
|
||||||
internal U64 coff_read_resource_id(String8 res, U64 off, COFF_ResourceID_16 *id_out);
|
internal U64 coff_read_resource_id(String8 res, U64 off, COFF_ResourceID_16 *id_out);
|
||||||
internal U64 coff_read_resource(String8 data, U64 off, Arena *arena, COFF_Resource *res_out);
|
internal U64 coff_read_resource(String8 data, U64 off, Arena *arena, COFF_Resource *res_out);
|
||||||
internal COFF_ResourceList coff_resource_list_from_data(Arena *arena, String8 data);
|
internal COFF_ResourceList coff_resource_list_from_data(Arena *arena, String8 data);
|
||||||
|
|
||||||
|
internal void coff_write_resource_id(Arena *arena, String8List *srl, COFF_ResourceID id);
|
||||||
|
internal String8List coff_write_resource(Arena *arena,
|
||||||
|
COFF_ResourceID type,
|
||||||
|
COFF_ResourceID name,
|
||||||
|
U32 data_version,
|
||||||
|
COFF_ResourceMemoryFlags memory_flags,
|
||||||
|
U16 language_id,
|
||||||
|
U32 version,
|
||||||
|
U32 characteristics,
|
||||||
|
String8 data);
|
||||||
|
|
||||||
internal COFF_DataType coff_data_type_from_data(String8 data);
|
internal COFF_DataType coff_data_type_from_data(String8 data);
|
||||||
internal B32 coff_is_import(String8 data);
|
internal B32 coff_is_import(String8 data);
|
||||||
internal B32 coff_is_archive(String8 data);
|
internal B32 coff_is_archive(String8 data);
|
||||||
@@ -875,8 +916,15 @@ internal COFF_ArchiveParse coff_thin_archive_from_data(Arena *arena, String8 da
|
|||||||
internal COFF_ArchiveType coff_archive_type_from_data(String8 data);
|
internal COFF_ArchiveType coff_archive_type_from_data(String8 data);
|
||||||
internal COFF_ArchiveParse coff_archive_parse_from_data(Arena *arena, String8 data);
|
internal COFF_ArchiveParse coff_archive_parse_from_data(Arena *arena, String8 data);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
// String <-> Enum
|
||||||
|
|
||||||
internal String8 coff_string_from_comdat_select_type(COFF_ComdatSelectType select);
|
internal String8 coff_string_from_comdat_select_type(COFF_ComdatSelectType select);
|
||||||
internal String8 coff_string_from_machine_type(COFF_MachineType machine);
|
internal String8 coff_string_from_machine_type(COFF_MachineType machine);
|
||||||
internal String8 coff_string_from_section_flags(Arena *arena, COFF_SectionFlags flags);
|
internal String8 coff_string_from_section_flags(Arena *arena, COFF_SectionFlags flags);
|
||||||
|
internal String8 coff_string_from_import_header_type(COFF_ImportHeaderType type);
|
||||||
|
|
||||||
|
internal COFF_MachineType coff_machine_from_string(String8 string);
|
||||||
|
internal COFF_ImportHeaderType coff_import_header_type_from_string(String8 name);
|
||||||
|
|
||||||
#endif //COFF_H
|
#endif //COFF_H
|
||||||
|
|||||||
+106
-81
@@ -1,81 +1,106 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Tables
|
//~ rjf: Entity Kinds
|
||||||
|
|
||||||
@table(name lower_name code default display_string)
|
@table(name display_string)
|
||||||
CTRL_ExceptionCodeKindTable:
|
CTRL_EntityKindTable:
|
||||||
{
|
{
|
||||||
{Win32CtrlC win32_ctrl_c 0x40010005 1 "(Win32) Control-C" }
|
{Root "Root" }
|
||||||
{Win32CtrlBreak win32_ctrl_break 0x40010008 1 "(Win32) Control-Break" }
|
{Machine "Machine" }
|
||||||
{Win32WinRTOriginateError win32_win_rt_originate_error 0x40080201 0 "(Win32) WinRT Originate Error" }
|
{Process "Process" }
|
||||||
{Win32WinRTTransformError win32_win_rt_transform_error 0x40080202 0 "(Win32) WinRT Transform Error" }
|
{Thread "Thread" }
|
||||||
{Win32RPCCallCancelled win32_rpc_call_cancelled 0x0000071a 0 "(Win32) RPC Call Cancelled" }
|
{Module "Module" }
|
||||||
{Win32DatatypeMisalignment win32_datatype_misalignment 0x80000002 0 "(Win32) Data Type Misalignment" }
|
{EntryPoint "Entry Point" }
|
||||||
{Win32AccessViolation win32_access_violation 0xc0000005 1 "(Win32) Access Violation" }
|
{DebugInfoPath "Debug Info Path" }
|
||||||
{Win32InPageError win32_in_page_error 0xc0000006 0 "(Win32) In Page Error" }
|
}
|
||||||
{Win32InvalidHandle win32_invalid_handle 0xc0000008 1 "(Win32) Invalid Handle Specified" }
|
|
||||||
{Win32NotEnoughQuota win32_not_enough_quota 0xc0000017 0 "(Win32) Not Enough Quota" }
|
@enum CTRL_EntityKind:
|
||||||
{Win32IllegalInstruction win32_illegal_instruction 0xc000001d 0 "(Win32) Illegal Instruction" }
|
{
|
||||||
{Win32CannotContinueException win32_cannot_continue_exception 0xc0000025 0 "(Win32) Cannot Continue From Exception" }
|
Null,
|
||||||
{Win32InvalidExceptionDisposition win32_invalid_exception_disposition 0xc0000026 0 "(Win32) Invalid Exception Disposition Returned By Handler" }
|
@expand(CTRL_EntityKindTable a) `$(a.name)`,
|
||||||
{Win32ArrayBoundsExceeded win32_array_bounds_exceeded 0xc000008c 0 "(Win32) Array Bounds Exceeded" }
|
COUNT,
|
||||||
{Win32FloatingPointDenormalOperand win32_floating_point_denormal_operand 0xc000008d 0 "(Win32) Floating-Point Denormal Operand" }
|
}
|
||||||
{Win32FloatingPointDivisionByZero win32_floating_point_division_by_zero 0xc000008e 0 "(Win32) Floating-Point Division By Zero" }
|
|
||||||
{Win32FloatingPointInexactResult win32_floating_point_inexact_result 0xc000008f 0 "(Win32) Floating-Point Inexact Result" }
|
@data(String8) ctrl_entity_kind_display_string_table:
|
||||||
{Win32FloatingPointInvalidOperation win32_floating_point_invalid_operation 0xc0000090 0 "(Win32) Floating-Point Invalid Operation" }
|
{
|
||||||
{Win32FloatingPointOverflow win32_floating_point_overflow 0xc0000091 0 "(Win32) Floating-Point Overflow" }
|
`{0}`,
|
||||||
{Win32FloatingPointStackCheck win32_floating_point_stack_check 0xc0000092 0 "(Win32) Floating-Point Stack Check" }
|
@expand(CTRL_EntityKindTable a) `str8_lit_comp("$(a.display_name)")`
|
||||||
{Win32FloatingPointUnderflow win32_floating_point_underflow 0xc0000093 0 "(Win32) Floating-Point Underflow" }
|
}
|
||||||
{Win32IntegerDivisionByZero win32_integer_division_by_zero 0xc0000094 0 "(Win32) Integer Division By Zero" }
|
|
||||||
{Win32IntegerOverflow win32_integer_overflow 0xc0000095 0 "(Win32) Integer Overflow" }
|
////////////////////////////////
|
||||||
{Win32PrivilegedInstruction win32_privileged_instruction 0xc0000096 0 "(Win32) Privileged Instruction" }
|
//~ rjf: Exception Codes
|
||||||
{Win32StackOverflow win32_stack_overflow 0xc00000fd 0 "(Win32) Stack Overflow" }
|
|
||||||
{Win32UnableToLocateDLL win32_unable_to_locate_dll 0xc0000135 0 "(Win32) Unable To Locate DLL" }
|
@table(name lower_name code default display_string)
|
||||||
{Win32OrdinalNotFound win32_ordinal_not_found 0xc0000138 0 "(Win32) Ordinal Not Found" }
|
CTRL_ExceptionCodeKindTable:
|
||||||
{Win32EntryPointNotFound win32_entry_point_not_found 0xc0000139 0 "(Win32) Entry Point Not Found" }
|
{
|
||||||
{Win32DLLInitializationFailed win32_dll_initialization_failed 0xc0000142 0 "(Win32) DLL Initialization Failed" }
|
{Win32CtrlC win32_ctrl_c 0x40010005 1 "(Win32) Control-C" }
|
||||||
{Win32FloatingPointSSEMultipleFaults win32_floating_point_sse_multiple_faults 0xc00002b4 0 "(Win32) Floating Point SSE Multiple Faults" }
|
{Win32CtrlBreak win32_ctrl_break 0x40010008 1 "(Win32) Control-Break" }
|
||||||
{Win32FloatingPointSSEMultipleTraps win32_floating_point_sse_multiple_traps 0xc00002b5 0 "(Win32) Floating Point SSE Multiple Traps" }
|
{Win32WinRTOriginateError win32_win_rt_originate_error 0x40080201 0 "(Win32) WinRT Originate Error" }
|
||||||
{Win32AssertionFailed win32_assertion_failed 0xc0000420 1 "(Win32) Assertion Failed" }
|
{Win32WinRTTransformError win32_win_rt_transform_error 0x40080202 0 "(Win32) WinRT Transform Error" }
|
||||||
{Win32ModuleNotFound win32_module_not_found 0xc06d007e 0 "(Win32) Module Not Found" }
|
{Win32RPCCallCancelled win32_rpc_call_cancelled 0x0000071a 0 "(Win32) RPC Call Cancelled" }
|
||||||
{Win32ProcedureNotFound win32_procedure_not_found 0xc06d007f 0 "(Win32) Procedure Not Found" }
|
{Win32DatatypeMisalignment win32_datatype_misalignment 0x80000002 0 "(Win32) Data Type Misalignment" }
|
||||||
{Win32SanitizerErrorDetected win32_sanitizer_error_detected 0xe073616e 1 "(Win32) Sanitizer Error Detected" }
|
{Win32AccessViolation win32_access_violation 0xc0000005 1 "(Win32) Access Violation" }
|
||||||
{Win32SanitizerRawAccessViolation win32_sanitizer_raw_access_violation 0xe0736171 0 "(Win32) Sanitizer Raw Access Violation" }
|
{Win32InPageError win32_in_page_error 0xc0000006 0 "(Win32) In Page Error" }
|
||||||
{Win32DirectXDebugLayer win32_directx_debug_layer 0x0000087a 1 "(Win32) DirectX Debug Layer" }
|
{Win32InvalidHandle win32_invalid_handle 0xc0000008 1 "(Win32) Invalid Handle Specified" }
|
||||||
}
|
{Win32NotEnoughQuota win32_not_enough_quota 0xc0000017 0 "(Win32) Not Enough Quota" }
|
||||||
|
{Win32IllegalInstruction win32_illegal_instruction 0xc000001d 0 "(Win32) Illegal Instruction" }
|
||||||
////////////////////////////////
|
{Win32CannotContinueException win32_cannot_continue_exception 0xc0000025 0 "(Win32) Cannot Continue From Exception" }
|
||||||
//~ rjf: Generators
|
{Win32InvalidExceptionDisposition win32_invalid_exception_disposition 0xc0000026 0 "(Win32) Invalid Exception Disposition Returned By Handler" }
|
||||||
|
{Win32ArrayBoundsExceeded win32_array_bounds_exceeded 0xc000008c 0 "(Win32) Array Bounds Exceeded" }
|
||||||
@enum CTRL_ExceptionCodeKind:
|
{Win32FloatingPointDenormalOperand win32_floating_point_denormal_operand 0xc000008d 0 "(Win32) Floating-Point Denormal Operand" }
|
||||||
{
|
{Win32FloatingPointDivisionByZero win32_floating_point_division_by_zero 0xc000008e 0 "(Win32) Floating-Point Division By Zero" }
|
||||||
Null,
|
{Win32FloatingPointInexactResult win32_floating_point_inexact_result 0xc000008f 0 "(Win32) Floating-Point Inexact Result" }
|
||||||
@expand(CTRL_ExceptionCodeKindTable a) `$(a.name)`,
|
{Win32FloatingPointInvalidOperation win32_floating_point_invalid_operation 0xc0000090 0 "(Win32) Floating-Point Invalid Operation" }
|
||||||
COUNT,
|
{Win32FloatingPointOverflow win32_floating_point_overflow 0xc0000091 0 "(Win32) Floating-Point Overflow" }
|
||||||
}
|
{Win32FloatingPointStackCheck win32_floating_point_stack_check 0xc0000092 0 "(Win32) Floating-Point Stack Check" }
|
||||||
|
{Win32FloatingPointUnderflow win32_floating_point_underflow 0xc0000093 0 "(Win32) Floating-Point Underflow" }
|
||||||
@data(U32) ctrl_exception_code_kind_code_table:
|
{Win32IntegerDivisionByZero win32_integer_division_by_zero 0xc0000094 0 "(Win32) Integer Division By Zero" }
|
||||||
{
|
{Win32IntegerOverflow win32_integer_overflow 0xc0000095 0 "(Win32) Integer Overflow" }
|
||||||
`0`;
|
{Win32PrivilegedInstruction win32_privileged_instruction 0xc0000096 0 "(Win32) Privileged Instruction" }
|
||||||
@expand(CTRL_ExceptionCodeKindTable a) `$(a.code)`;
|
{Win32StackOverflow win32_stack_overflow 0xc00000fd 0 "(Win32) Stack Overflow" }
|
||||||
}
|
{Win32UnableToLocateDLL win32_unable_to_locate_dll 0xc0000135 0 "(Win32) Unable To Locate DLL" }
|
||||||
|
{Win32OrdinalNotFound win32_ordinal_not_found 0xc0000138 0 "(Win32) Ordinal Not Found" }
|
||||||
@data(String8) ctrl_exception_code_kind_display_string_table:
|
{Win32EntryPointNotFound win32_entry_point_not_found 0xc0000139 0 "(Win32) Entry Point Not Found" }
|
||||||
{
|
{Win32DLLInitializationFailed win32_dll_initialization_failed 0xc0000142 0 "(Win32) DLL Initialization Failed" }
|
||||||
`{0}`;
|
{Win32FloatingPointSSEMultipleFaults win32_floating_point_sse_multiple_faults 0xc00002b4 0 "(Win32) Floating Point SSE Multiple Faults" }
|
||||||
@expand(CTRL_ExceptionCodeKindTable a) `str8_lit_comp("$(a.display_string)")`;
|
{Win32FloatingPointSSEMultipleTraps win32_floating_point_sse_multiple_traps 0xc00002b5 0 "(Win32) Floating Point SSE Multiple Traps" }
|
||||||
}
|
{Win32AssertionFailed win32_assertion_failed 0xc0000420 1 "(Win32) Assertion Failed" }
|
||||||
|
{Win32ModuleNotFound win32_module_not_found 0xc06d007e 0 "(Win32) Module Not Found" }
|
||||||
@data(String8) ctrl_exception_code_kind_lowercase_code_string_table:
|
{Win32ProcedureNotFound win32_procedure_not_found 0xc06d007f 0 "(Win32) Procedure Not Found" }
|
||||||
{
|
{Win32SanitizerErrorDetected win32_sanitizer_error_detected 0xe073616e 1 "(Win32) Sanitizer Error Detected" }
|
||||||
`{0}`;
|
{Win32SanitizerRawAccessViolation win32_sanitizer_raw_access_violation 0xe0736171 0 "(Win32) Sanitizer Raw Access Violation" }
|
||||||
@expand(CTRL_ExceptionCodeKindTable a) `str8_lit_comp("$(a.lower_name)")`;
|
{Win32DirectXDebugLayer win32_directx_debug_layer 0x0000087a 1 "(Win32) DirectX Debug Layer" }
|
||||||
}
|
}
|
||||||
|
|
||||||
@data(B8) ctrl_exception_code_kind_default_enable_table:
|
@enum CTRL_ExceptionCodeKind:
|
||||||
{
|
{
|
||||||
`0`;
|
Null,
|
||||||
@expand(CTRL_ExceptionCodeKindTable a) `$(a.default)`;
|
@expand(CTRL_ExceptionCodeKindTable a) `$(a.name)`,
|
||||||
}
|
COUNT,
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(U32) ctrl_exception_code_kind_code_table:
|
||||||
|
{
|
||||||
|
`0`;
|
||||||
|
@expand(CTRL_ExceptionCodeKindTable a) `$(a.code)`;
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(String8) ctrl_exception_code_kind_display_string_table:
|
||||||
|
{
|
||||||
|
`{0}`;
|
||||||
|
@expand(CTRL_ExceptionCodeKindTable a) `str8_lit_comp("$(a.display_string)")`;
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(String8) ctrl_exception_code_kind_lowercase_code_string_table:
|
||||||
|
{
|
||||||
|
`{0}`;
|
||||||
|
@expand(CTRL_ExceptionCodeKindTable a) `str8_lit_comp("$(a.lower_name)")`;
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(B8) ctrl_exception_code_kind_default_enable_table:
|
||||||
|
{
|
||||||
|
`0`;
|
||||||
|
@expand(CTRL_ExceptionCodeKindTable a) `$(a.default)`;
|
||||||
|
}
|
||||||
|
|||||||
+5866
-3647
File diff suppressed because it is too large
Load Diff
+1158
-729
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#include "ctrl_core.c"
|
#include "ctrl_core.c"
|
||||||
|
|||||||
+77
-77
@@ -1,77 +1,77 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef CTRL_INC_H
|
#ifndef CTRL_INC_H
|
||||||
#define CTRL_INC_H
|
#define CTRL_INC_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(rjf): Control Layer Overview (2023/8/29)
|
//~ NOTE(rjf): Control Layer Overview (2023/8/29)
|
||||||
//
|
//
|
||||||
// This layer's purpose is to provide access to the asynchronously-running, low
|
// This layer's purpose is to provide access to the asynchronously-running, low
|
||||||
// level parts of a debugger, running on the debugger client. This primarily
|
// level parts of a debugger, running on the debugger client. This primarily
|
||||||
// consists of process control, using the Demon layer (the lower level
|
// consists of process control, using the Demon layer (the lower level
|
||||||
// abstraction layer for process control, across multiple OSes), but including
|
// abstraction layer for process control, across multiple OSes), but including
|
||||||
// higher-level concepts, like stepping, breakpoint resolution, conditional
|
// higher-level concepts, like stepping, breakpoint resolution, conditional
|
||||||
// breakpoint evaluation, and so on. Right now, this just includes process
|
// breakpoint evaluation, and so on. Right now, this just includes process
|
||||||
// control *local to the debugger client machine*. But in the future, this can
|
// control *local to the debugger client machine*. But in the future, this can
|
||||||
// also include communication to multiple target machines, all running their
|
// also include communication to multiple target machines, all running their
|
||||||
// own process controller, using the Demon layer.
|
// own process controller, using the Demon layer.
|
||||||
//
|
//
|
||||||
// This part of a debugger must run asynchronously to prevent blocking the UI -
|
// This part of a debugger must run asynchronously to prevent blocking the UI -
|
||||||
// ideally our debugger is designed such that, if targets are running, the
|
// ideally our debugger is designed such that, if targets are running, the
|
||||||
// debugger frontend is still usable for a variety of purposes. So, in short,
|
// debugger frontend is still usable for a variety of purposes. So, in short,
|
||||||
// the asynchronously-running "control thread", implemented by this layer, is
|
// the asynchronously-running "control thread", implemented by this layer, is
|
||||||
// tasked with communicating with a separately executing "user thread". This
|
// tasked with communicating with a separately executing "user thread". This
|
||||||
// communication happens in two directions - `user -> ctrl`, and the reverse,
|
// communication happens in two directions - `user -> ctrl`, and the reverse,
|
||||||
// `ctrl -> user`.
|
// `ctrl -> user`.
|
||||||
//
|
//
|
||||||
// In the case of `user -> ctrl` communication, this is done with a ring buffer
|
// In the case of `user -> ctrl` communication, this is done with a ring buffer
|
||||||
// of "messages" (`CTRL_Msg`), pushed via `ctrl_u2c_push_msgs`. These messages
|
// of "messages" (`CTRL_Msg`), pushed via `ctrl_u2c_push_msgs`. These messages
|
||||||
// include commands like: launching targets, attaching to targets, killing
|
// include commands like: launching targets, attaching to targets, killing
|
||||||
// targets, detaching from targets, stepping/running, or single stepping.
|
// targets, detaching from targets, stepping/running, or single stepping.
|
||||||
//
|
//
|
||||||
// In the case of `ctrl -> user` communication, this is done with a ring buffer
|
// In the case of `ctrl -> user` communication, this is done with a ring buffer
|
||||||
// of "events" (`CTRL_Event`), popped via `ctrl_c2u_pop_events`. These events
|
// of "events" (`CTRL_Event`), popped via `ctrl_c2u_pop_events`. These events
|
||||||
// include information about what happened during the execution of targets -
|
// include information about what happened during the execution of targets -
|
||||||
// including: process/module/thread creation, process/module/thread deletion,
|
// including: process/module/thread creation, process/module/thread deletion,
|
||||||
// debug strings, thread name events, memory allocation events, and stop events
|
// debug strings, thread name events, memory allocation events, and stop events
|
||||||
// (where stops can be caused by: user breakpoints, traps set for stepping,
|
// (where stops can be caused by: user breakpoints, traps set for stepping,
|
||||||
// exceptions, halts, or errors).
|
// exceptions, halts, or errors).
|
||||||
//
|
//
|
||||||
// The various stepping algorithms are implemented with two concepts: (a) the
|
// The various stepping algorithms are implemented with two concepts: (a) the
|
||||||
// "trap net", and (b) "spoofs".
|
// "trap net", and (b) "spoofs".
|
||||||
//
|
//
|
||||||
// A "trap net" is a term which refers to a set of addresses paired with a set
|
// A "trap net" is a term which refers to a set of addresses paired with a set
|
||||||
// of behavioral flags. Before targets run, trap instructions are written to
|
// of behavioral flags. Before targets run, trap instructions are written to
|
||||||
// these addresses. After targets stop, these addresses are reset to their
|
// these addresses. After targets stop, these addresses are reset to their
|
||||||
// original bytes. These trap instructions cause the debugger's targets to
|
// original bytes. These trap instructions cause the debugger's targets to
|
||||||
// stop executing, and based on which behavioral flags are associated with
|
// stop executing, and based on which behavioral flags are associated with
|
||||||
// the instruction causing the stop, the control thread may adjust parameters
|
// the instruction causing the stop, the control thread may adjust parameters
|
||||||
// used for running, then continue execution, or it will not resume target
|
// used for running, then continue execution, or it will not resume target
|
||||||
// execution, and will report stopped events. These behavioral flags can
|
// execution, and will report stopped events. These behavioral flags can
|
||||||
// include: single-stepping the stopped thread to execute the instruction at
|
// include: single-stepping the stopped thread to execute the instruction at
|
||||||
// the trap location, saving a stack pointer "check value" (where this check
|
// the trap location, saving a stack pointer "check value" (where this check
|
||||||
// value is compared against when making decisions about whether to continue
|
// value is compared against when making decisions about whether to continue
|
||||||
// running or not), and so on. It's complicated to unpack why exactly these
|
// running or not), and so on. It's complicated to unpack why exactly these
|
||||||
// behaviors are useful, but the TL;DR of it is that they are used for a
|
// behaviors are useful, but the TL;DR of it is that they are used for a
|
||||||
// variety of stepping behaviors. For example, when doing a "step into" step,
|
// variety of stepping behaviors. For example, when doing a "step into" step,
|
||||||
// a `call` instruction can have a trap set at it, and will be marked with
|
// a `call` instruction can have a trap set at it, and will be marked with
|
||||||
// a "single-step-after" trap flag, as well as the "end stepping" trap flag,
|
// a "single-step-after" trap flag, as well as the "end stepping" trap flag,
|
||||||
// such that the step operation will complete after the `call` has executed.
|
// such that the step operation will complete after the `call` has executed.
|
||||||
//
|
//
|
||||||
// A "spoof" is a feature the control layer uses to detect when some thread
|
// A "spoof" is a feature the control layer uses to detect when some thread
|
||||||
// returns from a particular sub-callstack. This is useful when implementing
|
// returns from a particular sub-callstack. This is useful when implementing
|
||||||
// "step over" in functions that may be recursive. In short, unlike a trap,
|
// "step over" in functions that may be recursive. In short, unlike a trap,
|
||||||
// which writes a trap instruction (like `int3`) into an instruction stream,
|
// which writes a trap instruction (like `int3`) into an instruction stream,
|
||||||
// a spoof overwrites a *return address* on some thread's *stack*. This return
|
// a spoof overwrites a *return address* on some thread's *stack*. This return
|
||||||
// address is not a valid address for executing code -- it is simply a value
|
// address is not a valid address for executing code -- it is simply a value
|
||||||
// that the debugger can recognize, such that it is notified when the thread
|
// that the debugger can recognize, such that it is notified when the thread
|
||||||
// returns from some level in a callstack. When the thread exits some function,
|
// returns from some level in a callstack. When the thread exits some function,
|
||||||
// it will return to the "spoofed" address, and it will immediately hit an
|
// it will return to the "spoofed" address, and it will immediately hit an
|
||||||
// exception, because the spoofed address will not be a valid address for
|
// exception, because the spoofed address will not be a valid address for
|
||||||
// code execution. At that point, the debugger can move the thread back to
|
// code execution. At that point, the debugger can move the thread back to
|
||||||
// the pre-spoof return address, and resume execution.
|
// the pre-spoof return address, and resume execution.
|
||||||
|
|
||||||
#include "ctrl_core.h"
|
#include "ctrl_core.h"
|
||||||
|
|
||||||
#endif // CTRL_INC_H
|
#endif // CTRL_INC_H
|
||||||
|
|||||||
+188
-176
@@ -1,176 +1,188 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
//- GENERATED CODE
|
//- GENERATED CODE
|
||||||
|
|
||||||
C_LINKAGE_BEGIN
|
C_LINKAGE_BEGIN
|
||||||
U32 ctrl_exception_code_kind_code_table[38] =
|
String8 ctrl_entity_kind_display_string_table[8] =
|
||||||
{
|
{
|
||||||
0,
|
{0},
|
||||||
0x40010005,
|
str8_lit_comp("Root"),
|
||||||
0x40010008,
|
str8_lit_comp("Machine"),
|
||||||
0x40080201,
|
str8_lit_comp("Process"),
|
||||||
0x40080202,
|
str8_lit_comp("Thread"),
|
||||||
0x0000071a,
|
str8_lit_comp("Module"),
|
||||||
0x80000002,
|
str8_lit_comp("EntryPoint"),
|
||||||
0xc0000005,
|
str8_lit_comp("DebugInfoPath"),
|
||||||
0xc0000006,
|
};
|
||||||
0xc0000008,
|
|
||||||
0xc0000017,
|
U32 ctrl_exception_code_kind_code_table[38] =
|
||||||
0xc000001d,
|
{
|
||||||
0xc0000025,
|
0,
|
||||||
0xc0000026,
|
0x40010005,
|
||||||
0xc000008c,
|
0x40010008,
|
||||||
0xc000008d,
|
0x40080201,
|
||||||
0xc000008e,
|
0x40080202,
|
||||||
0xc000008f,
|
0x0000071a,
|
||||||
0xc0000090,
|
0x80000002,
|
||||||
0xc0000091,
|
0xc0000005,
|
||||||
0xc0000092,
|
0xc0000006,
|
||||||
0xc0000093,
|
0xc0000008,
|
||||||
0xc0000094,
|
0xc0000017,
|
||||||
0xc0000095,
|
0xc000001d,
|
||||||
0xc0000096,
|
0xc0000025,
|
||||||
0xc00000fd,
|
0xc0000026,
|
||||||
0xc0000135,
|
0xc000008c,
|
||||||
0xc0000138,
|
0xc000008d,
|
||||||
0xc0000139,
|
0xc000008e,
|
||||||
0xc0000142,
|
0xc000008f,
|
||||||
0xc00002b4,
|
0xc0000090,
|
||||||
0xc00002b5,
|
0xc0000091,
|
||||||
0xc0000420,
|
0xc0000092,
|
||||||
0xc06d007e,
|
0xc0000093,
|
||||||
0xc06d007f,
|
0xc0000094,
|
||||||
0xe073616e,
|
0xc0000095,
|
||||||
0xe0736171,
|
0xc0000096,
|
||||||
0x0000087a,
|
0xc00000fd,
|
||||||
};
|
0xc0000135,
|
||||||
|
0xc0000138,
|
||||||
String8 ctrl_exception_code_kind_display_string_table[38] =
|
0xc0000139,
|
||||||
{
|
0xc0000142,
|
||||||
{0},
|
0xc00002b4,
|
||||||
str8_lit_comp("(Win32) Control-C"),
|
0xc00002b5,
|
||||||
str8_lit_comp("(Win32) Control-Break"),
|
0xc0000420,
|
||||||
str8_lit_comp("(Win32) WinRT Originate Error"),
|
0xc06d007e,
|
||||||
str8_lit_comp("(Win32) WinRT Transform Error"),
|
0xc06d007f,
|
||||||
str8_lit_comp("(Win32) RPC Call Cancelled"),
|
0xe073616e,
|
||||||
str8_lit_comp("(Win32) Data Type Misalignment"),
|
0xe0736171,
|
||||||
str8_lit_comp("(Win32) Access Violation"),
|
0x0000087a,
|
||||||
str8_lit_comp("(Win32) In Page Error"),
|
};
|
||||||
str8_lit_comp("(Win32) Invalid Handle Specified"),
|
|
||||||
str8_lit_comp("(Win32) Not Enough Quota"),
|
String8 ctrl_exception_code_kind_display_string_table[38] =
|
||||||
str8_lit_comp("(Win32) Illegal Instruction"),
|
{
|
||||||
str8_lit_comp("(Win32) Cannot Continue From Exception"),
|
{0},
|
||||||
str8_lit_comp("(Win32) Invalid Exception Disposition Returned By Handler"),
|
str8_lit_comp("(Win32) Control-C"),
|
||||||
str8_lit_comp("(Win32) Array Bounds Exceeded"),
|
str8_lit_comp("(Win32) Control-Break"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Denormal Operand"),
|
str8_lit_comp("(Win32) WinRT Originate Error"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Division By Zero"),
|
str8_lit_comp("(Win32) WinRT Transform Error"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Inexact Result"),
|
str8_lit_comp("(Win32) RPC Call Cancelled"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Invalid Operation"),
|
str8_lit_comp("(Win32) Data Type Misalignment"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Overflow"),
|
str8_lit_comp("(Win32) Access Violation"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Stack Check"),
|
str8_lit_comp("(Win32) In Page Error"),
|
||||||
str8_lit_comp("(Win32) Floating-Point Underflow"),
|
str8_lit_comp("(Win32) Invalid Handle Specified"),
|
||||||
str8_lit_comp("(Win32) Integer Division By Zero"),
|
str8_lit_comp("(Win32) Not Enough Quota"),
|
||||||
str8_lit_comp("(Win32) Integer Overflow"),
|
str8_lit_comp("(Win32) Illegal Instruction"),
|
||||||
str8_lit_comp("(Win32) Privileged Instruction"),
|
str8_lit_comp("(Win32) Cannot Continue From Exception"),
|
||||||
str8_lit_comp("(Win32) Stack Overflow"),
|
str8_lit_comp("(Win32) Invalid Exception Disposition Returned By Handler"),
|
||||||
str8_lit_comp("(Win32) Unable To Locate DLL"),
|
str8_lit_comp("(Win32) Array Bounds Exceeded"),
|
||||||
str8_lit_comp("(Win32) Ordinal Not Found"),
|
str8_lit_comp("(Win32) Floating-Point Denormal Operand"),
|
||||||
str8_lit_comp("(Win32) Entry Point Not Found"),
|
str8_lit_comp("(Win32) Floating-Point Division By Zero"),
|
||||||
str8_lit_comp("(Win32) DLL Initialization Failed"),
|
str8_lit_comp("(Win32) Floating-Point Inexact Result"),
|
||||||
str8_lit_comp("(Win32) Floating Point SSE Multiple Faults"),
|
str8_lit_comp("(Win32) Floating-Point Invalid Operation"),
|
||||||
str8_lit_comp("(Win32) Floating Point SSE Multiple Traps"),
|
str8_lit_comp("(Win32) Floating-Point Overflow"),
|
||||||
str8_lit_comp("(Win32) Assertion Failed"),
|
str8_lit_comp("(Win32) Floating-Point Stack Check"),
|
||||||
str8_lit_comp("(Win32) Module Not Found"),
|
str8_lit_comp("(Win32) Floating-Point Underflow"),
|
||||||
str8_lit_comp("(Win32) Procedure Not Found"),
|
str8_lit_comp("(Win32) Integer Division By Zero"),
|
||||||
str8_lit_comp("(Win32) Sanitizer Error Detected"),
|
str8_lit_comp("(Win32) Integer Overflow"),
|
||||||
str8_lit_comp("(Win32) Sanitizer Raw Access Violation"),
|
str8_lit_comp("(Win32) Privileged Instruction"),
|
||||||
str8_lit_comp("(Win32) DirectX Debug Layer"),
|
str8_lit_comp("(Win32) Stack Overflow"),
|
||||||
};
|
str8_lit_comp("(Win32) Unable To Locate DLL"),
|
||||||
|
str8_lit_comp("(Win32) Ordinal Not Found"),
|
||||||
String8 ctrl_exception_code_kind_lowercase_code_string_table[38] =
|
str8_lit_comp("(Win32) Entry Point Not Found"),
|
||||||
{
|
str8_lit_comp("(Win32) DLL Initialization Failed"),
|
||||||
{0},
|
str8_lit_comp("(Win32) Floating Point SSE Multiple Faults"),
|
||||||
str8_lit_comp("win32_ctrl_c"),
|
str8_lit_comp("(Win32) Floating Point SSE Multiple Traps"),
|
||||||
str8_lit_comp("win32_ctrl_break"),
|
str8_lit_comp("(Win32) Assertion Failed"),
|
||||||
str8_lit_comp("win32_win_rt_originate_error"),
|
str8_lit_comp("(Win32) Module Not Found"),
|
||||||
str8_lit_comp("win32_win_rt_transform_error"),
|
str8_lit_comp("(Win32) Procedure Not Found"),
|
||||||
str8_lit_comp("win32_rpc_call_cancelled"),
|
str8_lit_comp("(Win32) Sanitizer Error Detected"),
|
||||||
str8_lit_comp("win32_datatype_misalignment"),
|
str8_lit_comp("(Win32) Sanitizer Raw Access Violation"),
|
||||||
str8_lit_comp("win32_access_violation"),
|
str8_lit_comp("(Win32) DirectX Debug Layer"),
|
||||||
str8_lit_comp("win32_in_page_error"),
|
};
|
||||||
str8_lit_comp("win32_invalid_handle"),
|
|
||||||
str8_lit_comp("win32_not_enough_quota"),
|
String8 ctrl_exception_code_kind_lowercase_code_string_table[38] =
|
||||||
str8_lit_comp("win32_illegal_instruction"),
|
{
|
||||||
str8_lit_comp("win32_cannot_continue_exception"),
|
{0},
|
||||||
str8_lit_comp("win32_invalid_exception_disposition"),
|
str8_lit_comp("win32_ctrl_c"),
|
||||||
str8_lit_comp("win32_array_bounds_exceeded"),
|
str8_lit_comp("win32_ctrl_break"),
|
||||||
str8_lit_comp("win32_floating_point_denormal_operand"),
|
str8_lit_comp("win32_win_rt_originate_error"),
|
||||||
str8_lit_comp("win32_floating_point_division_by_zero"),
|
str8_lit_comp("win32_win_rt_transform_error"),
|
||||||
str8_lit_comp("win32_floating_point_inexact_result"),
|
str8_lit_comp("win32_rpc_call_cancelled"),
|
||||||
str8_lit_comp("win32_floating_point_invalid_operation"),
|
str8_lit_comp("win32_datatype_misalignment"),
|
||||||
str8_lit_comp("win32_floating_point_overflow"),
|
str8_lit_comp("win32_access_violation"),
|
||||||
str8_lit_comp("win32_floating_point_stack_check"),
|
str8_lit_comp("win32_in_page_error"),
|
||||||
str8_lit_comp("win32_floating_point_underflow"),
|
str8_lit_comp("win32_invalid_handle"),
|
||||||
str8_lit_comp("win32_integer_division_by_zero"),
|
str8_lit_comp("win32_not_enough_quota"),
|
||||||
str8_lit_comp("win32_integer_overflow"),
|
str8_lit_comp("win32_illegal_instruction"),
|
||||||
str8_lit_comp("win32_privileged_instruction"),
|
str8_lit_comp("win32_cannot_continue_exception"),
|
||||||
str8_lit_comp("win32_stack_overflow"),
|
str8_lit_comp("win32_invalid_exception_disposition"),
|
||||||
str8_lit_comp("win32_unable_to_locate_dll"),
|
str8_lit_comp("win32_array_bounds_exceeded"),
|
||||||
str8_lit_comp("win32_ordinal_not_found"),
|
str8_lit_comp("win32_floating_point_denormal_operand"),
|
||||||
str8_lit_comp("win32_entry_point_not_found"),
|
str8_lit_comp("win32_floating_point_division_by_zero"),
|
||||||
str8_lit_comp("win32_dll_initialization_failed"),
|
str8_lit_comp("win32_floating_point_inexact_result"),
|
||||||
str8_lit_comp("win32_floating_point_sse_multiple_faults"),
|
str8_lit_comp("win32_floating_point_invalid_operation"),
|
||||||
str8_lit_comp("win32_floating_point_sse_multiple_traps"),
|
str8_lit_comp("win32_floating_point_overflow"),
|
||||||
str8_lit_comp("win32_assertion_failed"),
|
str8_lit_comp("win32_floating_point_stack_check"),
|
||||||
str8_lit_comp("win32_module_not_found"),
|
str8_lit_comp("win32_floating_point_underflow"),
|
||||||
str8_lit_comp("win32_procedure_not_found"),
|
str8_lit_comp("win32_integer_division_by_zero"),
|
||||||
str8_lit_comp("win32_sanitizer_error_detected"),
|
str8_lit_comp("win32_integer_overflow"),
|
||||||
str8_lit_comp("win32_sanitizer_raw_access_violation"),
|
str8_lit_comp("win32_privileged_instruction"),
|
||||||
str8_lit_comp("win32_directx_debug_layer"),
|
str8_lit_comp("win32_stack_overflow"),
|
||||||
};
|
str8_lit_comp("win32_unable_to_locate_dll"),
|
||||||
|
str8_lit_comp("win32_ordinal_not_found"),
|
||||||
B8 ctrl_exception_code_kind_default_enable_table[38] =
|
str8_lit_comp("win32_entry_point_not_found"),
|
||||||
{
|
str8_lit_comp("win32_dll_initialization_failed"),
|
||||||
0,
|
str8_lit_comp("win32_floating_point_sse_multiple_faults"),
|
||||||
1,
|
str8_lit_comp("win32_floating_point_sse_multiple_traps"),
|
||||||
1,
|
str8_lit_comp("win32_assertion_failed"),
|
||||||
0,
|
str8_lit_comp("win32_module_not_found"),
|
||||||
0,
|
str8_lit_comp("win32_procedure_not_found"),
|
||||||
0,
|
str8_lit_comp("win32_sanitizer_error_detected"),
|
||||||
0,
|
str8_lit_comp("win32_sanitizer_raw_access_violation"),
|
||||||
1,
|
str8_lit_comp("win32_directx_debug_layer"),
|
||||||
0,
|
};
|
||||||
1,
|
|
||||||
0,
|
B8 ctrl_exception_code_kind_default_enable_table[38] =
|
||||||
0,
|
{
|
||||||
0,
|
0,
|
||||||
0,
|
1,
|
||||||
0,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
1,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
1,
|
0,
|
||||||
0,
|
0,
|
||||||
1,
|
0,
|
||||||
};
|
0,
|
||||||
|
0,
|
||||||
C_LINKAGE_END
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
};
|
||||||
|
|
||||||
|
C_LINKAGE_END
|
||||||
|
|
||||||
|
|||||||
@@ -1,59 +1,74 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
//- GENERATED CODE
|
//- GENERATED CODE
|
||||||
|
|
||||||
#ifndef CTRL_META_H
|
#ifndef CTRL_META_H
|
||||||
#define CTRL_META_H
|
#define CTRL_META_H
|
||||||
|
|
||||||
typedef enum CTRL_ExceptionCodeKind
|
typedef enum CTRL_EntityKind
|
||||||
{
|
{
|
||||||
CTRL_ExceptionCodeKind_Null,
|
CTRL_EntityKind_Null,
|
||||||
CTRL_ExceptionCodeKind_Win32CtrlC,
|
CTRL_EntityKind_Root,
|
||||||
CTRL_ExceptionCodeKind_Win32CtrlBreak,
|
CTRL_EntityKind_Machine,
|
||||||
CTRL_ExceptionCodeKind_Win32WinRTOriginateError,
|
CTRL_EntityKind_Process,
|
||||||
CTRL_ExceptionCodeKind_Win32WinRTTransformError,
|
CTRL_EntityKind_Thread,
|
||||||
CTRL_ExceptionCodeKind_Win32RPCCallCancelled,
|
CTRL_EntityKind_Module,
|
||||||
CTRL_ExceptionCodeKind_Win32DatatypeMisalignment,
|
CTRL_EntityKind_EntryPoint,
|
||||||
CTRL_ExceptionCodeKind_Win32AccessViolation,
|
CTRL_EntityKind_DebugInfoPath,
|
||||||
CTRL_ExceptionCodeKind_Win32InPageError,
|
CTRL_EntityKind_COUNT,
|
||||||
CTRL_ExceptionCodeKind_Win32InvalidHandle,
|
} CTRL_EntityKind;
|
||||||
CTRL_ExceptionCodeKind_Win32NotEnoughQuota,
|
|
||||||
CTRL_ExceptionCodeKind_Win32IllegalInstruction,
|
typedef enum CTRL_ExceptionCodeKind
|
||||||
CTRL_ExceptionCodeKind_Win32CannotContinueException,
|
{
|
||||||
CTRL_ExceptionCodeKind_Win32InvalidExceptionDisposition,
|
CTRL_ExceptionCodeKind_Null,
|
||||||
CTRL_ExceptionCodeKind_Win32ArrayBoundsExceeded,
|
CTRL_ExceptionCodeKind_Win32CtrlC,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointDenormalOperand,
|
CTRL_ExceptionCodeKind_Win32CtrlBreak,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointDivisionByZero,
|
CTRL_ExceptionCodeKind_Win32WinRTOriginateError,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointInexactResult,
|
CTRL_ExceptionCodeKind_Win32WinRTTransformError,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointInvalidOperation,
|
CTRL_ExceptionCodeKind_Win32RPCCallCancelled,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointOverflow,
|
CTRL_ExceptionCodeKind_Win32DatatypeMisalignment,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointStackCheck,
|
CTRL_ExceptionCodeKind_Win32AccessViolation,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointUnderflow,
|
CTRL_ExceptionCodeKind_Win32InPageError,
|
||||||
CTRL_ExceptionCodeKind_Win32IntegerDivisionByZero,
|
CTRL_ExceptionCodeKind_Win32InvalidHandle,
|
||||||
CTRL_ExceptionCodeKind_Win32IntegerOverflow,
|
CTRL_ExceptionCodeKind_Win32NotEnoughQuota,
|
||||||
CTRL_ExceptionCodeKind_Win32PrivilegedInstruction,
|
CTRL_ExceptionCodeKind_Win32IllegalInstruction,
|
||||||
CTRL_ExceptionCodeKind_Win32StackOverflow,
|
CTRL_ExceptionCodeKind_Win32CannotContinueException,
|
||||||
CTRL_ExceptionCodeKind_Win32UnableToLocateDLL,
|
CTRL_ExceptionCodeKind_Win32InvalidExceptionDisposition,
|
||||||
CTRL_ExceptionCodeKind_Win32OrdinalNotFound,
|
CTRL_ExceptionCodeKind_Win32ArrayBoundsExceeded,
|
||||||
CTRL_ExceptionCodeKind_Win32EntryPointNotFound,
|
CTRL_ExceptionCodeKind_Win32FloatingPointDenormalOperand,
|
||||||
CTRL_ExceptionCodeKind_Win32DLLInitializationFailed,
|
CTRL_ExceptionCodeKind_Win32FloatingPointDivisionByZero,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointSSEMultipleFaults,
|
CTRL_ExceptionCodeKind_Win32FloatingPointInexactResult,
|
||||||
CTRL_ExceptionCodeKind_Win32FloatingPointSSEMultipleTraps,
|
CTRL_ExceptionCodeKind_Win32FloatingPointInvalidOperation,
|
||||||
CTRL_ExceptionCodeKind_Win32AssertionFailed,
|
CTRL_ExceptionCodeKind_Win32FloatingPointOverflow,
|
||||||
CTRL_ExceptionCodeKind_Win32ModuleNotFound,
|
CTRL_ExceptionCodeKind_Win32FloatingPointStackCheck,
|
||||||
CTRL_ExceptionCodeKind_Win32ProcedureNotFound,
|
CTRL_ExceptionCodeKind_Win32FloatingPointUnderflow,
|
||||||
CTRL_ExceptionCodeKind_Win32SanitizerErrorDetected,
|
CTRL_ExceptionCodeKind_Win32IntegerDivisionByZero,
|
||||||
CTRL_ExceptionCodeKind_Win32SanitizerRawAccessViolation,
|
CTRL_ExceptionCodeKind_Win32IntegerOverflow,
|
||||||
CTRL_ExceptionCodeKind_Win32DirectXDebugLayer,
|
CTRL_ExceptionCodeKind_Win32PrivilegedInstruction,
|
||||||
CTRL_ExceptionCodeKind_COUNT,
|
CTRL_ExceptionCodeKind_Win32StackOverflow,
|
||||||
} CTRL_ExceptionCodeKind;
|
CTRL_ExceptionCodeKind_Win32UnableToLocateDLL,
|
||||||
|
CTRL_ExceptionCodeKind_Win32OrdinalNotFound,
|
||||||
C_LINKAGE_BEGIN
|
CTRL_ExceptionCodeKind_Win32EntryPointNotFound,
|
||||||
extern U32 ctrl_exception_code_kind_code_table[38];
|
CTRL_ExceptionCodeKind_Win32DLLInitializationFailed,
|
||||||
extern String8 ctrl_exception_code_kind_display_string_table[38];
|
CTRL_ExceptionCodeKind_Win32FloatingPointSSEMultipleFaults,
|
||||||
extern String8 ctrl_exception_code_kind_lowercase_code_string_table[38];
|
CTRL_ExceptionCodeKind_Win32FloatingPointSSEMultipleTraps,
|
||||||
extern B8 ctrl_exception_code_kind_default_enable_table[38];
|
CTRL_ExceptionCodeKind_Win32AssertionFailed,
|
||||||
C_LINKAGE_END
|
CTRL_ExceptionCodeKind_Win32ModuleNotFound,
|
||||||
|
CTRL_ExceptionCodeKind_Win32ProcedureNotFound,
|
||||||
#endif // CTRL_META_H
|
CTRL_ExceptionCodeKind_Win32SanitizerErrorDetected,
|
||||||
|
CTRL_ExceptionCodeKind_Win32SanitizerRawAccessViolation,
|
||||||
|
CTRL_ExceptionCodeKind_Win32DirectXDebugLayer,
|
||||||
|
CTRL_ExceptionCodeKind_COUNT,
|
||||||
|
} CTRL_ExceptionCodeKind;
|
||||||
|
|
||||||
|
C_LINKAGE_BEGIN
|
||||||
|
extern String8 ctrl_entity_kind_display_string_table[8];
|
||||||
|
extern U32 ctrl_exception_code_kind_code_table[38];
|
||||||
|
extern String8 ctrl_exception_code_kind_display_string_table[38];
|
||||||
|
extern String8 ctrl_exception_code_kind_lowercase_code_string_table[38];
|
||||||
|
extern B8 ctrl_exception_code_kind_default_enable_table[38];
|
||||||
|
|
||||||
|
C_LINKAGE_END
|
||||||
|
|
||||||
|
#endif // CTRL_META_H
|
||||||
|
|||||||
+875
-599
File diff suppressed because it is too large
Load Diff
+339
-231
@@ -1,231 +1,339 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DASM_CACHE_H
|
#ifndef DASM_CACHE_H
|
||||||
#define DASM_CACHE_H
|
#define DASM_CACHE_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Stringification Types
|
//~ rjf: Disassembly Syntax Types
|
||||||
|
|
||||||
typedef U32 DASM_StyleFlags;
|
typedef enum DASM_Syntax
|
||||||
enum
|
{
|
||||||
{
|
DASM_Syntax_Intel,
|
||||||
DASM_StyleFlag_Addresses = (1<<0),
|
DASM_Syntax_ATT,
|
||||||
DASM_StyleFlag_CodeBytes = (1<<1),
|
DASM_Syntax_COUNT
|
||||||
};
|
}
|
||||||
|
DASM_Syntax;
|
||||||
typedef enum DASM_Syntax
|
|
||||||
{
|
////////////////////////////////
|
||||||
DASM_Syntax_Intel,
|
//~ rjf: Disassembly Instruction Info Types
|
||||||
DASM_Syntax_ATT,
|
|
||||||
DASM_Syntax_COUNT
|
typedef U32 DASM_InstFlags;
|
||||||
}
|
enum
|
||||||
DASM_Syntax;
|
{
|
||||||
|
DASM_InstFlag_Call = (1<<0),
|
||||||
////////////////////////////////
|
DASM_InstFlag_Branch = (1<<1),
|
||||||
//~ rjf: Instruction Types
|
DASM_InstFlag_UnconditionalJump = (1<<2),
|
||||||
|
DASM_InstFlag_Return = (1<<3),
|
||||||
typedef struct DASM_Inst DASM_Inst;
|
DASM_InstFlag_NonFlow = (1<<4),
|
||||||
struct DASM_Inst
|
DASM_InstFlag_Repeats = (1<<5),
|
||||||
{
|
DASM_InstFlag_ChangesStackPointer = (1<<6),
|
||||||
U64 code_off;
|
DASM_InstFlag_ChangesStackPointerVariably = (1<<7),
|
||||||
U64 addr;
|
};
|
||||||
Rng1U64 text_range;
|
|
||||||
};
|
typedef struct DASM_Inst DASM_Inst;
|
||||||
|
struct DASM_Inst
|
||||||
typedef struct DASM_InstChunkNode DASM_InstChunkNode;
|
{
|
||||||
struct DASM_InstChunkNode
|
DASM_InstFlags flags;
|
||||||
{
|
U32 size;
|
||||||
DASM_InstChunkNode *next;
|
String8 string;
|
||||||
DASM_Inst *v;
|
U64 jump_dest_vaddr;
|
||||||
U64 cap;
|
};
|
||||||
U64 count;
|
|
||||||
};
|
////////////////////////////////
|
||||||
|
//~ rjf: Control Flow Analysis Types
|
||||||
typedef struct DASM_InstChunkList DASM_InstChunkList;
|
|
||||||
struct DASM_InstChunkList
|
typedef struct DASM_CtrlFlowPoint DASM_CtrlFlowPoint;
|
||||||
{
|
struct DASM_CtrlFlowPoint
|
||||||
DASM_InstChunkNode *first;
|
{
|
||||||
DASM_InstChunkNode *last;
|
U64 vaddr;
|
||||||
U64 node_count;
|
U64 jump_dest_vaddr;
|
||||||
U64 inst_count;
|
DASM_InstFlags inst_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DASM_InstArray DASM_InstArray;
|
typedef struct DASM_CtrlFlowPointNode DASM_CtrlFlowPointNode;
|
||||||
struct DASM_InstArray
|
struct DASM_CtrlFlowPointNode
|
||||||
{
|
{
|
||||||
DASM_Inst *v;
|
DASM_CtrlFlowPointNode *next;
|
||||||
U64 count;
|
DASM_CtrlFlowPoint v;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
typedef struct DASM_CtrlFlowPointList DASM_CtrlFlowPointList;
|
||||||
//~ rjf: Value Bundle Type
|
struct DASM_CtrlFlowPointList
|
||||||
|
{
|
||||||
typedef struct DASM_Info DASM_Info;
|
DASM_CtrlFlowPointNode *first;
|
||||||
struct DASM_Info
|
DASM_CtrlFlowPointNode *last;
|
||||||
{
|
U64 count;
|
||||||
U128 text_key;
|
};
|
||||||
DASM_InstArray insts;
|
|
||||||
};
|
typedef struct DASM_CtrlFlowInfo DASM_CtrlFlowInfo;
|
||||||
|
struct DASM_CtrlFlowInfo
|
||||||
////////////////////////////////
|
{
|
||||||
//~ rjf: Cache Types
|
DASM_CtrlFlowPointList exit_points;
|
||||||
|
U64 total_size;
|
||||||
typedef struct DASM_Node DASM_Node;
|
};
|
||||||
struct DASM_Node
|
|
||||||
{
|
////////////////////////////////
|
||||||
// rjf: links
|
//~ rjf: Disassembly Text Decoration Types
|
||||||
DASM_Node *next;
|
|
||||||
DASM_Node *prev;
|
typedef U32 DASM_StyleFlags;
|
||||||
|
enum
|
||||||
// rjf: key
|
{
|
||||||
U128 hash;
|
DASM_StyleFlag_Addresses = (1<<0),
|
||||||
U64 addr;
|
DASM_StyleFlag_CodeBytes = (1<<1),
|
||||||
Architecture arch;
|
DASM_StyleFlag_SourceFilesNames = (1<<2),
|
||||||
DASM_StyleFlags style_flags;
|
DASM_StyleFlag_SourceLines = (1<<3),
|
||||||
DASM_Syntax syntax;
|
DASM_StyleFlag_SymbolNames = (1<<4),
|
||||||
|
};
|
||||||
// rjf: value
|
|
||||||
Arena *info_arena;
|
////////////////////////////////
|
||||||
DASM_Info info;
|
//~ rjf: Disassembling Parameters Bundle
|
||||||
|
|
||||||
// rjf: metadata
|
typedef struct DASM_Params DASM_Params;
|
||||||
B32 is_working;
|
struct DASM_Params
|
||||||
U64 scope_ref_count;
|
{
|
||||||
U64 last_time_touched_us;
|
U64 vaddr;
|
||||||
U64 last_user_clock_idx_touched;
|
Arch arch;
|
||||||
U64 load_count;
|
DASM_StyleFlags style_flags;
|
||||||
};
|
DASM_Syntax syntax;
|
||||||
|
U64 base_vaddr;
|
||||||
typedef struct DASM_Slot DASM_Slot;
|
DI_Key dbgi_key;
|
||||||
struct DASM_Slot
|
};
|
||||||
{
|
|
||||||
DASM_Node *first;
|
////////////////////////////////
|
||||||
DASM_Node *last;
|
//~ rjf: Disassembly Text Line Types
|
||||||
};
|
|
||||||
|
typedef U32 DASM_LineFlags;
|
||||||
typedef struct DASM_Stripe DASM_Stripe;
|
enum
|
||||||
struct DASM_Stripe
|
{
|
||||||
{
|
DASM_LineFlag_Decorative = (1<<0),
|
||||||
Arena *arena;
|
};
|
||||||
OS_Handle rw_mutex;
|
|
||||||
OS_Handle cv;
|
typedef struct DASM_Line DASM_Line;
|
||||||
DASM_Node *free_node;
|
struct DASM_Line
|
||||||
};
|
{
|
||||||
|
U32 code_off;
|
||||||
////////////////////////////////
|
DASM_LineFlags flags;
|
||||||
//~ rjf: Scoped Access Types
|
U64 addr;
|
||||||
|
Rng1U64 text_range;
|
||||||
typedef struct DASM_Touch DASM_Touch;
|
};
|
||||||
struct DASM_Touch
|
|
||||||
{
|
typedef struct DASM_LineChunkNode DASM_LineChunkNode;
|
||||||
DASM_Touch *next;
|
struct DASM_LineChunkNode
|
||||||
U128 hash;
|
{
|
||||||
U64 addr;
|
DASM_LineChunkNode *next;
|
||||||
Architecture arch;
|
DASM_Line *v;
|
||||||
DASM_StyleFlags style_flags;
|
U64 cap;
|
||||||
DASM_Syntax syntax;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DASM_Scope DASM_Scope;
|
typedef struct DASM_LineChunkList DASM_LineChunkList;
|
||||||
struct DASM_Scope
|
struct DASM_LineChunkList
|
||||||
{
|
{
|
||||||
DASM_Scope *next;
|
DASM_LineChunkNode *first;
|
||||||
DASM_Touch *top_touch;
|
DASM_LineChunkNode *last;
|
||||||
};
|
U64 node_count;
|
||||||
|
U64 line_count;
|
||||||
////////////////////////////////
|
};
|
||||||
//~ rjf: Thread Context
|
|
||||||
|
typedef struct DASM_LineArray DASM_LineArray;
|
||||||
typedef struct DASM_TCTX DASM_TCTX;
|
struct DASM_LineArray
|
||||||
struct DASM_TCTX
|
{
|
||||||
{
|
DASM_Line *v;
|
||||||
Arena *arena;
|
U64 count;
|
||||||
DASM_Scope *free_scope;
|
};
|
||||||
DASM_Touch *free_touch;
|
|
||||||
};
|
////////////////////////////////
|
||||||
|
//~ rjf: Disassembly Result Bundle
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Shared State
|
typedef struct DASM_Result DASM_Result;
|
||||||
|
struct DASM_Result
|
||||||
typedef struct DASM_Shared DASM_Shared;
|
{
|
||||||
struct DASM_Shared
|
String8 text;
|
||||||
{
|
DASM_LineArray lines;
|
||||||
Arena *arena;
|
};
|
||||||
|
|
||||||
// rjf: user clock
|
////////////////////////////////
|
||||||
U64 user_clock_idx;
|
//~ rjf: Value Bundle Type
|
||||||
|
|
||||||
// rjf: cache
|
typedef struct DASM_Info DASM_Info;
|
||||||
U64 slots_count;
|
struct DASM_Info
|
||||||
U64 stripes_count;
|
{
|
||||||
DASM_Slot *slots;
|
U128 text_key;
|
||||||
DASM_Stripe *stripes;
|
DASM_LineArray lines;
|
||||||
|
};
|
||||||
// rjf: user -> parse thread
|
|
||||||
U64 u2p_ring_size;
|
////////////////////////////////
|
||||||
U8 *u2p_ring_base;
|
//~ rjf: Cache Types
|
||||||
U64 u2p_ring_write_pos;
|
|
||||||
U64 u2p_ring_read_pos;
|
typedef struct DASM_Node DASM_Node;
|
||||||
OS_Handle u2p_ring_cv;
|
struct DASM_Node
|
||||||
OS_Handle u2p_ring_mutex;
|
{
|
||||||
|
// rjf: links
|
||||||
// rjf: parse threads
|
DASM_Node *next;
|
||||||
U64 parse_thread_count;
|
DASM_Node *prev;
|
||||||
OS_Handle *parse_threads;
|
|
||||||
|
// rjf: key
|
||||||
// rjf: evictor thread
|
U128 hash;
|
||||||
OS_Handle evictor_thread;
|
DASM_Params params;
|
||||||
};
|
|
||||||
|
// rjf: generations
|
||||||
////////////////////////////////
|
U64 change_gen;
|
||||||
//~ rjf: Globals
|
|
||||||
|
// rjf: value
|
||||||
thread_static DASM_TCTX *dasm_tctx = 0;
|
Arena *info_arena;
|
||||||
global DASM_Shared *dasm_shared = 0;
|
DASM_Info info;
|
||||||
|
|
||||||
////////////////////////////////
|
// rjf: metadata
|
||||||
//~ rjf: Instruction Type Functions
|
B32 is_working;
|
||||||
|
U64 scope_ref_count;
|
||||||
internal void dasm_inst_chunk_list_push(Arena *arena, DASM_InstChunkList *list, U64 cap, DASM_Inst *inst);
|
U64 last_time_touched_us;
|
||||||
internal DASM_InstArray dasm_inst_array_from_chunk_list(Arena *arena, DASM_InstChunkList *list);
|
U64 last_user_clock_idx_touched;
|
||||||
internal U64 dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off);
|
U64 load_count;
|
||||||
internal U64 dasm_inst_array_code_off_from_idx(DASM_InstArray *array, U64 idx);
|
U64 last_time_requested_us;
|
||||||
|
U64 last_user_clock_idx_requested;
|
||||||
////////////////////////////////
|
};
|
||||||
//~ rjf: Main Layer Initialization
|
|
||||||
|
typedef struct DASM_Slot DASM_Slot;
|
||||||
internal void dasm_init(void);
|
struct DASM_Slot
|
||||||
|
{
|
||||||
////////////////////////////////
|
DASM_Node *first;
|
||||||
//~ rjf: User Clock
|
DASM_Node *last;
|
||||||
|
};
|
||||||
internal void dasm_user_clock_tick(void);
|
|
||||||
internal U64 dasm_user_clock_idx(void);
|
typedef struct DASM_Stripe DASM_Stripe;
|
||||||
|
struct DASM_Stripe
|
||||||
////////////////////////////////
|
{
|
||||||
//~ rjf: Scoped Access
|
Arena *arena;
|
||||||
|
OS_Handle rw_mutex;
|
||||||
internal DASM_Scope *dasm_scope_open(void);
|
OS_Handle cv;
|
||||||
internal void dasm_scope_close(DASM_Scope *scope);
|
DASM_Node *free_node;
|
||||||
internal void dasm_scope_touch_node__stripe_r_guarded(DASM_Scope *scope, DASM_Node *node);
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Cache Lookups
|
//~ rjf: Scoped Access Types
|
||||||
|
|
||||||
internal DASM_Info dasm_info_from_hash_addr_arch_style(DASM_Scope *scope, U128 hash, U64 addr, Architecture arch, DASM_StyleFlags style_flags, DASM_Syntax syntax);
|
typedef struct DASM_Touch DASM_Touch;
|
||||||
internal DASM_Info dasm_info_from_key_addr_arch_style(DASM_Scope *scope, U128 key, U64 addr, Architecture arch, DASM_StyleFlags style_flags, DASM_Syntax syntax, U128 *hash_out);
|
struct DASM_Touch
|
||||||
|
{
|
||||||
////////////////////////////////
|
DASM_Touch *next;
|
||||||
//~ rjf: Parse Threads
|
U128 hash;
|
||||||
|
DASM_Params params;
|
||||||
internal B32 dasm_u2p_enqueue_req(U128 hash, U64 addr, Architecture arch, DASM_StyleFlags style_flags, DASM_Syntax syntax, U64 endt_us);
|
};
|
||||||
internal void dasm_u2p_dequeue_req(U128 *hash_out, U64 *addr_out, Architecture *arch_out, DASM_StyleFlags *style_flags_out, DASM_Syntax *syntax_out);
|
|
||||||
internal void dasm_parse_thread__entry_point(void *p);
|
typedef struct DASM_Scope DASM_Scope;
|
||||||
|
struct DASM_Scope
|
||||||
////////////////////////////////
|
{
|
||||||
//~ rjf: Evictor Threads
|
DASM_Scope *next;
|
||||||
|
DASM_Touch *top_touch;
|
||||||
internal void dasm_evictor_thread__entry_point(void *p);
|
U64 base_pos;
|
||||||
|
};
|
||||||
#endif // DASM_CACHE_H
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Thread Context
|
||||||
|
|
||||||
|
typedef struct DASM_TCTX DASM_TCTX;
|
||||||
|
struct DASM_TCTX
|
||||||
|
{
|
||||||
|
Arena *arena;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Shared State
|
||||||
|
|
||||||
|
typedef struct DASM_Shared DASM_Shared;
|
||||||
|
struct DASM_Shared
|
||||||
|
{
|
||||||
|
Arena *arena;
|
||||||
|
|
||||||
|
// rjf: user clock
|
||||||
|
U64 user_clock_idx;
|
||||||
|
|
||||||
|
// rjf: cache
|
||||||
|
U64 slots_count;
|
||||||
|
U64 stripes_count;
|
||||||
|
DASM_Slot *slots;
|
||||||
|
DASM_Stripe *stripes;
|
||||||
|
|
||||||
|
// rjf: user -> parse thread
|
||||||
|
U64 u2p_ring_size;
|
||||||
|
U8 *u2p_ring_base;
|
||||||
|
U64 u2p_ring_write_pos;
|
||||||
|
U64 u2p_ring_read_pos;
|
||||||
|
OS_Handle u2p_ring_cv;
|
||||||
|
OS_Handle u2p_ring_mutex;
|
||||||
|
|
||||||
|
// rjf: parse threads
|
||||||
|
U64 parse_thread_count;
|
||||||
|
OS_Handle *parse_threads;
|
||||||
|
|
||||||
|
// rjf: evictor/detector thread
|
||||||
|
OS_Handle evictor_detector_thread;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Globals
|
||||||
|
|
||||||
|
thread_static DASM_TCTX *dasm_tctx = 0;
|
||||||
|
global DASM_Shared *dasm_shared = 0;
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Instruction Decoding/Disassembling Type Functions
|
||||||
|
|
||||||
|
internal DASM_Inst dasm_inst_from_code(Arena *arena, Arch arch, U64 vaddr, String8 code, DASM_Syntax syntax);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Control Flow Analysis
|
||||||
|
|
||||||
|
internal DASM_CtrlFlowInfo dasm_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Arch arch, U64 vaddr, String8 code);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Parameter Type Functions
|
||||||
|
|
||||||
|
internal B32 dasm_params_match(DASM_Params *a, DASM_Params *b);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Line Type Functions
|
||||||
|
|
||||||
|
internal void dasm_line_chunk_list_push(Arena *arena, DASM_LineChunkList *list, U64 cap, DASM_Line *line);
|
||||||
|
internal DASM_LineArray dasm_line_array_from_chunk_list(Arena *arena, DASM_LineChunkList *list);
|
||||||
|
internal U64 dasm_line_array_idx_from_code_off__linear_scan(DASM_LineArray *array, U64 off);
|
||||||
|
internal U64 dasm_line_array_code_off_from_idx(DASM_LineArray *array, U64 idx);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Main Layer Initialization
|
||||||
|
|
||||||
|
internal void dasm_init(void);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: User Clock
|
||||||
|
|
||||||
|
internal void dasm_user_clock_tick(void);
|
||||||
|
internal U64 dasm_user_clock_idx(void);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Scoped Access
|
||||||
|
|
||||||
|
internal DASM_Scope *dasm_scope_open(void);
|
||||||
|
internal void dasm_scope_close(DASM_Scope *scope);
|
||||||
|
internal void dasm_scope_touch_node__stripe_r_guarded(DASM_Scope *scope, DASM_Node *node);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Cache Lookups
|
||||||
|
|
||||||
|
internal DASM_Info dasm_info_from_hash_params(DASM_Scope *scope, U128 hash, DASM_Params *params);
|
||||||
|
internal DASM_Info dasm_info_from_key_params(DASM_Scope *scope, U128 key, DASM_Params *params, U128 *hash_out);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Parse Threads
|
||||||
|
|
||||||
|
internal B32 dasm_u2p_enqueue_req(U128 hash, DASM_Params *params, U64 endt_us);
|
||||||
|
internal void dasm_u2p_dequeue_req(Arena *arena, U128 *hash_out, DASM_Params *params_out);
|
||||||
|
internal void dasm_parse_thread__entry_point(void *p);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Evictor/Detector Thread
|
||||||
|
|
||||||
|
internal void dasm_evictor_detector_thread__entry_point(void *p);
|
||||||
|
|
||||||
|
#endif // DASM_CACHE_H
|
||||||
|
|||||||
@@ -0,0 +1,133 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Built-In Command Tables
|
||||||
|
|
||||||
|
@table(name ui_vis ipc_docs_vis q_slot q_view q_ent_kind q_ctrl_ent_kind q_allow_files q_allow_folders q_keep_oi q_select_oi q_is_code q_required canonical_icon string display_name desc search_tags )
|
||||||
|
// / | | | \___ _________________________________/ | | | | |
|
||||||
|
// / | | | \ / | | | | |
|
||||||
|
D_CmdTable: // | | | | | | | | | |
|
||||||
|
{
|
||||||
|
//- rjf: low-level target control operations
|
||||||
|
{LaunchAndRun 1 1 Entity null Target Null 0 0 0 0 0 1 Play "launch_and_run" "Launch and Run" "Starts debugging a new instance of a target, then runs." "launch,start,run,target" }
|
||||||
|
{LaunchAndInit 1 1 Entity null Target Null 0 0 0 0 0 1 PlayStepForward "launch_and_init" "Launch and Initialize" "Starts debugging a new instance of a target, then stops at the program's entry point." "launch,start,entry,point" }
|
||||||
|
{Kill 1 1 Process null Nil Process 0 0 0 0 0 1 X "kill" "Kill" "Kills the specified existing attached process(es)." "stop,kill" }
|
||||||
|
{KillAll 1 1 Null null Nil Null 0 0 0 0 0 0 Stop "kill_all" "Kill All" "Kills all attached processes." "stop,kill,all" }
|
||||||
|
{Detach 1 1 Process null Nil Process 0 0 0 0 0 1 Null "detach" "Detach" "Detaches the specified attached process(es)." "detach" }
|
||||||
|
{Continue 1 1 Null null Nil Null 0 0 0 0 0 0 Play "continue" "Continue" "Continues executing all attached processes." "" }
|
||||||
|
{StepIntoInst 1 1 Null null Nil Null 0 0 0 0 0 0 StepInto "step_into_inst" "Step Into (Assembly)" "Performs a step that goes into calls, at the instruction level." "single,step,thread" }
|
||||||
|
{StepOverInst 1 1 Null null Nil Null 0 0 0 0 0 0 StepOver "step_over_inst" "Step Over (Assembly)" "Performs a step that skips calls, at the instruction level." "single,step,thread" }
|
||||||
|
{StepIntoLine 1 1 Null null Nil Null 0 0 0 0 0 0 StepInto "step_into_line" "Step Into (Line)" "Performs a step that goes into calls, at the source code line level." "step,thread" }
|
||||||
|
{StepOverLine 1 1 Null null Nil Null 0 0 0 0 0 0 StepOver "step_over_line" "Step Over (Line)" "Performs a step that skips calls, at the source code line level." "step,thread" }
|
||||||
|
{StepOut 1 1 Null null Nil Null 0 0 0 0 0 0 StepOut "step_out" "Step Out" "Runs to the end of the current function and exits it." "" }
|
||||||
|
{Halt 1 1 Null null Nil Null 0 0 0 0 0 0 Pause "halt" "Halt" "Halts all attached processes." "pause" }
|
||||||
|
{SoftHaltRefresh 1 1 Null null Nil Null 0 0 0 0 0 0 Refresh "soft_halt_refresh" "Soft Halt Refresh" "Interrupts all attached processes to collect data, and then resumes them." "" }
|
||||||
|
{SetThreadIP 0 1 Vaddr null Nil Null 0 0 0 0 1 1 Null "set_thread_ip" "Set Thread IP" "Sets the specified thread's instruction pointer at the specified address." "" }
|
||||||
|
|
||||||
|
//- rjf: high-level composite target control operations
|
||||||
|
{RunToLine 0 1 Null null Nil Null 0 0 0 0 0 0 Play "run_to_line" "Run To Line" "Runs until a particular source line is hit." "" }
|
||||||
|
{RunToAddress 1 1 Vaddr null Nil Null 0 0 0 0 1 1 PlayStepForward "run_to_address" "Run To Address" "Runs until a particular address is hit." "" }
|
||||||
|
{Run 1 1 Null null Nil Null 0 0 0 0 0 0 Play "run" "Run" "Runs all targets after starting them if they have not been started yet." "play" }
|
||||||
|
{Restart 1 1 Null null Nil Null 0 0 0 0 0 0 Redo "restart" "Restart" "Kills all attached processes, then launches all active targets." "restart,retry" }
|
||||||
|
{StepInto 1 1 Null null Nil Null 0 0 0 0 0 0 StepInto "step_into" "Step Into" "Steps once, possibly into function calls, for either source lines or instructions (whichever is selected)." "" }
|
||||||
|
{StepOver 1 1 Null null Nil Null 0 0 0 0 0 0 StepOver "step_over" "Step Over" "Steps once, always over function calls, for either source lines or instructions." "" }
|
||||||
|
|
||||||
|
//- rjf: debug control context management operations
|
||||||
|
{FreezeThread 1 1 Thread null Nil Thread 0 0 0 0 0 1 Locked "freeze_thread" "Freeze Thread" "Freezes the passed thread." "callstack,unwind" }
|
||||||
|
{ThawThread 1 1 Thread null Nil Thread 0 0 0 0 0 1 Unlocked "thaw_thread" "Thaw Thread" "Thaws the passed thread." "" }
|
||||||
|
{FreezeProcess 1 1 Process null Nil Process 0 0 0 0 0 1 Locked "freeze_process" "Freeze Process" "Freezes the passed process." "" }
|
||||||
|
{ThawProcess 1 1 Process null Nil Process 0 0 0 0 0 1 Unlocked "thaw_process" "Thaw Process" "Thaws the passed process." "" }
|
||||||
|
{FreezeMachine 0 1 Machine null Nil Machine 0 0 0 0 0 1 Locked "freeze_machine" "Freeze Machine" "Freezes the passed machine." "" }
|
||||||
|
{ThawMachine 0 1 Machine null Nil Machine 0 0 0 0 0 1 Unlocked "thaw_machine" "Thaw Machine" "Thaws the passed machine." "" }
|
||||||
|
{FreezeLocalMachine 1 1 Null null Nil Null 0 0 0 0 0 0 Machine "freeze_local_machine" "Freeze Local Machine" "Freezes the local machine." "" }
|
||||||
|
{ThawLocalMachine 1 1 Null null Nil Null 0 0 0 0 0 0 Machine "thaw_local_machine" "Thaw Local Machine" "Thaws the local machine." "" }
|
||||||
|
{FreezeEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "freeze_entity" "Freeze Entity" "Freezes an entity." "" }
|
||||||
|
{ThawEntity 0 0 Null null Nil Null 0 0 0 0 0 0 Null "thaw_entity" "Thaw Entity" "Thaws an entity." "" }
|
||||||
|
|
||||||
|
//- rjf: entity decoration
|
||||||
|
{SetEntityColor 0 0 Null null Nil Null 0 0 0 0 0 0 Null "set_entity_color" "Set Entity Color" "Sets the passed entity's color." "" }
|
||||||
|
{SetEntityName 0 0 Null null Nil Null 0 0 0 0 0 0 Null "set_entity_name" "Set Entity Name" "Sets the passed entity's name." "" }
|
||||||
|
|
||||||
|
//- rjf: attaching
|
||||||
|
{Attach 1 1 PID null Nil Null 0 0 0 0 0 1 Null "attach" "Attach" "Attaches to a process that is already running on the local machine." "" }
|
||||||
|
}
|
||||||
|
|
||||||
|
@enum D_CmdKind:
|
||||||
|
{
|
||||||
|
Null,
|
||||||
|
@expand(D_CmdTable, a) `$(a.name)`,
|
||||||
|
COUNT,
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Built-In VieNull w Rules
|
||||||
|
|
||||||
|
@table(coverage_check name name_lower string ih ex xp vb display_name docs schema description)
|
||||||
|
D_ViewRuleTable:
|
||||||
|
{
|
||||||
|
{x Default default "default" - - - x "Default" - "" "" }
|
||||||
|
{x Array array "array" - - x - "Array" x "x:{expr}" "Specifies that a pointer points to N elements, rather than only 1." }
|
||||||
|
{x Slice slice "slice" - - x - "Slice" x "" "Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer." }
|
||||||
|
{- List list "list" - - - x "List" - "x:{member}" "Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list." }
|
||||||
|
{x ByteSwap bswap "bswap" x - x - "Byte Swap" x "" "Specifies that all integral evaluations should be byte-swapped, such that their endianness is reversed." }
|
||||||
|
{x Cast cast "cast" - - x - "Cast" x "x:{type}" "Specifies that the expression to which the view rule is applied should be casted to the provided type." }
|
||||||
|
{- BaseDec base_dec "dec" x - - - "Decimal Base (Base 10)" x "" "Specifies that all integral evaluations should appear in base-10 form." }
|
||||||
|
{- BaseBin base_bin "bin" x - - - "Binary Base (Base 2)" x "" "Specifies that all integral evaluations should appear in base-2 form." }
|
||||||
|
{- BaseOct base_oct "oct" x - - - "Octal Base (Base 8)" x "" "Specifies that all integral evaluations should appear in base-8 form." }
|
||||||
|
{- BaseHex base_hex "hex" x - - - "Hexadecimal Base (Base 16)" x "" "Specifies that all integral evaluations should appear in base-16 form." }
|
||||||
|
{- Only only "only" x - - x "Only Specified Members" x "x:{member}" "Specifies that only the specified members should appear in struct, union, or class evaluations." }
|
||||||
|
{- Omit omit "omit" x - - x "Omit Specified Members" x "x:{member}" "Omits a list of member names from appearing in struct, union, or class evaluations." }
|
||||||
|
{- NoAddr no_addr "no_addr" x - - - "Disable Address Values" x "" "Displays only what pointers point to, if possible, without the pointer's address value." }
|
||||||
|
{x Checkbox checkbox "checkbox" - - - - "Checkbox" x "" "Displays simple integer values as checkboxes, encoding zero or nonzero values." }
|
||||||
|
{- ColorRGBA color_rgba "color_rgba" - x - x "Color (RGBA)" x "" "Displays as a color, interpreting the data as encoding R, G, B, and A values." }
|
||||||
|
{x Text text "text" - x - x "Text" x "x:{'lang':lang, 'size':expr}" "Displays as text." }
|
||||||
|
{x Disasm disasm "disasm" - x - x "Disassembly" x "x:{'arch':arch, 'size':expr}" "Displays as disassembled instructions, interpreting the data as raw machine code." }
|
||||||
|
{x Memory memory "memory" - x - x "Memory" x "x:{'size':expr}" "Displays as a raw memory grid." }
|
||||||
|
{- Graph graph "graph" - x - x "Graph" x "" "Displays as a pointer graph, visualizing nodes and edges formed by pointers directly." }
|
||||||
|
{x Bitmap bitmap "bitmap" - x - x "Bitmap" x "x:{'w':expr, 'h':expr, 'fmt':tex2dformat}" "Displays as a bitmap, interpreting the data as raw pixel data." }
|
||||||
|
{- Geo3D geo3d "geo3d" - x - x "Geometry (3D)" x "x:{'count':expr, 'vtx':expr, 'vtx_size':expr}" "Displays as geometry, interpreting the data as index or vertex data." }
|
||||||
|
}
|
||||||
|
|
||||||
|
@enum D_ViewRuleKind:
|
||||||
|
{
|
||||||
|
@expand(D_ViewRuleTable a) `$(a.name)`,
|
||||||
|
COUNT,
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(D_ViewRuleSpecInfo) @c_file d_core_view_rule_spec_info_table:
|
||||||
|
{
|
||||||
|
@expand(D_ViewRuleTable a)
|
||||||
|
```{str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.schema)"), str8_lit_comp("$(a.description)"), (D_ViewRuleSpecInfoFlag_Inherited*$(a.ih == "x"))|(D_ViewRuleSpecInfoFlag_Expandable*$(a.ex == "x"))|(D_ViewRuleSpecInfoFlag_ExprResolution*$(a.xp == "x"))|(D_ViewRuleSpecInfoFlag_VizBlockProd*$(a.vb == "x")), }```;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Developer Toggles
|
||||||
|
|
||||||
|
@table(name)
|
||||||
|
D_DevToggleTable:
|
||||||
|
{
|
||||||
|
{telemetry_capture}
|
||||||
|
{simulate_lag}
|
||||||
|
{draw_ui_text_pos}
|
||||||
|
{draw_ui_focus_debug}
|
||||||
|
{draw_ui_box_heatmap}
|
||||||
|
{eval_compiler_tooltips}
|
||||||
|
{eval_watch_key_tooltips}
|
||||||
|
{cmd_context_tooltips}
|
||||||
|
{scratch_mouse_draw}
|
||||||
|
{updating_indicator}
|
||||||
|
}
|
||||||
|
|
||||||
|
@gen
|
||||||
|
{
|
||||||
|
@expand(D_DevToggleTable a) `global B32 DEV_$(a.name) = 0;`
|
||||||
|
}
|
||||||
|
|
||||||
|
@gen
|
||||||
|
{
|
||||||
|
`struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =`;
|
||||||
|
`{`;
|
||||||
|
@expand(D_DevToggleTable a) `{&DEV_$(a.name), str8_lit_comp("$(a.name)")},`
|
||||||
|
`};`;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,495 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
#ifndef DBG_ENGINE_CORE_H
|
||||||
|
#define DBG_ENGINE_CORE_H
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Tick Input Types
|
||||||
|
|
||||||
|
typedef struct D_Target D_Target;
|
||||||
|
struct D_Target
|
||||||
|
{
|
||||||
|
String8 exe;
|
||||||
|
String8 args;
|
||||||
|
String8 working_directory;
|
||||||
|
String8 custom_entry_point_name;
|
||||||
|
String8 stdout_path;
|
||||||
|
String8 stderr_path;
|
||||||
|
String8 stdin_path;
|
||||||
|
String8List env;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_TargetArray D_TargetArray;
|
||||||
|
struct D_TargetArray
|
||||||
|
{
|
||||||
|
D_Target *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_Breakpoint D_Breakpoint;
|
||||||
|
struct D_Breakpoint
|
||||||
|
{
|
||||||
|
String8 file_path;
|
||||||
|
TxtPt pt;
|
||||||
|
String8 symbol_name;
|
||||||
|
U64 vaddr;
|
||||||
|
String8 condition;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_BreakpointArray D_BreakpointArray;
|
||||||
|
struct D_BreakpointArray
|
||||||
|
{
|
||||||
|
D_Breakpoint *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_PathMap D_PathMap;
|
||||||
|
struct D_PathMap
|
||||||
|
{
|
||||||
|
String8 src;
|
||||||
|
String8 dst;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_PathMapArray D_PathMapArray;
|
||||||
|
struct D_PathMapArray
|
||||||
|
{
|
||||||
|
D_PathMap *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Tick Output Types
|
||||||
|
|
||||||
|
typedef enum D_EventKind
|
||||||
|
{
|
||||||
|
D_EventKind_Null,
|
||||||
|
D_EventKind_ProcessEnd,
|
||||||
|
D_EventKind_Stop,
|
||||||
|
D_EventKind_COUNT
|
||||||
|
}
|
||||||
|
D_EventKind;
|
||||||
|
|
||||||
|
typedef enum D_EventCause
|
||||||
|
{
|
||||||
|
D_EventCause_Null,
|
||||||
|
D_EventCause_UserBreakpoint,
|
||||||
|
D_EventCause_Halt,
|
||||||
|
D_EventCause_COUNT
|
||||||
|
}
|
||||||
|
D_EventCause;
|
||||||
|
|
||||||
|
typedef struct D_Event D_Event;
|
||||||
|
struct D_Event
|
||||||
|
{
|
||||||
|
D_EventKind kind;
|
||||||
|
D_EventCause cause;
|
||||||
|
CTRL_Handle thread;
|
||||||
|
U64 vaddr;
|
||||||
|
U64 code;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_EventNode D_EventNode;
|
||||||
|
struct D_EventNode
|
||||||
|
{
|
||||||
|
D_EventNode *next;
|
||||||
|
D_Event v;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_EventList D_EventList;
|
||||||
|
struct D_EventList
|
||||||
|
{
|
||||||
|
D_EventNode *first;
|
||||||
|
D_EventNode *last;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Line Info Types
|
||||||
|
|
||||||
|
typedef struct D_Line D_Line;
|
||||||
|
struct D_Line
|
||||||
|
{
|
||||||
|
String8 file_path;
|
||||||
|
TxtPt pt;
|
||||||
|
Rng1U64 voff_range;
|
||||||
|
DI_Key dbgi_key;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_LineNode D_LineNode;
|
||||||
|
struct D_LineNode
|
||||||
|
{
|
||||||
|
D_LineNode *next;
|
||||||
|
D_Line v;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_LineList D_LineList;
|
||||||
|
struct D_LineList
|
||||||
|
{
|
||||||
|
D_LineNode *first;
|
||||||
|
D_LineNode *last;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_LineListArray D_LineListArray;
|
||||||
|
struct D_LineListArray
|
||||||
|
{
|
||||||
|
D_LineList *v;
|
||||||
|
U64 count;
|
||||||
|
DI_KeyList dbgi_keys;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Debug Engine Control Communication Types
|
||||||
|
|
||||||
|
typedef enum D_RunKind
|
||||||
|
{
|
||||||
|
D_RunKind_Run,
|
||||||
|
D_RunKind_SingleStep,
|
||||||
|
D_RunKind_Step,
|
||||||
|
D_RunKind_COUNT
|
||||||
|
}
|
||||||
|
D_RunKind;
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Generated Code
|
||||||
|
|
||||||
|
#include "dbg_engine/generated/dbg_engine.meta.h"
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: View Rules
|
||||||
|
|
||||||
|
typedef U32 D_ViewRuleSpecInfoFlags; // NOTE(rjf): see @view_rule_info
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
D_ViewRuleSpecInfoFlag_Inherited = (1<<0),
|
||||||
|
D_ViewRuleSpecInfoFlag_Expandable = (1<<1),
|
||||||
|
D_ViewRuleSpecInfoFlag_ExprResolution = (1<<2),
|
||||||
|
D_ViewRuleSpecInfoFlag_VizBlockProd = (1<<3),
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_ViewRuleSpecInfo D_ViewRuleSpecInfo;
|
||||||
|
struct D_ViewRuleSpecInfo
|
||||||
|
{
|
||||||
|
String8 string;
|
||||||
|
String8 display_string;
|
||||||
|
String8 schema;
|
||||||
|
String8 description;
|
||||||
|
D_ViewRuleSpecInfoFlags flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_ViewRuleSpecInfoArray D_ViewRuleSpecInfoArray;
|
||||||
|
struct D_ViewRuleSpecInfoArray
|
||||||
|
{
|
||||||
|
D_ViewRuleSpecInfo *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_ViewRuleSpec D_ViewRuleSpec;
|
||||||
|
struct D_ViewRuleSpec
|
||||||
|
{
|
||||||
|
D_ViewRuleSpec *hash_next;
|
||||||
|
D_ViewRuleSpecInfo info;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Command Types
|
||||||
|
|
||||||
|
typedef struct D_CmdParams D_CmdParams;
|
||||||
|
struct D_CmdParams
|
||||||
|
{
|
||||||
|
CTRL_Handle machine;
|
||||||
|
CTRL_Handle process;
|
||||||
|
CTRL_Handle thread;
|
||||||
|
CTRL_Handle entity;
|
||||||
|
String8 string;
|
||||||
|
String8 file_path;
|
||||||
|
TxtPt cursor;
|
||||||
|
U64 vaddr;
|
||||||
|
B32 prefer_disasm;
|
||||||
|
U32 pid;
|
||||||
|
U32 rgba;
|
||||||
|
D_TargetArray targets;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_Cmd D_Cmd;
|
||||||
|
struct D_Cmd
|
||||||
|
{
|
||||||
|
D_CmdKind kind;
|
||||||
|
D_CmdParams params;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_CmdNode D_CmdNode;
|
||||||
|
struct D_CmdNode
|
||||||
|
{
|
||||||
|
D_CmdNode *next;
|
||||||
|
D_CmdNode *prev;
|
||||||
|
D_Cmd cmd;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_CmdList D_CmdList;
|
||||||
|
struct D_CmdList
|
||||||
|
{
|
||||||
|
D_CmdNode *first;
|
||||||
|
D_CmdNode *last;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Main State Caches
|
||||||
|
|
||||||
|
//- rjf: per-thread unwind cache
|
||||||
|
|
||||||
|
typedef struct D_UnwindCacheNode D_UnwindCacheNode;
|
||||||
|
struct D_UnwindCacheNode
|
||||||
|
{
|
||||||
|
D_UnwindCacheNode *next;
|
||||||
|
D_UnwindCacheNode *prev;
|
||||||
|
U64 reggen;
|
||||||
|
U64 memgen;
|
||||||
|
Arena *arena;
|
||||||
|
CTRL_Handle thread;
|
||||||
|
CTRL_Unwind unwind;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_UnwindCacheSlot D_UnwindCacheSlot;
|
||||||
|
struct D_UnwindCacheSlot
|
||||||
|
{
|
||||||
|
D_UnwindCacheNode *first;
|
||||||
|
D_UnwindCacheNode *last;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_UnwindCache D_UnwindCache;
|
||||||
|
struct D_UnwindCache
|
||||||
|
{
|
||||||
|
U64 slots_count;
|
||||||
|
D_UnwindCacheSlot *slots;
|
||||||
|
D_UnwindCacheNode *free_node;
|
||||||
|
};
|
||||||
|
|
||||||
|
//- rjf: per-run tls-base-vaddr cache
|
||||||
|
|
||||||
|
typedef struct D_RunTLSBaseCacheNode D_RunTLSBaseCacheNode;
|
||||||
|
struct D_RunTLSBaseCacheNode
|
||||||
|
{
|
||||||
|
D_RunTLSBaseCacheNode *hash_next;
|
||||||
|
CTRL_Handle process;
|
||||||
|
U64 root_vaddr;
|
||||||
|
U64 rip_vaddr;
|
||||||
|
U64 tls_base_vaddr;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_RunTLSBaseCacheSlot D_RunTLSBaseCacheSlot;
|
||||||
|
struct D_RunTLSBaseCacheSlot
|
||||||
|
{
|
||||||
|
D_RunTLSBaseCacheNode *first;
|
||||||
|
D_RunTLSBaseCacheNode *last;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_RunTLSBaseCache D_RunTLSBaseCache;
|
||||||
|
struct D_RunTLSBaseCache
|
||||||
|
{
|
||||||
|
Arena *arena;
|
||||||
|
U64 slots_count;
|
||||||
|
D_RunTLSBaseCacheSlot *slots;
|
||||||
|
};
|
||||||
|
|
||||||
|
//- rjf: per-run locals cache
|
||||||
|
|
||||||
|
typedef struct D_RunLocalsCacheNode D_RunLocalsCacheNode;
|
||||||
|
struct D_RunLocalsCacheNode
|
||||||
|
{
|
||||||
|
D_RunLocalsCacheNode *hash_next;
|
||||||
|
DI_Key dbgi_key;
|
||||||
|
U64 voff;
|
||||||
|
E_String2NumMap *locals_map;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_RunLocalsCacheSlot D_RunLocalsCacheSlot;
|
||||||
|
struct D_RunLocalsCacheSlot
|
||||||
|
{
|
||||||
|
D_RunLocalsCacheNode *first;
|
||||||
|
D_RunLocalsCacheNode *last;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct D_RunLocalsCache D_RunLocalsCache;
|
||||||
|
struct D_RunLocalsCache
|
||||||
|
{
|
||||||
|
Arena *arena;
|
||||||
|
U64 table_size;
|
||||||
|
D_RunLocalsCacheSlot *table;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Main State Types
|
||||||
|
|
||||||
|
typedef struct D_State D_State;
|
||||||
|
struct D_State
|
||||||
|
{
|
||||||
|
// rjf: top-level state
|
||||||
|
Arena *arena;
|
||||||
|
U64 frame_index;
|
||||||
|
U64 frame_eval_memread_endt_us;
|
||||||
|
|
||||||
|
// rjf: commands
|
||||||
|
Arena *cmds_arena;
|
||||||
|
D_CmdList cmds;
|
||||||
|
|
||||||
|
// rjf: output log key
|
||||||
|
U128 output_log_key;
|
||||||
|
|
||||||
|
// rjf: per-run caches
|
||||||
|
D_UnwindCache unwind_cache;
|
||||||
|
U64 tls_base_cache_reggen_idx;
|
||||||
|
U64 tls_base_cache_memgen_idx;
|
||||||
|
D_RunTLSBaseCache tls_base_caches[2];
|
||||||
|
U64 tls_base_cache_gen;
|
||||||
|
U64 locals_cache_reggen_idx;
|
||||||
|
D_RunLocalsCache locals_caches[2];
|
||||||
|
U64 locals_cache_gen;
|
||||||
|
U64 member_cache_reggen_idx;
|
||||||
|
D_RunLocalsCache member_caches[2];
|
||||||
|
U64 member_cache_gen;
|
||||||
|
|
||||||
|
// rjf: view rule specification table
|
||||||
|
U64 view_rule_spec_table_size;
|
||||||
|
D_ViewRuleSpec **view_rule_spec_table;
|
||||||
|
|
||||||
|
// rjf: user -> ctrl driving state
|
||||||
|
Arena *ctrl_last_run_arena;
|
||||||
|
D_RunKind ctrl_last_run_kind;
|
||||||
|
U64 ctrl_last_run_frame_idx;
|
||||||
|
CTRL_Handle ctrl_last_run_thread_handle;
|
||||||
|
CTRL_RunFlags ctrl_last_run_flags;
|
||||||
|
CTRL_TrapList ctrl_last_run_traps;
|
||||||
|
D_BreakpointArray ctrl_last_run_extra_bps;
|
||||||
|
U128 ctrl_last_run_param_state_hash;
|
||||||
|
B32 ctrl_is_running;
|
||||||
|
B32 ctrl_thread_run_state;
|
||||||
|
B32 ctrl_soft_halt_issued;
|
||||||
|
Arena *ctrl_msg_arena;
|
||||||
|
CTRL_MsgList ctrl_msgs;
|
||||||
|
|
||||||
|
// rjf: ctrl -> user reading state
|
||||||
|
CTRL_EntityStore *ctrl_entity_store;
|
||||||
|
Arena *ctrl_stop_arena;
|
||||||
|
CTRL_Event ctrl_last_stop_event;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Globals
|
||||||
|
|
||||||
|
read_only global D_ViewRuleSpec d_nil_core_view_rule_spec = {0};
|
||||||
|
global D_State *d_state = 0;
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Basic Helpers
|
||||||
|
|
||||||
|
internal U64 d_hash_from_seed_string(U64 seed, String8 string);
|
||||||
|
internal U64 d_hash_from_string(String8 string);
|
||||||
|
internal U64 d_hash_from_seed_string__case_insensitive(U64 seed, String8 string);
|
||||||
|
internal U64 d_hash_from_string__case_insensitive(String8 string);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Breakpoints
|
||||||
|
|
||||||
|
internal D_BreakpointArray d_breakpoint_array_copy(Arena *arena, D_BreakpointArray *src);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Path Map Application
|
||||||
|
|
||||||
|
internal String8List d_possible_path_overrides_from_maps_path(Arena *arena, D_PathMapArray *path_maps, String8 file_path);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Debug Info Extraction Type Pure Functions
|
||||||
|
|
||||||
|
internal D_LineList d_line_list_copy(Arena *arena, D_LineList *list);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Command Type Functions
|
||||||
|
|
||||||
|
//- rjf: command parameters
|
||||||
|
internal D_CmdParams d_cmd_params_copy(Arena *arena, D_CmdParams *src);
|
||||||
|
|
||||||
|
//- rjf: command lists
|
||||||
|
internal void d_cmd_list_push_new(Arena *arena, D_CmdList *cmds, D_CmdKind kind, D_CmdParams *params);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: View Rule Spec Stateful Functions
|
||||||
|
|
||||||
|
internal void d_register_view_rule_specs(D_ViewRuleSpecInfoArray specs);
|
||||||
|
internal D_ViewRuleSpec *d_view_rule_spec_from_string(String8 string);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Stepping "Trap Net" Builders
|
||||||
|
|
||||||
|
internal CTRL_TrapList d_trap_net_from_thread__step_over_inst(Arena *arena, CTRL_Entity *thread);
|
||||||
|
internal CTRL_TrapList d_trap_net_from_thread__step_over_line(Arena *arena, CTRL_Entity *thread);
|
||||||
|
internal CTRL_TrapList d_trap_net_from_thread__step_into_line(Arena *arena, CTRL_Entity *thread);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Debug Info Lookups
|
||||||
|
|
||||||
|
//- rjf: voff|vaddr -> symbol lookups
|
||||||
|
internal String8 d_symbol_name_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff, B32 decorated);
|
||||||
|
internal String8 d_symbol_name_from_process_vaddr(Arena *arena, CTRL_Entity *process, U64 vaddr, B32 decorated);
|
||||||
|
|
||||||
|
//- rjf: symbol -> voff lookups
|
||||||
|
internal U64 d_voff_from_dbgi_key_symbol_name(DI_Key *dbgi_key, String8 symbol_name);
|
||||||
|
internal U64 d_type_num_from_dbgi_key_name(DI_Key *dbgi_key, String8 name);
|
||||||
|
|
||||||
|
//- rjf: voff -> line info
|
||||||
|
internal D_LineList d_lines_from_dbgi_key_voff(Arena *arena, DI_Key *dbgi_key, U64 voff);
|
||||||
|
|
||||||
|
//- rjf: file:line -> line info
|
||||||
|
// TODO(rjf): this depends on file path maps, needs to move
|
||||||
|
internal D_LineListArray d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 line_num_range);
|
||||||
|
internal D_LineList d_lines_from_file_path_line_num(Arena *arena, String8 file_path, S64 line_num);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Process/Thread/Module Info Lookups
|
||||||
|
|
||||||
|
internal U64 d_tls_base_vaddr_from_process_root_rip(CTRL_Entity *process, U64 root_vaddr, U64 rip_vaddr);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Target Controls
|
||||||
|
|
||||||
|
//- rjf: stopped info from the control thread
|
||||||
|
internal CTRL_Event d_ctrl_last_stop_event(void);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Main State Accessors/Mutators
|
||||||
|
|
||||||
|
//- rjf: frame data
|
||||||
|
internal U64 d_frame_index(void);
|
||||||
|
|
||||||
|
//- rjf: control state
|
||||||
|
internal D_RunKind d_ctrl_last_run_kind(void);
|
||||||
|
internal U64 d_ctrl_last_run_frame_idx(void);
|
||||||
|
internal B32 d_ctrl_targets_running(void);
|
||||||
|
|
||||||
|
//- rjf: active entity based queries
|
||||||
|
internal DI_KeyList d_push_active_dbgi_key_list(Arena *arena);
|
||||||
|
|
||||||
|
//- rjf: per-run caches
|
||||||
|
internal CTRL_Unwind d_query_cached_unwind_from_thread(CTRL_Entity *thread);
|
||||||
|
internal U64 d_query_cached_rip_from_thread(CTRL_Entity *thread);
|
||||||
|
internal U64 d_query_cached_rip_from_thread_unwind(CTRL_Entity *thread, U64 unwind_count);
|
||||||
|
internal U64 d_query_cached_tls_base_vaddr_from_process_root_rip(CTRL_Entity *process, U64 root_vaddr, U64 rip_vaddr);
|
||||||
|
internal E_String2NumMap *d_query_cached_locals_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff);
|
||||||
|
internal E_String2NumMap *d_query_cached_member_map_from_dbgi_key_voff(DI_Key *dbgi_key, U64 voff);
|
||||||
|
|
||||||
|
//- rjf: top-level command dispatch
|
||||||
|
internal void d_push_cmd(D_CmdKind kind, D_CmdParams *params);
|
||||||
|
#define d_cmd(kind, ...) d_push_cmd((kind), &(D_CmdParams){.thread = {0}, __VA_ARGS__})
|
||||||
|
|
||||||
|
//- rjf: command iteration
|
||||||
|
internal B32 d_next_cmd(D_Cmd **cmd);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Main Layer Top-Level Calls
|
||||||
|
|
||||||
|
internal void d_init(void);
|
||||||
|
internal D_EventList d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_PathMapArray *path_maps, U64 exception_code_filters[(CTRL_ExceptionCodeKind_COUNT+63)/64], CTRL_MetaEvalArray *meta_evals);
|
||||||
|
|
||||||
|
#endif // DBG_ENGINE_CORE_H
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#include "lib_raddbgi_make/raddbgi_make.c"
|
#include "dbg_engine_core.c"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
#ifndef DBG_ENGINE_INC_H
|
||||||
|
#define DBG_ENGINE_INC_H
|
||||||
|
|
||||||
|
#include "dbg_engine_core.h"
|
||||||
|
|
||||||
|
#endif // DBG_ENGINE_INC_H
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
//- GENERATED CODE
|
||||||
|
|
||||||
|
C_LINKAGE_BEGIN
|
||||||
|
D_ViewRuleSpecInfo d_core_view_rule_spec_info_table[21] =
|
||||||
|
{
|
||||||
|
{str8_lit_comp("default"), str8_lit_comp("Default"), str8_lit_comp(""), str8_lit_comp(""), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("x:{expr}"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("slice"), str8_lit_comp("Slice"), str8_lit_comp(""), str8_lit_comp("Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should be byte-swapped, such that their endianness is reversed."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("cast"), str8_lit_comp("Cast"), str8_lit_comp("x:{type}"), str8_lit_comp("Specifies that the expression to which the view rule is applied should be casted to the provided type."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*1)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("bin"), str8_lit_comp("Binary Base (Base 2)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-2 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("oct"), str8_lit_comp("Octal Base (Base 8)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-8 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("hex"), str8_lit_comp("Hexadecimal Base (Base 16)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-16 form."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("only"), str8_lit_comp("Only Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that only the specified members should appear in struct, union, or class evaluations."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("omit"), str8_lit_comp("Omit Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Omits a list of member names from appearing in struct, union, or class evaluations."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("no_addr"), str8_lit_comp("Disable Address Values"), str8_lit_comp(""), str8_lit_comp("Displays only what pointers point to, if possible, without the pointer's address value."), (D_ViewRuleSpecInfoFlag_Inherited*1)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("checkbox"), str8_lit_comp("Checkbox"), str8_lit_comp(""), str8_lit_comp("Displays simple integer values as checkboxes, encoding zero or nonzero values."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*0)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*0), },
|
||||||
|
{str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), str8_lit_comp(""), str8_lit_comp("Displays as a color, interpreting the data as encoding R, G, B, and A values."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("text"), str8_lit_comp("Text"), str8_lit_comp("x:{'lang':lang, 'size':expr}"), str8_lit_comp("Displays as text."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), str8_lit_comp("x:{'arch':arch, 'size':expr}"), str8_lit_comp("Displays as disassembled instructions, interpreting the data as raw machine code."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("memory"), str8_lit_comp("Memory"), str8_lit_comp("x:{'size':expr}"), str8_lit_comp("Displays as a raw memory grid."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("graph"), str8_lit_comp("Graph"), str8_lit_comp(""), str8_lit_comp("Displays as a pointer graph, visualizing nodes and edges formed by pointers directly."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), str8_lit_comp("x:{'w':expr, 'h':expr, 'fmt':tex2dformat}"), str8_lit_comp("Displays as a bitmap, interpreting the data as raw pixel data."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
{str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), str8_lit_comp("x:{'count':expr, 'vtx':expr, 'vtx_size':expr}"), str8_lit_comp("Displays as geometry, interpreting the data as index or vertex data."), (D_ViewRuleSpecInfoFlag_Inherited*0)|(D_ViewRuleSpecInfoFlag_Expandable*1)|(D_ViewRuleSpecInfoFlag_ExprResolution*0)|(D_ViewRuleSpecInfoFlag_VizBlockProd*1), },
|
||||||
|
};
|
||||||
|
|
||||||
|
C_LINKAGE_END
|
||||||
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
//- GENERATED CODE
|
||||||
|
|
||||||
|
#ifndef DBG_ENGINE_META_H
|
||||||
|
#define DBG_ENGINE_META_H
|
||||||
|
|
||||||
|
typedef enum D_CmdKind
|
||||||
|
{
|
||||||
|
D_CmdKind_Null,
|
||||||
|
D_CmdKind_LaunchAndRun,
|
||||||
|
D_CmdKind_LaunchAndInit,
|
||||||
|
D_CmdKind_Kill,
|
||||||
|
D_CmdKind_KillAll,
|
||||||
|
D_CmdKind_Detach,
|
||||||
|
D_CmdKind_Continue,
|
||||||
|
D_CmdKind_StepIntoInst,
|
||||||
|
D_CmdKind_StepOverInst,
|
||||||
|
D_CmdKind_StepIntoLine,
|
||||||
|
D_CmdKind_StepOverLine,
|
||||||
|
D_CmdKind_StepOut,
|
||||||
|
D_CmdKind_Halt,
|
||||||
|
D_CmdKind_SoftHaltRefresh,
|
||||||
|
D_CmdKind_SetThreadIP,
|
||||||
|
D_CmdKind_RunToLine,
|
||||||
|
D_CmdKind_RunToAddress,
|
||||||
|
D_CmdKind_Run,
|
||||||
|
D_CmdKind_Restart,
|
||||||
|
D_CmdKind_StepInto,
|
||||||
|
D_CmdKind_StepOver,
|
||||||
|
D_CmdKind_FreezeThread,
|
||||||
|
D_CmdKind_ThawThread,
|
||||||
|
D_CmdKind_FreezeProcess,
|
||||||
|
D_CmdKind_ThawProcess,
|
||||||
|
D_CmdKind_FreezeMachine,
|
||||||
|
D_CmdKind_ThawMachine,
|
||||||
|
D_CmdKind_FreezeLocalMachine,
|
||||||
|
D_CmdKind_ThawLocalMachine,
|
||||||
|
D_CmdKind_FreezeEntity,
|
||||||
|
D_CmdKind_ThawEntity,
|
||||||
|
D_CmdKind_SetEntityColor,
|
||||||
|
D_CmdKind_SetEntityName,
|
||||||
|
D_CmdKind_Attach,
|
||||||
|
D_CmdKind_COUNT,
|
||||||
|
} D_CmdKind;
|
||||||
|
|
||||||
|
typedef enum D_ViewRuleKind
|
||||||
|
{
|
||||||
|
D_ViewRuleKind_Default,
|
||||||
|
D_ViewRuleKind_Array,
|
||||||
|
D_ViewRuleKind_Slice,
|
||||||
|
D_ViewRuleKind_List,
|
||||||
|
D_ViewRuleKind_ByteSwap,
|
||||||
|
D_ViewRuleKind_Cast,
|
||||||
|
D_ViewRuleKind_BaseDec,
|
||||||
|
D_ViewRuleKind_BaseBin,
|
||||||
|
D_ViewRuleKind_BaseOct,
|
||||||
|
D_ViewRuleKind_BaseHex,
|
||||||
|
D_ViewRuleKind_Only,
|
||||||
|
D_ViewRuleKind_Omit,
|
||||||
|
D_ViewRuleKind_NoAddr,
|
||||||
|
D_ViewRuleKind_Checkbox,
|
||||||
|
D_ViewRuleKind_ColorRGBA,
|
||||||
|
D_ViewRuleKind_Text,
|
||||||
|
D_ViewRuleKind_Disasm,
|
||||||
|
D_ViewRuleKind_Memory,
|
||||||
|
D_ViewRuleKind_Graph,
|
||||||
|
D_ViewRuleKind_Bitmap,
|
||||||
|
D_ViewRuleKind_Geo3D,
|
||||||
|
D_ViewRuleKind_COUNT,
|
||||||
|
} D_ViewRuleKind;
|
||||||
|
|
||||||
|
global B32 DEV_telemetry_capture = 0;
|
||||||
|
global B32 DEV_simulate_lag = 0;
|
||||||
|
global B32 DEV_draw_ui_text_pos = 0;
|
||||||
|
global B32 DEV_draw_ui_focus_debug = 0;
|
||||||
|
global B32 DEV_draw_ui_box_heatmap = 0;
|
||||||
|
global B32 DEV_eval_compiler_tooltips = 0;
|
||||||
|
global B32 DEV_eval_watch_key_tooltips = 0;
|
||||||
|
global B32 DEV_cmd_context_tooltips = 0;
|
||||||
|
global B32 DEV_scratch_mouse_draw = 0;
|
||||||
|
global B32 DEV_updating_indicator = 0;
|
||||||
|
struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =
|
||||||
|
{
|
||||||
|
{&DEV_telemetry_capture, str8_lit_comp("telemetry_capture")},
|
||||||
|
{&DEV_simulate_lag, str8_lit_comp("simulate_lag")},
|
||||||
|
{&DEV_draw_ui_text_pos, str8_lit_comp("draw_ui_text_pos")},
|
||||||
|
{&DEV_draw_ui_focus_debug, str8_lit_comp("draw_ui_focus_debug")},
|
||||||
|
{&DEV_draw_ui_box_heatmap, str8_lit_comp("draw_ui_box_heatmap")},
|
||||||
|
{&DEV_eval_compiler_tooltips, str8_lit_comp("eval_compiler_tooltips")},
|
||||||
|
{&DEV_eval_watch_key_tooltips, str8_lit_comp("eval_watch_key_tooltips")},
|
||||||
|
{&DEV_cmd_context_tooltips, str8_lit_comp("cmd_context_tooltips")},
|
||||||
|
{&DEV_scratch_mouse_draw, str8_lit_comp("scratch_mouse_draw")},
|
||||||
|
{&DEV_updating_indicator, str8_lit_comp("updating_indicator")},
|
||||||
|
};
|
||||||
|
#endif // DBG_ENGINE_META_H
|
||||||
+891
-1343
File diff suppressed because it is too large
Load Diff
+255
-431
@@ -1,431 +1,255 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DBGI_H
|
#ifndef DBGI_H
|
||||||
#define DBGI_H
|
#define DBGI_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Info Bundle Types
|
//~ rjf: Cache Key Type
|
||||||
|
|
||||||
typedef struct DBGI_Parse DBGI_Parse;
|
typedef struct DI_Key DI_Key;
|
||||||
struct DBGI_Parse
|
struct DI_Key
|
||||||
{
|
{
|
||||||
U64 gen;
|
String8 path;
|
||||||
Arena *arena;
|
U64 min_timestamp;
|
||||||
void *exe_base;
|
};
|
||||||
FileProperties exe_props;
|
|
||||||
String8 dbg_path;
|
typedef struct DI_KeyNode DI_KeyNode;
|
||||||
void *dbg_base;
|
struct DI_KeyNode
|
||||||
FileProperties dbg_props;
|
{
|
||||||
PE_BinInfo pe;
|
DI_KeyNode *next;
|
||||||
RDI_Parsed rdi;
|
DI_Key v;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
typedef struct DI_KeyList DI_KeyList;
|
||||||
//~ rjf: Exe -> Debug Forced Override Cache Types
|
struct DI_KeyList
|
||||||
|
{
|
||||||
typedef struct DBGI_ForceNode DBGI_ForceNode;
|
DI_KeyNode *first;
|
||||||
struct DBGI_ForceNode
|
DI_KeyNode *last;
|
||||||
{
|
U64 count;
|
||||||
DBGI_ForceNode *next;
|
};
|
||||||
String8 exe_path;
|
|
||||||
U64 dbg_path_cap;
|
typedef struct DI_KeyArray DI_KeyArray;
|
||||||
U64 dbg_path_size;
|
struct DI_KeyArray
|
||||||
U8 *dbg_path_base;
|
{
|
||||||
};
|
DI_Key *v;
|
||||||
|
U64 count;
|
||||||
typedef struct DBGI_ForceSlot DBGI_ForceSlot;
|
};
|
||||||
struct DBGI_ForceSlot
|
|
||||||
{
|
////////////////////////////////
|
||||||
DBGI_ForceNode *first;
|
//~ rjf: Event Types
|
||||||
DBGI_ForceNode *last;
|
|
||||||
};
|
typedef enum DI_EventKind
|
||||||
|
{
|
||||||
typedef struct DBGI_ForceStripe DBGI_ForceStripe;
|
DI_EventKind_Null,
|
||||||
struct DBGI_ForceStripe
|
DI_EventKind_ConversionStarted,
|
||||||
{
|
DI_EventKind_ConversionEnded,
|
||||||
Arena *arena;
|
DI_EventKind_ConversionFailureUnsupportedFormat,
|
||||||
OS_Handle rw_mutex;
|
DI_EventKind_COUNT
|
||||||
OS_Handle cv;
|
}
|
||||||
};
|
DI_EventKind;
|
||||||
|
|
||||||
////////////////////////////////
|
typedef struct DI_Event DI_Event;
|
||||||
//~ rjf: Binary Cache State Types
|
struct DI_Event
|
||||||
|
{
|
||||||
typedef U32 DBGI_BinaryFlags;
|
DI_EventKind kind;
|
||||||
enum
|
String8 string;
|
||||||
{
|
};
|
||||||
DBGI_BinaryFlag_ParseInFlight = (1<<0),
|
|
||||||
};
|
typedef struct DI_EventNode DI_EventNode;
|
||||||
|
struct DI_EventNode
|
||||||
typedef struct DBGI_Binary DBGI_Binary;
|
{
|
||||||
struct DBGI_Binary
|
DI_EventNode *next;
|
||||||
{
|
DI_Event v;
|
||||||
// rjf: links & metadata
|
};
|
||||||
DBGI_Binary *next;
|
|
||||||
String8 exe_path;
|
typedef struct DI_EventList DI_EventList;
|
||||||
U64 refcount;
|
struct DI_EventList
|
||||||
U64 scope_touch_count;
|
{
|
||||||
U64 last_time_enqueued_for_parse_us;
|
DI_EventNode *first;
|
||||||
DBGI_BinaryFlags flags;
|
DI_EventNode *last;
|
||||||
U64 gen;
|
U64 count;
|
||||||
|
};
|
||||||
// rjf: exe handles
|
|
||||||
OS_Handle exe_file;
|
////////////////////////////////
|
||||||
OS_Handle exe_file_map;
|
//~ rjf: Cache Types
|
||||||
|
|
||||||
// rjf: debug handles
|
typedef struct DI_StringChunkNode DI_StringChunkNode;
|
||||||
OS_Handle dbg_file;
|
struct DI_StringChunkNode
|
||||||
OS_Handle dbg_file_map;
|
{
|
||||||
|
DI_StringChunkNode *next;
|
||||||
// rjf: analysis results
|
U64 size;
|
||||||
DBGI_Parse parse;
|
};
|
||||||
};
|
|
||||||
|
typedef struct DI_Node DI_Node;
|
||||||
typedef struct DBGI_BinarySlot DBGI_BinarySlot;
|
struct DI_Node
|
||||||
struct DBGI_BinarySlot
|
{
|
||||||
{
|
// rjf: links
|
||||||
DBGI_Binary *first;
|
DI_Node *next;
|
||||||
DBGI_Binary *last;
|
DI_Node *prev;
|
||||||
};
|
|
||||||
|
// rjf: metadata
|
||||||
typedef struct DBGI_BinaryStripe DBGI_BinaryStripe;
|
U64 ref_count;
|
||||||
struct DBGI_BinaryStripe
|
U64 touch_count;
|
||||||
{
|
U64 is_working;
|
||||||
Arena *arena;
|
U64 last_time_requested_us;
|
||||||
OS_Handle rw_mutex;
|
|
||||||
OS_Handle cv;
|
// rjf: key
|
||||||
};
|
DI_Key key;
|
||||||
|
|
||||||
////////////////////////////////
|
// rjf: file handles
|
||||||
//~ rjf: Fuzzy Search Cache Types
|
OS_Handle file;
|
||||||
|
OS_Handle file_map;
|
||||||
typedef enum DBGI_FuzzySearchTarget
|
void *file_base;
|
||||||
{
|
FileProperties file_props;
|
||||||
DBGI_FuzzySearchTarget_Procedures,
|
|
||||||
DBGI_FuzzySearchTarget_GlobalVariables,
|
// rjf: parse artifacts
|
||||||
DBGI_FuzzySearchTarget_ThreadVariables,
|
Arena *arena;
|
||||||
DBGI_FuzzySearchTarget_UDTs,
|
RDI_Parsed rdi;
|
||||||
DBGI_FuzzySearchTarget_COUNT
|
B32 parse_done;
|
||||||
}
|
};
|
||||||
DBGI_FuzzySearchTarget;
|
|
||||||
|
typedef struct DI_Slot DI_Slot;
|
||||||
typedef struct DBGI_FuzzySearchItem DBGI_FuzzySearchItem;
|
struct DI_Slot
|
||||||
struct DBGI_FuzzySearchItem
|
{
|
||||||
{
|
DI_Node *first;
|
||||||
U64 idx;
|
DI_Node *last;
|
||||||
U64 missed_size;
|
};
|
||||||
FuzzyMatchRangeList match_ranges;
|
|
||||||
};
|
typedef struct DI_Stripe DI_Stripe;
|
||||||
|
struct DI_Stripe
|
||||||
typedef struct DBGI_FuzzySearchItemChunk DBGI_FuzzySearchItemChunk;
|
{
|
||||||
struct DBGI_FuzzySearchItemChunk
|
Arena *arena;
|
||||||
{
|
DI_Node *free_node;
|
||||||
DBGI_FuzzySearchItemChunk *next;
|
DI_StringChunkNode *free_string_chunks[8];
|
||||||
DBGI_FuzzySearchItem *v;
|
OS_Handle rw_mutex;
|
||||||
U64 count;
|
OS_Handle cv;
|
||||||
U64 cap;
|
};
|
||||||
};
|
|
||||||
|
////////////////////////////////
|
||||||
typedef struct DBGI_FuzzySearchItemChunkList DBGI_FuzzySearchItemChunkList;
|
//~ rjf: Scoped Access Types
|
||||||
struct DBGI_FuzzySearchItemChunkList
|
|
||||||
{
|
typedef struct DI_Touch DI_Touch;
|
||||||
DBGI_FuzzySearchItemChunk *first;
|
struct DI_Touch
|
||||||
DBGI_FuzzySearchItemChunk *last;
|
{
|
||||||
U64 chunk_count;
|
DI_Touch *next;
|
||||||
U64 total_count;
|
DI_Node *node;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DBGI_FuzzySearchItemArray DBGI_FuzzySearchItemArray;
|
typedef struct DI_Scope DI_Scope;
|
||||||
struct DBGI_FuzzySearchItemArray
|
struct DI_Scope
|
||||||
{
|
{
|
||||||
DBGI_FuzzySearchItem *v;
|
DI_Scope *next;
|
||||||
U64 count;
|
DI_Touch *first_touch;
|
||||||
};
|
DI_Touch *last_touch;
|
||||||
|
};
|
||||||
typedef struct DBGI_FuzzySearchBucket DBGI_FuzzySearchBucket;
|
|
||||||
struct DBGI_FuzzySearchBucket
|
typedef struct DI_TCTX DI_TCTX;
|
||||||
{
|
struct DI_TCTX
|
||||||
Arena *arena;
|
{
|
||||||
String8 exe_path;
|
Arena *arena;
|
||||||
String8 query;
|
DI_Scope *free_scope;
|
||||||
DBGI_FuzzySearchTarget target;
|
DI_Touch *free_touch;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DBGI_FuzzySearchNode DBGI_FuzzySearchNode;
|
////////////////////////////////
|
||||||
struct DBGI_FuzzySearchNode
|
//~ rjf: Shared State Types
|
||||||
{
|
|
||||||
DBGI_FuzzySearchNode *next;
|
typedef struct DI_Shared DI_Shared;
|
||||||
U128 key;
|
struct DI_Shared
|
||||||
U64 scope_touch_count;
|
{
|
||||||
U64 last_time_submitted_us;
|
Arena *arena;
|
||||||
DBGI_FuzzySearchBucket buckets[3];
|
|
||||||
U64 gen;
|
// rjf: node cache
|
||||||
U64 submit_gen;
|
U64 slots_count;
|
||||||
DBGI_FuzzySearchItemArray gen_items;
|
DI_Slot *slots;
|
||||||
};
|
U64 stripes_count;
|
||||||
|
DI_Stripe *stripes;
|
||||||
typedef struct DBGI_FuzzySearchSlot DBGI_FuzzySearchSlot;
|
|
||||||
struct DBGI_FuzzySearchSlot
|
// rjf: user -> parse ring
|
||||||
{
|
OS_Handle u2p_ring_mutex;
|
||||||
DBGI_FuzzySearchNode *first;
|
OS_Handle u2p_ring_cv;
|
||||||
DBGI_FuzzySearchNode *last;
|
U64 u2p_ring_size;
|
||||||
};
|
U8 *u2p_ring_base;
|
||||||
|
U64 u2p_ring_write_pos;
|
||||||
typedef struct DBGI_FuzzySearchStripe DBGI_FuzzySearchStripe;
|
U64 u2p_ring_read_pos;
|
||||||
struct DBGI_FuzzySearchStripe
|
|
||||||
{
|
// rjf: parse -> user event ring
|
||||||
Arena *arena;
|
OS_Handle p2u_ring_mutex;
|
||||||
OS_Handle rw_mutex;
|
OS_Handle p2u_ring_cv;
|
||||||
OS_Handle cv;
|
U64 p2u_ring_size;
|
||||||
};
|
U8 *p2u_ring_base;
|
||||||
|
U64 p2u_ring_write_pos;
|
||||||
typedef struct DBGI_FuzzySearchThread DBGI_FuzzySearchThread;
|
U64 p2u_ring_read_pos;
|
||||||
struct DBGI_FuzzySearchThread
|
|
||||||
{
|
// rjf: threads
|
||||||
OS_Handle thread;
|
U64 parse_thread_count;
|
||||||
OS_Handle u2f_ring_mutex;
|
OS_Handle *parse_threads;
|
||||||
OS_Handle u2f_ring_cv;
|
};
|
||||||
U64 u2f_ring_size;
|
|
||||||
U8 *u2f_ring_base;
|
////////////////////////////////
|
||||||
U64 u2f_ring_write_pos;
|
//~ rjf: Globals
|
||||||
U64 u2f_ring_read_pos;
|
|
||||||
};
|
global DI_Shared *di_shared = 0;
|
||||||
|
thread_static DI_TCTX *di_tctx = 0;
|
||||||
////////////////////////////////
|
global RDI_Parsed di_rdi_parsed_nil = {0};
|
||||||
//~ rjf: Weak Access Scope Types
|
|
||||||
|
////////////////////////////////
|
||||||
typedef struct DBGI_TouchedBinary DBGI_TouchedBinary;
|
//~ rjf: Basic Helpers
|
||||||
struct DBGI_TouchedBinary
|
|
||||||
{
|
internal U64 di_hash_from_string(String8 string, StringMatchFlags match_flags);
|
||||||
DBGI_TouchedBinary *next;
|
internal U64 di_hash_from_key(DI_Key *k);
|
||||||
DBGI_Binary *binary;
|
internal DI_Key di_key_zero(void);
|
||||||
};
|
internal B32 di_key_match(DI_Key *a, DI_Key *b);
|
||||||
|
internal DI_Key di_key_copy(Arena *arena, DI_Key *src);
|
||||||
typedef struct DBGI_TouchedFuzzySearch DBGI_TouchedFuzzySearch;
|
internal DI_Key di_normalized_key_from_key(Arena *arena, DI_Key *src);
|
||||||
struct DBGI_TouchedFuzzySearch
|
internal void di_key_list_push(Arena *arena, DI_KeyList *list, DI_Key *key);
|
||||||
{
|
internal DI_KeyArray di_key_array_from_list(Arena *arena, DI_KeyList *list);
|
||||||
DBGI_TouchedFuzzySearch *next;
|
|
||||||
DBGI_FuzzySearchNode *node;
|
////////////////////////////////
|
||||||
};
|
//~ rjf: Main Layer Initialization
|
||||||
|
|
||||||
typedef struct DBGI_Scope DBGI_Scope;
|
internal void di_init(void);
|
||||||
struct DBGI_Scope
|
|
||||||
{
|
////////////////////////////////
|
||||||
DBGI_Scope *next;
|
//~ rjf: Scope Functions
|
||||||
DBGI_TouchedBinary *first_tb;
|
|
||||||
DBGI_TouchedBinary *last_tb;
|
internal DI_Scope *di_scope_open(void);
|
||||||
DBGI_TouchedFuzzySearch *first_tfs;
|
internal void di_scope_close(DI_Scope *scope);
|
||||||
DBGI_TouchedFuzzySearch *last_tfs;
|
internal void di_scope_touch_node__stripe_mutex_r_guarded(DI_Scope *scope, DI_Node *node);
|
||||||
};
|
|
||||||
|
////////////////////////////////
|
||||||
typedef struct DBGI_ThreadCtx DBGI_ThreadCtx;
|
//~ rjf: Per-Slot Functions
|
||||||
struct DBGI_ThreadCtx
|
|
||||||
{
|
internal DI_Node *di_node_from_key_slot__stripe_mutex_r_guarded(DI_Slot *slot, DI_Key *key);
|
||||||
Arena *arena;
|
|
||||||
DBGI_Scope *free_scope;
|
////////////////////////////////
|
||||||
DBGI_TouchedBinary *free_tb;
|
//~ rjf: Per-Stripe Functions
|
||||||
DBGI_TouchedFuzzySearch *free_tfs;
|
|
||||||
};
|
internal U64 di_string_bucket_idx_from_string_size(U64 size);
|
||||||
|
internal String8 di_string_alloc__stripe_mutex_w_guarded(DI_Stripe *stripe, String8 string);
|
||||||
////////////////////////////////
|
internal void di_string_release__stripe_mutex_w_guarded(DI_Stripe *stripe, String8 string);
|
||||||
//~ rjf: Event Types
|
|
||||||
|
////////////////////////////////
|
||||||
typedef enum DBGI_EventKind
|
//~ rjf: Key Opening/Closing
|
||||||
{
|
|
||||||
DBGI_EventKind_Null,
|
internal void di_open(DI_Key *key);
|
||||||
DBGI_EventKind_ConversionStarted,
|
internal void di_close(DI_Key *key);
|
||||||
DBGI_EventKind_ConversionEnded,
|
|
||||||
DBGI_EventKind_ConversionFailureUnsupportedFormat,
|
////////////////////////////////
|
||||||
DBGI_EventKind_COUNT
|
//~ rjf: Cache Lookups
|
||||||
}
|
|
||||||
DBGI_EventKind;
|
internal RDI_Parsed *di_rdi_from_key(DI_Scope *scope, DI_Key *key, U64 endt_us);
|
||||||
|
|
||||||
typedef struct DBGI_Event DBGI_Event;
|
////////////////////////////////
|
||||||
struct DBGI_Event
|
//~ rjf: Parse Threads
|
||||||
{
|
|
||||||
DBGI_EventKind kind;
|
internal B32 di_u2p_enqueue_key(DI_Key *key, U64 endt_us);
|
||||||
String8 string;
|
internal void di_u2p_dequeue_key(Arena *arena, DI_Key *out_key);
|
||||||
};
|
|
||||||
|
internal void di_p2u_push_event(DI_Event *event);
|
||||||
typedef struct DBGI_EventNode DBGI_EventNode;
|
internal DI_EventList di_p2u_pop_events(Arena *arena, U64 endt_us);
|
||||||
struct DBGI_EventNode
|
|
||||||
{
|
internal void di_parse_thread__entry_point(void *p);
|
||||||
DBGI_EventNode *next;
|
|
||||||
DBGI_Event v;
|
#endif // DBGI_H
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DBGI_EventList DBGI_EventList;
|
|
||||||
struct DBGI_EventList
|
|
||||||
{
|
|
||||||
DBGI_EventNode *first;
|
|
||||||
DBGI_EventNode *last;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Cross-Thread Shared State
|
|
||||||
|
|
||||||
typedef struct DBGI_Shared DBGI_Shared;
|
|
||||||
struct DBGI_Shared
|
|
||||||
{
|
|
||||||
// rjf: arena
|
|
||||||
Arena *arena;
|
|
||||||
|
|
||||||
// rjf: forced override table
|
|
||||||
U64 force_slots_count;
|
|
||||||
U64 force_stripes_count;
|
|
||||||
DBGI_ForceSlot *force_slots;
|
|
||||||
DBGI_ForceStripe *force_stripes;
|
|
||||||
|
|
||||||
// rjf: binary table
|
|
||||||
U64 binary_slots_count;
|
|
||||||
U64 binary_stripes_count;
|
|
||||||
DBGI_BinarySlot *binary_slots;
|
|
||||||
DBGI_BinaryStripe *binary_stripes;
|
|
||||||
|
|
||||||
// rjf: fuzzy search cache table
|
|
||||||
U64 fuzzy_search_slots_count;
|
|
||||||
U64 fuzzy_search_stripes_count;
|
|
||||||
DBGI_FuzzySearchSlot *fuzzy_search_slots;
|
|
||||||
DBGI_FuzzySearchStripe *fuzzy_search_stripes;
|
|
||||||
|
|
||||||
// rjf: user -> parse ring
|
|
||||||
OS_Handle u2p_ring_mutex;
|
|
||||||
OS_Handle u2p_ring_cv;
|
|
||||||
U64 u2p_ring_size;
|
|
||||||
U8 *u2p_ring_base;
|
|
||||||
U64 u2p_ring_write_pos;
|
|
||||||
U64 u2p_ring_read_pos;
|
|
||||||
|
|
||||||
// rjf: parse -> user event ring
|
|
||||||
OS_Handle p2u_ring_mutex;
|
|
||||||
OS_Handle p2u_ring_cv;
|
|
||||||
U64 p2u_ring_size;
|
|
||||||
U8 *p2u_ring_base;
|
|
||||||
U64 p2u_ring_write_pos;
|
|
||||||
U64 p2u_ring_read_pos;
|
|
||||||
|
|
||||||
// rjf: threads
|
|
||||||
U64 parse_thread_count;
|
|
||||||
OS_Handle *parse_threads;
|
|
||||||
U64 fuzzy_thread_count;
|
|
||||||
DBGI_FuzzySearchThread *fuzzy_threads;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Globals
|
|
||||||
|
|
||||||
global DBGI_Shared *dbgi_shared = 0;
|
|
||||||
thread_static DBGI_ThreadCtx *dbgi_tctx = 0;
|
|
||||||
global DBGI_Parse dbgi_parse_nil =
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
{0},
|
|
||||||
{0},
|
|
||||||
0,
|
|
||||||
{0},
|
|
||||||
{0},
|
|
||||||
{
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
{0},
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
&rdi_binary_section_nil, 1,
|
|
||||||
&rdi_file_path_node_nil, 1,
|
|
||||||
&rdi_source_file_nil, 1,
|
|
||||||
&rdi_unit_nil, 1,
|
|
||||||
&rdi_vmap_entry_nil, 1,
|
|
||||||
&rdi_type_node_nil, 1,
|
|
||||||
&rdi_udt_nil, 1,
|
|
||||||
&rdi_member_nil, 1,
|
|
||||||
&rdi_enum_member_nil, 1,
|
|
||||||
&rdi_global_variable_nil, 1,
|
|
||||||
&rdi_vmap_entry_nil, 1,
|
|
||||||
&rdi_thread_variable_nil, 1,
|
|
||||||
&rdi_procedure_nil, 1,
|
|
||||||
&rdi_scope_nil, 1,
|
|
||||||
&rdi_voff_nil, 1,
|
|
||||||
&rdi_vmap_entry_nil, 1,
|
|
||||||
&rdi_local_nil, 1,
|
|
||||||
&rdi_location_block_nil, 1,
|
|
||||||
0, 0,
|
|
||||||
0, 0,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Main Layer Initialization
|
|
||||||
|
|
||||||
internal void dbgi_init(void);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Thread-Context Idempotent Initialization
|
|
||||||
|
|
||||||
internal void dbgi_ensure_tctx_inited(void);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Helpers
|
|
||||||
|
|
||||||
internal U64 dbgi_hash_from_string(String8 string, StringMatchFlags match_flags);
|
|
||||||
internal U64 dbgi_fuzzy_item_num_from_array_element_idx__linear_search(DBGI_FuzzySearchItemArray *array, U64 element_idx);
|
|
||||||
internal String8 dbgi_fuzzy_item_string_from_rdi_target_element_idx(RDI_Parsed *rdi, DBGI_FuzzySearchTarget target, U64 element_idx);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Forced Override Cache Functions
|
|
||||||
|
|
||||||
internal void dbgi_force_exe_path_dbg_path(String8 exe_path, String8 dbg_path);
|
|
||||||
internal String8 dbgi_forced_dbg_path_from_exe_path(Arena *arena, String8 exe_path);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Scope Functions
|
|
||||||
|
|
||||||
internal DBGI_Scope *dbgi_scope_open(void);
|
|
||||||
internal void dbgi_scope_close(DBGI_Scope *scope);
|
|
||||||
internal void dbgi_scope_touch_binary__stripe_mutex_r_guarded(DBGI_Scope *scope, DBGI_Binary *binary);
|
|
||||||
internal void dbgi_scope_touch_fuzzy_search__stripe_mutex_r_guarded(DBGI_Scope *scope, DBGI_FuzzySearchNode *node);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Binary Cache Functions
|
|
||||||
|
|
||||||
internal void dbgi_binary_open(String8 exe_path);
|
|
||||||
internal void dbgi_binary_close(String8 exe_path);
|
|
||||||
internal DBGI_Parse *dbgi_parse_from_exe_path(DBGI_Scope *scope, String8 exe_path, U64 endt_us);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Fuzzy Search Cache Functions
|
|
||||||
|
|
||||||
internal DBGI_FuzzySearchItemArray dbgi_fuzzy_search_items_from_key_exe_query(DBGI_Scope *scope, U128 key, String8 exe_path, String8 query, DBGI_FuzzySearchTarget target, U64 endt_us, B32 *stale_out);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Parse Threads
|
|
||||||
|
|
||||||
internal B32 dbgi_u2p_enqueue_exe_path(String8 exe_path, U64 endt_us);
|
|
||||||
internal String8 dbgi_u2p_dequeue_exe_path(Arena *arena);
|
|
||||||
|
|
||||||
internal void dbgi_p2u_push_event(DBGI_Event *event);
|
|
||||||
internal DBGI_EventList dbgi_p2u_pop_events(Arena *arena, U64 endt_us);
|
|
||||||
|
|
||||||
internal void dbgi_parse_thread_entry_point(void *p);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Fuzzy Searching Threads
|
|
||||||
|
|
||||||
internal B32 dbgi_u2f_enqueue_req(U128 key, U64 endt_us);
|
|
||||||
internal void dbgi_u2f_dequeue_req(Arena *arena, DBGI_FuzzySearchThread *thread, U128 *key_out);
|
|
||||||
|
|
||||||
internal int dbgi_qsort_compare_fuzzy_search_items(DBGI_FuzzySearchItem *a, DBGI_FuzzySearchItem *b);
|
|
||||||
|
|
||||||
internal void dbgi_fuzzy_thread__entry_point(void *p);
|
|
||||||
|
|
||||||
#endif //DBGI_H
|
|
||||||
|
|||||||
+188
-153
@@ -1,153 +1,188 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Basic Type Functions (Helpers, Implemented Once)
|
//~ rjf: Generated Code
|
||||||
|
|
||||||
//- rjf: handles
|
#include "generated/demon.meta.c"
|
||||||
|
|
||||||
internal DMN_Handle
|
////////////////////////////////
|
||||||
dmn_handle_zero(void)
|
//~ rjf: Basic Type Functions (Helpers, Implemented Once)
|
||||||
{
|
|
||||||
DMN_Handle h = {0};
|
//- rjf: handles
|
||||||
return h;
|
|
||||||
}
|
internal DMN_Handle
|
||||||
|
dmn_handle_zero(void)
|
||||||
internal B32
|
{
|
||||||
dmn_handle_match(DMN_Handle a, DMN_Handle b)
|
DMN_Handle h = {0};
|
||||||
{
|
return h;
|
||||||
return a.u32[0] == b.u32[0] && a.u32[1] == b.u32[1];
|
}
|
||||||
}
|
|
||||||
|
internal B32
|
||||||
//- rjf: trap chunk lists
|
dmn_handle_match(DMN_Handle a, DMN_Handle b)
|
||||||
|
{
|
||||||
internal void
|
return a.u32[0] == b.u32[0] && a.u32[1] == b.u32[1];
|
||||||
dmn_trap_chunk_list_push(Arena *arena, DMN_TrapChunkList *list, U64 cap, DMN_Trap *trap)
|
}
|
||||||
{
|
|
||||||
DMN_TrapChunkNode *node = list->last;
|
//- rjf: trap chunk lists
|
||||||
if(node == 0 || node->count >= node->cap)
|
|
||||||
{
|
internal void
|
||||||
node = push_array(arena, DMN_TrapChunkNode, 1);
|
dmn_trap_chunk_list_push(Arena *arena, DMN_TrapChunkList *list, U64 cap, DMN_Trap *trap)
|
||||||
node->cap = cap;
|
{
|
||||||
node->v = push_array_no_zero(arena, DMN_Trap, node->cap);
|
DMN_TrapChunkNode *node = list->last;
|
||||||
SLLQueuePush(list->first, list->last, node);
|
if(node == 0 || node->count >= node->cap)
|
||||||
list->node_count += 1;
|
{
|
||||||
}
|
node = push_array(arena, DMN_TrapChunkNode, 1);
|
||||||
MemoryCopyStruct(&node->v[node->count], trap);
|
node->cap = cap;
|
||||||
node->count += 1;
|
node->v = push_array_no_zero(arena, DMN_Trap, node->cap);
|
||||||
list->trap_count += 1;
|
SLLQueuePush(list->first, list->last, node);
|
||||||
}
|
list->node_count += 1;
|
||||||
|
}
|
||||||
internal void
|
MemoryCopyStruct(&node->v[node->count], trap);
|
||||||
dmn_trap_chunk_list_concat_in_place(DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push)
|
node->count += 1;
|
||||||
{
|
list->trap_count += 1;
|
||||||
if(dst->last == 0)
|
}
|
||||||
{
|
|
||||||
MemoryCopyStruct(dst, to_push);
|
internal void
|
||||||
}
|
dmn_trap_chunk_list_concat_in_place(DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push)
|
||||||
else if(to_push->first != 0)
|
{
|
||||||
{
|
if(dst->last == 0)
|
||||||
dst->last->next = to_push->first;
|
{
|
||||||
dst->last = to_push->last;
|
MemoryCopyStruct(dst, to_push);
|
||||||
dst->node_count += to_push->node_count;
|
}
|
||||||
dst->trap_count += to_push->trap_count;
|
else if(to_push->first != 0)
|
||||||
}
|
{
|
||||||
MemoryZeroStruct(to_push);
|
dst->last->next = to_push->first;
|
||||||
}
|
dst->last = to_push->last;
|
||||||
|
dst->node_count += to_push->node_count;
|
||||||
internal void
|
dst->trap_count += to_push->trap_count;
|
||||||
dmn_trap_chunk_list_concat_shallow_copy(Arena *arena, DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push)
|
}
|
||||||
{
|
MemoryZeroStruct(to_push);
|
||||||
for(DMN_TrapChunkNode *src_n = to_push->first; src_n != 0; src_n = src_n->next)
|
}
|
||||||
{
|
|
||||||
DMN_TrapChunkNode *dst_n = push_array(arena, DMN_TrapChunkNode, 1);
|
internal void
|
||||||
dst_n->v = src_n->v;
|
dmn_trap_chunk_list_concat_shallow_copy(Arena *arena, DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push)
|
||||||
dst_n->cap = src_n->cap;
|
{
|
||||||
dst_n->count = src_n->count;
|
for(DMN_TrapChunkNode *src_n = to_push->first; src_n != 0; src_n = src_n->next)
|
||||||
SLLQueuePush(dst->first, dst->last, dst_n);
|
{
|
||||||
dst->node_count += 1;
|
DMN_TrapChunkNode *dst_n = push_array(arena, DMN_TrapChunkNode, 1);
|
||||||
dst->trap_count += dst_n->count;
|
dst_n->v = src_n->v;
|
||||||
}
|
dst_n->cap = src_n->cap;
|
||||||
}
|
dst_n->count = src_n->count;
|
||||||
|
SLLQueuePush(dst->first, dst->last, dst_n);
|
||||||
//- rjf: handle lists
|
dst->node_count += 1;
|
||||||
|
dst->trap_count += dst_n->count;
|
||||||
internal void
|
}
|
||||||
dmn_handle_list_push(Arena *arena, DMN_HandleList *list, DMN_Handle handle)
|
}
|
||||||
{
|
|
||||||
DMN_HandleNode *node = push_array(arena, DMN_HandleNode, 1);
|
//- rjf: handle lists
|
||||||
SLLQueuePush(list->first, list->last, node);
|
|
||||||
node->v = handle;
|
internal void
|
||||||
list->count += 1;
|
dmn_handle_list_push(Arena *arena, DMN_HandleList *list, DMN_Handle handle)
|
||||||
}
|
{
|
||||||
|
DMN_HandleNode *node = push_array(arena, DMN_HandleNode, 1);
|
||||||
internal DMN_HandleArray
|
SLLQueuePush(list->first, list->last, node);
|
||||||
dmn_handle_array_from_list(Arena *arena, DMN_HandleList *list)
|
node->v = handle;
|
||||||
{
|
list->count += 1;
|
||||||
DMN_HandleArray array = {0};
|
}
|
||||||
array.count = list->count;
|
|
||||||
array.handles = push_array_no_zero(arena, DMN_Handle, array.count);
|
internal DMN_HandleArray
|
||||||
U64 idx = 0;
|
dmn_handle_array_from_list(Arena *arena, DMN_HandleList *list)
|
||||||
for(DMN_HandleNode *n = list->first; n != 0; n = n->next, idx += 1)
|
{
|
||||||
{
|
DMN_HandleArray array = {0};
|
||||||
array.handles[idx] = n->v;
|
array.count = list->count;
|
||||||
}
|
array.handles = push_array_no_zero(arena, DMN_Handle, array.count);
|
||||||
return array;
|
U64 idx = 0;
|
||||||
}
|
for(DMN_HandleNode *n = list->first; n != 0; n = n->next, idx += 1)
|
||||||
|
{
|
||||||
internal DMN_HandleArray
|
array.handles[idx] = n->v;
|
||||||
dmn_handle_array_copy(Arena *arena, DMN_HandleArray *src)
|
}
|
||||||
{
|
return array;
|
||||||
DMN_HandleArray dst = {0};
|
}
|
||||||
dst.count = src->count;
|
|
||||||
dst.handles = push_array_no_zero(arena, DMN_Handle, dst.count);
|
internal DMN_HandleArray
|
||||||
MemoryCopy(dst.handles, src->handles, sizeof(DMN_Handle)*dst.count);
|
dmn_handle_array_copy(Arena *arena, DMN_HandleArray *src)
|
||||||
return dst;
|
{
|
||||||
}
|
DMN_HandleArray dst = {0};
|
||||||
|
dst.count = src->count;
|
||||||
//- rjf: event list building
|
dst.handles = push_array_no_zero(arena, DMN_Handle, dst.count);
|
||||||
|
MemoryCopy(dst.handles, src->handles, sizeof(DMN_Handle)*dst.count);
|
||||||
internal DMN_Event *
|
return dst;
|
||||||
dmn_event_list_push(Arena *arena, DMN_EventList *list)
|
}
|
||||||
{
|
|
||||||
DMN_EventNode *n = push_array(arena, DMN_EventNode, 1);
|
//- rjf: event list building
|
||||||
SLLQueuePush(list->first, list->last, n);
|
|
||||||
list->count += 1;
|
internal DMN_Event *
|
||||||
DMN_Event *result = &n->v;
|
dmn_event_list_push(Arena *arena, DMN_EventList *list)
|
||||||
return result;
|
{
|
||||||
}
|
DMN_EventNode *n = push_array(arena, DMN_EventNode, 1);
|
||||||
|
SLLQueuePush(list->first, list->last, n);
|
||||||
////////////////////////////////
|
list->count += 1;
|
||||||
//~ rjf: Thread Reading Helper Functions (Helpers, Implemented Once)
|
DMN_Event *result = &n->v;
|
||||||
|
return result;
|
||||||
internal U64
|
}
|
||||||
dmn_rip_from_thread(DMN_Handle thread)
|
|
||||||
{
|
////////////////////////////////
|
||||||
U64 result = 0;
|
//~ rjf: Thread Reading Helper Functions (Helpers, Implemented Once)
|
||||||
Temp scratch = scratch_begin(0, 0);
|
|
||||||
{
|
internal U64
|
||||||
Architecture arch = dmn_arch_from_thread(thread);
|
dmn_rip_from_thread(DMN_Handle thread)
|
||||||
U64 reg_block_size = regs_block_size_from_architecture(arch);
|
{
|
||||||
void *reg_block = push_array(scratch.arena, U8, reg_block_size);
|
U64 result = 0;
|
||||||
dmn_thread_read_reg_block(thread, reg_block);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
result = regs_rip_from_arch_block(arch, reg_block);
|
{
|
||||||
}
|
Arch arch = dmn_arch_from_thread(thread);
|
||||||
scratch_end(scratch);
|
U64 reg_block_size = regs_block_size_from_arch(arch);
|
||||||
return result;
|
void *reg_block = push_array(scratch.arena, U8, reg_block_size);
|
||||||
}
|
dmn_thread_read_reg_block(thread, reg_block);
|
||||||
|
result = regs_rip_from_arch_block(arch, reg_block);
|
||||||
internal U64
|
}
|
||||||
dmn_rsp_from_thread(DMN_Handle thread)
|
scratch_end(scratch);
|
||||||
{
|
return result;
|
||||||
U64 result = 0;
|
}
|
||||||
Temp scratch = scratch_begin(0, 0);
|
|
||||||
{
|
internal U64
|
||||||
Architecture arch = dmn_arch_from_thread(thread);
|
dmn_rsp_from_thread(DMN_Handle thread)
|
||||||
U64 reg_block_size = regs_block_size_from_architecture(arch);
|
{
|
||||||
void *reg_block = push_array(scratch.arena, U8, reg_block_size);
|
U64 result = 0;
|
||||||
dmn_thread_read_reg_block(thread, reg_block);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
result = regs_rsp_from_arch_block(arch, reg_block);
|
{
|
||||||
}
|
Arch arch = dmn_arch_from_thread(thread);
|
||||||
scratch_end(scratch);
|
U64 reg_block_size = regs_block_size_from_arch(arch);
|
||||||
return result;
|
void *reg_block = push_array(scratch.arena, U8, reg_block_size);
|
||||||
}
|
dmn_thread_read_reg_block(thread, reg_block);
|
||||||
|
result = regs_rsp_from_arch_block(arch, reg_block);
|
||||||
|
}
|
||||||
|
scratch_end(scratch);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ Memory Helpers
|
||||||
|
|
||||||
|
internal String8
|
||||||
|
dmn_process_read_cstring(Arena *arena, DMN_Handle process, U64 addr)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
|
||||||
|
String8List block_list = {0};
|
||||||
|
|
||||||
|
for(U64 cursor = addr, stride = 256; ; cursor += stride)
|
||||||
|
{
|
||||||
|
U8 *raw_block = push_array_no_zero(scratch.arena, U8, stride);
|
||||||
|
U64 read_size = dmn_process_read(process, r1u64(cursor, cursor + stride), raw_block);
|
||||||
|
String8 block = str8_cstring_capped(raw_block, raw_block + read_size);
|
||||||
|
|
||||||
|
str8_list_push(scratch.arena, &block_list, block);
|
||||||
|
|
||||||
|
if(read_size != stride || (block.size+1 <= read_size && block.str[block.size] == 0))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String8 result = str8_list_join(arena, &block_list, 0);
|
||||||
|
|
||||||
|
scratch_end(scratch);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|||||||
+243
-237
@@ -1,237 +1,243 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DEMON_CORE_H
|
#ifndef DEMON_CORE_H
|
||||||
#define DEMON_CORE_H
|
#define DEMON_CORE_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Control-Thread-Only Context
|
//~ rjf: Control-Thread-Only Context
|
||||||
//
|
//
|
||||||
// An instance of this struct must ONLY be returned by dmn_ctrl_begin, and only
|
// An instance of this struct must ONLY be returned by dmn_ctrl_begin, and only
|
||||||
// used by the thread which called it. All APIs which can ONLY run on the
|
// used by the thread which called it. All APIs which can ONLY run on the
|
||||||
// control thread, which blocks to control & receive events, will take this
|
// control thread, which blocks to control & receive events, will take this
|
||||||
// parameter. All other APIs can be called from any thread.
|
// parameter. All other APIs can be called from any thread.
|
||||||
|
|
||||||
typedef struct DMN_CtrlCtx DMN_CtrlCtx;
|
typedef struct DMN_CtrlCtx DMN_CtrlCtx;
|
||||||
struct DMN_CtrlCtx
|
struct DMN_CtrlCtx
|
||||||
{
|
{
|
||||||
U64 u64 [1];
|
U64 u64[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Handle Types
|
//~ rjf: Handle Types
|
||||||
|
|
||||||
typedef union DMN_Handle DMN_Handle;
|
typedef union DMN_Handle DMN_Handle;
|
||||||
union DMN_Handle
|
union DMN_Handle
|
||||||
{
|
{
|
||||||
U32 u32[2];
|
U32 u32[2];
|
||||||
U64 u64[1];
|
U64 u64[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_HandleNode DMN_HandleNode;
|
typedef struct DMN_HandleNode DMN_HandleNode;
|
||||||
struct DMN_HandleNode
|
struct DMN_HandleNode
|
||||||
{
|
{
|
||||||
DMN_HandleNode *next;
|
DMN_HandleNode *next;
|
||||||
DMN_Handle v;
|
DMN_Handle v;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_HandleList DMN_HandleList;
|
typedef struct DMN_HandleList DMN_HandleList;
|
||||||
struct DMN_HandleList
|
struct DMN_HandleList
|
||||||
{
|
{
|
||||||
DMN_HandleNode *first;
|
DMN_HandleNode *first;
|
||||||
DMN_HandleNode *last;
|
DMN_HandleNode *last;
|
||||||
U64 count;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_HandleArray DMN_HandleArray;
|
typedef struct DMN_HandleArray DMN_HandleArray;
|
||||||
struct DMN_HandleArray
|
struct DMN_HandleArray
|
||||||
{
|
{
|
||||||
DMN_Handle *handles;
|
DMN_Handle *handles;
|
||||||
U64 count;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Generated Code
|
//~ rjf: Generated Code
|
||||||
|
|
||||||
#include "generated/demon.meta.h"
|
#include "generated/demon.meta.h"
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Event Types
|
//~ rjf: Event Types
|
||||||
|
|
||||||
typedef struct DMN_Event DMN_Event;
|
typedef struct DMN_Event DMN_Event;
|
||||||
struct DMN_Event
|
struct DMN_Event
|
||||||
{
|
{
|
||||||
DMN_EventKind kind;
|
DMN_EventKind kind;
|
||||||
DMN_ErrorKind error_kind;
|
DMN_ErrorKind error_kind;
|
||||||
DMN_MemoryEventKind memory_kind;
|
DMN_MemoryEventKind memory_kind;
|
||||||
DMN_ExceptionKind exception_kind;
|
DMN_ExceptionKind exception_kind;
|
||||||
DMN_Handle process;
|
DMN_Handle process;
|
||||||
DMN_Handle thread;
|
DMN_Handle thread;
|
||||||
DMN_Handle module;
|
DMN_Handle module;
|
||||||
Architecture arch;
|
Arch arch;
|
||||||
U64 address;
|
U64 address;
|
||||||
U64 size;
|
U64 size;
|
||||||
String8 string;
|
String8 string;
|
||||||
U32 code; // code gives pid & tid on CreateProcess and CreateThread (respectfully)
|
U32 code; // code gives pid & tid on CreateProcess and CreateThread (respectfully)
|
||||||
U32 flags;
|
U32 flags;
|
||||||
S32 signo;
|
S32 signo;
|
||||||
S32 sigcode;
|
S32 sigcode;
|
||||||
U64 instruction_pointer;
|
U64 instruction_pointer;
|
||||||
U64 stack_pointer;
|
U64 stack_pointer;
|
||||||
U64 user_data;
|
U64 user_data;
|
||||||
B32 exception_repeated;
|
B32 exception_repeated;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_EventNode DMN_EventNode;
|
typedef struct DMN_EventNode DMN_EventNode;
|
||||||
struct DMN_EventNode
|
struct DMN_EventNode
|
||||||
{
|
{
|
||||||
DMN_EventNode *next;
|
DMN_EventNode *next;
|
||||||
DMN_Event v;
|
DMN_Event v;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_EventList DMN_EventList;
|
typedef struct DMN_EventList DMN_EventList;
|
||||||
struct DMN_EventList
|
struct DMN_EventList
|
||||||
{
|
{
|
||||||
DMN_EventNode *first;
|
DMN_EventNode *first;
|
||||||
DMN_EventNode *last;
|
DMN_EventNode *last;
|
||||||
U64 count;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Run Control Types
|
//~ rjf: Run Control Types
|
||||||
|
|
||||||
typedef struct DMN_Trap DMN_Trap;
|
typedef struct DMN_Trap DMN_Trap;
|
||||||
struct DMN_Trap
|
struct DMN_Trap
|
||||||
{
|
{
|
||||||
DMN_Handle process;
|
DMN_Handle process;
|
||||||
U64 vaddr;
|
U64 vaddr;
|
||||||
U64 id;
|
U64 id;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_TrapChunkNode DMN_TrapChunkNode;
|
typedef struct DMN_TrapChunkNode DMN_TrapChunkNode;
|
||||||
struct DMN_TrapChunkNode
|
struct DMN_TrapChunkNode
|
||||||
{
|
{
|
||||||
DMN_TrapChunkNode *next;
|
DMN_TrapChunkNode *next;
|
||||||
DMN_Trap *v;
|
DMN_Trap *v;
|
||||||
U64 cap;
|
U64 cap;
|
||||||
U64 count;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_TrapChunkList DMN_TrapChunkList;
|
typedef struct DMN_TrapChunkList DMN_TrapChunkList;
|
||||||
struct DMN_TrapChunkList
|
struct DMN_TrapChunkList
|
||||||
{
|
{
|
||||||
DMN_TrapChunkNode *first;
|
DMN_TrapChunkNode *first;
|
||||||
DMN_TrapChunkNode *last;
|
DMN_TrapChunkNode *last;
|
||||||
U64 node_count;
|
U64 node_count;
|
||||||
U64 trap_count;
|
U64 trap_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_RunCtrls DMN_RunCtrls;
|
typedef struct DMN_RunCtrls DMN_RunCtrls;
|
||||||
struct DMN_RunCtrls
|
struct DMN_RunCtrls
|
||||||
{
|
{
|
||||||
DMN_Handle single_step_thread;
|
DMN_Handle single_step_thread;
|
||||||
B8 ignore_previous_exception;
|
B8 ignore_previous_exception;
|
||||||
B8 run_entities_are_unfrozen;
|
B8 run_entities_are_unfrozen;
|
||||||
B8 run_entities_are_processes;
|
B8 run_entities_are_processes;
|
||||||
DMN_Handle *run_entities;
|
DMN_Handle *run_entities;
|
||||||
U64 run_entity_count;
|
U64 run_entity_count;
|
||||||
DMN_TrapChunkList traps;
|
DMN_TrapChunkList traps;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: System Process Listing Types
|
//~ rjf: System Process Listing Types
|
||||||
|
|
||||||
typedef struct DMN_ProcessIter DMN_ProcessIter;
|
typedef struct DMN_ProcessIter DMN_ProcessIter;
|
||||||
struct DMN_ProcessIter
|
struct DMN_ProcessIter
|
||||||
{
|
{
|
||||||
U64 v[2];
|
U64 v[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DMN_ProcessInfo DMN_ProcessInfo;
|
typedef struct DMN_ProcessInfo DMN_ProcessInfo;
|
||||||
struct DMN_ProcessInfo
|
struct DMN_ProcessInfo
|
||||||
{
|
{
|
||||||
String8 name;
|
String8 name;
|
||||||
U32 pid;
|
U32 pid;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Basic Type Functions (Helpers, Implemented Once)
|
//~ rjf: Basic Type Functions (Helpers, Implemented Once)
|
||||||
|
|
||||||
//- rjf: handles
|
//- rjf: handles
|
||||||
internal DMN_Handle dmn_handle_zero(void);
|
internal DMN_Handle dmn_handle_zero(void);
|
||||||
internal B32 dmn_handle_match(DMN_Handle a, DMN_Handle b);
|
internal B32 dmn_handle_match(DMN_Handle a, DMN_Handle b);
|
||||||
|
|
||||||
//- rjf: trap chunk lists
|
//- rjf: trap chunk lists
|
||||||
internal void dmn_trap_chunk_list_push(Arena *arena, DMN_TrapChunkList *list, U64 cap, DMN_Trap *trap);
|
internal void dmn_trap_chunk_list_push(Arena *arena, DMN_TrapChunkList *list, U64 cap, DMN_Trap *trap);
|
||||||
internal void dmn_trap_chunk_list_concat_in_place(DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push);
|
internal void dmn_trap_chunk_list_concat_in_place(DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push);
|
||||||
internal void dmn_trap_chunk_list_concat_shallow_copy(Arena *arena, DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push);
|
internal void dmn_trap_chunk_list_concat_shallow_copy(Arena *arena, DMN_TrapChunkList *dst, DMN_TrapChunkList *to_push);
|
||||||
|
|
||||||
//- rjf: handle lists
|
//- rjf: handle lists
|
||||||
internal void dmn_handle_list_push(Arena *arena, DMN_HandleList *list, DMN_Handle handle);
|
internal void dmn_handle_list_push(Arena *arena, DMN_HandleList *list, DMN_Handle handle);
|
||||||
internal DMN_HandleArray dmn_handle_array_from_list(Arena *arena, DMN_HandleList *list);
|
internal DMN_HandleArray dmn_handle_array_from_list(Arena *arena, DMN_HandleList *list);
|
||||||
internal DMN_HandleArray dmn_handle_array_copy(Arena *arena, DMN_HandleArray *src);
|
internal DMN_HandleArray dmn_handle_array_copy(Arena *arena, DMN_HandleArray *src);
|
||||||
|
|
||||||
//- rjf: event list building
|
//- rjf: event list building
|
||||||
internal DMN_Event *dmn_event_list_push(Arena *arena, DMN_EventList *list);
|
internal DMN_Event *dmn_event_list_push(Arena *arena, DMN_EventList *list);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Thread Reading Helper Functions (Helpers, Implemented Once)
|
//~ rjf: Thread Reading Helper Functions (Helpers, Implemented Once)
|
||||||
|
|
||||||
internal U64 dmn_rip_from_thread(DMN_Handle thread);
|
internal U64 dmn_rip_from_thread(DMN_Handle thread);
|
||||||
internal U64 dmn_rsp_from_thread(DMN_Handle thread);
|
internal U64 dmn_rsp_from_thread(DMN_Handle thread);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: @dmn_os_hooks Main Layer Initialization (Implemented Per-OS)
|
//~ rjf: @dmn_os_hooks Main Layer Initialization (Implemented Per-OS)
|
||||||
|
|
||||||
internal void dmn_init(void);
|
internal void dmn_init(void);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: @dmn_os_hooks Blocking Control Thread Operations (Implemented Per-OS)
|
//~ rjf: @dmn_os_hooks Blocking Control Thread Operations (Implemented Per-OS)
|
||||||
|
|
||||||
internal DMN_CtrlCtx *dmn_ctrl_begin(void);
|
internal DMN_CtrlCtx *dmn_ctrl_begin(void);
|
||||||
internal void dmn_ctrl_exclusive_access_begin(void);
|
internal void dmn_ctrl_exclusive_access_begin(void);
|
||||||
internal void dmn_ctrl_exclusive_access_end(void);
|
internal void dmn_ctrl_exclusive_access_end(void);
|
||||||
#define DMN_CtrlExclusiveAccessScope DeferLoop(dmn_ctrl_exclusive_access_begin(), dmn_ctrl_exclusive_access_end())
|
#define DMN_CtrlExclusiveAccessScope DeferLoop(dmn_ctrl_exclusive_access_begin(), dmn_ctrl_exclusive_access_end())
|
||||||
internal U32 dmn_ctrl_launch(DMN_CtrlCtx *ctx, OS_LaunchOptions *options);
|
internal U32 dmn_ctrl_launch(DMN_CtrlCtx *ctx, OS_ProcessLaunchParams *params);
|
||||||
internal B32 dmn_ctrl_attach(DMN_CtrlCtx *ctx, U32 pid);
|
internal B32 dmn_ctrl_attach(DMN_CtrlCtx *ctx, U32 pid);
|
||||||
internal B32 dmn_ctrl_kill(DMN_CtrlCtx *ctx, DMN_Handle process, U32 exit_code);
|
internal B32 dmn_ctrl_kill(DMN_CtrlCtx *ctx, DMN_Handle process, U32 exit_code);
|
||||||
internal B32 dmn_ctrl_detach(DMN_CtrlCtx *ctx, DMN_Handle process);
|
internal B32 dmn_ctrl_detach(DMN_CtrlCtx *ctx, DMN_Handle process);
|
||||||
internal DMN_EventList dmn_ctrl_run(Arena *arena, DMN_CtrlCtx *ctx, DMN_RunCtrls *ctrls);
|
internal DMN_EventList dmn_ctrl_run(Arena *arena, DMN_CtrlCtx *ctx, DMN_RunCtrls *ctrls);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: @dmn_os_hooks Halting (Implemented Per-OS)
|
//~ rjf: @dmn_os_hooks Halting (Implemented Per-OS)
|
||||||
|
|
||||||
internal void dmn_halt(U64 code, U64 user_data);
|
internal void dmn_halt(U64 code, U64 user_data);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: @dmn_os_hooks Introspection Functions (Implemented Per-OS)
|
//~ rjf: @dmn_os_hooks Introspection Functions (Implemented Per-OS)
|
||||||
|
|
||||||
//- rjf: run/memory/register counters
|
//- rjf: run/memory/register counters
|
||||||
internal U64 dmn_run_gen(void);
|
internal U64 dmn_run_gen(void);
|
||||||
internal U64 dmn_mem_gen(void);
|
internal U64 dmn_mem_gen(void);
|
||||||
internal U64 dmn_reg_gen(void);
|
internal U64 dmn_reg_gen(void);
|
||||||
|
|
||||||
//- rjf: non-blocking-control-thread access barriers
|
//- rjf: non-blocking-control-thread access barriers
|
||||||
internal B32 dmn_access_open(void);
|
internal B32 dmn_access_open(void);
|
||||||
internal void dmn_access_close(void);
|
internal void dmn_access_close(void);
|
||||||
#define DMN_AccessScope DeferLoopChecked(dmn_access_open(), dmn_access_close())
|
#define DMN_AccessScope DeferLoopChecked(dmn_access_open(), dmn_access_close())
|
||||||
|
|
||||||
//- rjf: processes
|
//- rjf: processes
|
||||||
internal U64 dmn_process_read(DMN_Handle process, Rng1U64 range, void *dst);
|
internal U64 dmn_process_memory_reserve(DMN_Handle process, U64 vaddr, U64 size);
|
||||||
internal B32 dmn_process_write(DMN_Handle process, Rng1U64 range, void *src);
|
internal void dmn_process_memory_commit(DMN_Handle process, U64 vaddr, U64 size);
|
||||||
#define dmn_process_read_struct(process, vaddr, ptr) dmn_process_read((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
internal void dmn_process_memory_decommit(DMN_Handle process, U64 vaddr, U64 size);
|
||||||
#define dmn_process_write_struct(process, vaddr, ptr) dmn_process_write((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
internal void dmn_process_memory_release(DMN_Handle process, U64 vaddr, U64 size);
|
||||||
|
internal void dmn_process_memory_protect(DMN_Handle process, U64 vaddr, U64 size, OS_AccessFlags flags);
|
||||||
//- rjf: threads
|
internal U64 dmn_process_read(DMN_Handle process, Rng1U64 range, void *dst);
|
||||||
internal Architecture dmn_arch_from_thread(DMN_Handle handle);
|
internal B32 dmn_process_write(DMN_Handle process, Rng1U64 range, void *src);
|
||||||
internal U64 dmn_stack_base_vaddr_from_thread(DMN_Handle handle);
|
#define dmn_process_read_struct(process, vaddr, ptr) dmn_process_read((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
||||||
internal U64 dmn_tls_root_vaddr_from_thread(DMN_Handle handle);
|
#define dmn_process_write_struct(process, vaddr, ptr) dmn_process_write((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
||||||
internal B32 dmn_thread_read_reg_block(DMN_Handle handle, void *reg_block);
|
internal String8 dmn_process_read_cstring(Arena *arena, DMN_Handle process, U64 addr);
|
||||||
internal B32 dmn_thread_write_reg_block(DMN_Handle handle, void *reg_block);
|
|
||||||
|
//- rjf: threads
|
||||||
//- rjf: system process listing
|
internal Arch dmn_arch_from_thread(DMN_Handle handle);
|
||||||
internal void dmn_process_iter_begin(DMN_ProcessIter *iter);
|
internal U64 dmn_stack_base_vaddr_from_thread(DMN_Handle handle);
|
||||||
internal B32 dmn_process_iter_next(Arena *arena, DMN_ProcessIter *iter, DMN_ProcessInfo *info_out);
|
internal U64 dmn_tls_root_vaddr_from_thread(DMN_Handle handle);
|
||||||
internal void dmn_process_iter_end(DMN_ProcessIter *iter);
|
internal B32 dmn_thread_read_reg_block(DMN_Handle handle, void *reg_block);
|
||||||
|
internal B32 dmn_thread_write_reg_block(DMN_Handle handle, void *reg_block);
|
||||||
#endif // DEMON_CORE_H
|
|
||||||
|
//- rjf: system process listing
|
||||||
|
internal void dmn_process_iter_begin(DMN_ProcessIter *iter);
|
||||||
|
internal B32 dmn_process_iter_next(Arena *arena, DMN_ProcessIter *iter, DMN_ProcessInfo *info_out);
|
||||||
|
internal void dmn_process_iter_end(DMN_ProcessIter *iter);
|
||||||
|
|
||||||
|
#endif // DEMON_CORE_H
|
||||||
|
|||||||
+90
-80
@@ -1,80 +1,90 @@
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Event Kind Tables
|
//~ rjf: Event Kind Tables
|
||||||
|
|
||||||
@table(name)
|
@table(name)
|
||||||
DMN_EventKindTable:
|
DMN_EventKindTable:
|
||||||
{
|
{
|
||||||
{Null}
|
{Null}
|
||||||
{Error}
|
{Error}
|
||||||
{HandshakeComplete}
|
{HandshakeComplete}
|
||||||
{CreateProcess}
|
{CreateProcess}
|
||||||
{ExitProcess}
|
{ExitProcess}
|
||||||
{CreateThread}
|
{CreateThread}
|
||||||
{ExitThread}
|
{ExitThread}
|
||||||
{LoadModule}
|
{LoadModule}
|
||||||
{UnloadModule}
|
{UnloadModule}
|
||||||
{Breakpoint}
|
{Breakpoint}
|
||||||
{Trap}
|
{Trap}
|
||||||
{SingleStep}
|
{SingleStep}
|
||||||
{Exception}
|
{Exception}
|
||||||
{Halt}
|
{Halt}
|
||||||
{Memory}
|
{Memory}
|
||||||
{DebugString}
|
{DebugString}
|
||||||
{SetThreadName}
|
{SetThreadName}
|
||||||
}
|
}
|
||||||
|
|
||||||
@table(name)
|
@table(name)
|
||||||
DMN_ErrorKindTable:
|
DMN_ErrorKindTable:
|
||||||
{
|
{
|
||||||
{Null}
|
{Null}
|
||||||
{NotAttached}
|
{NotAttached}
|
||||||
{UnexpectedFailure}
|
{UnexpectedFailure}
|
||||||
{InvalidHandle}
|
{InvalidHandle}
|
||||||
}
|
}
|
||||||
|
|
||||||
@table(name)
|
@table(name)
|
||||||
DMN_MemoryEventKindTable:
|
DMN_MemoryEventKindTable:
|
||||||
{
|
{
|
||||||
{Null}
|
{Null}
|
||||||
{Commit}
|
{Commit}
|
||||||
{Reserve}
|
{Reserve}
|
||||||
{Decommit}
|
{Decommit}
|
||||||
{Release}
|
{Release}
|
||||||
}
|
}
|
||||||
|
|
||||||
@table(name)
|
@table(name)
|
||||||
DMN_ExceptionKindTable:
|
DMN_ExceptionKindTable:
|
||||||
{
|
{
|
||||||
{Null}
|
{Null}
|
||||||
{MemoryRead}
|
{MemoryRead}
|
||||||
{MemoryWrite}
|
{MemoryWrite}
|
||||||
{MemoryExecute}
|
{MemoryExecute}
|
||||||
{CppThrow}
|
{CppThrow}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Generators
|
//~ rjf: Generators
|
||||||
|
|
||||||
@enum DMN_EventKind:
|
@enum DMN_EventKind:
|
||||||
{
|
{
|
||||||
@expand(DMN_EventKindTable a) `$(a.name)`,
|
@expand(DMN_EventKindTable a) `$(a.name)`,
|
||||||
COUNT
|
COUNT
|
||||||
}
|
}
|
||||||
|
|
||||||
@enum DMN_ErrorKind:
|
@data(String8) dmn_event_kind_string_table:
|
||||||
{
|
{
|
||||||
@expand(DMN_ErrorKindTable a) `$(a.name)`,
|
@expand(DMN_EventKindTable a) `str8_lit_comp("$(a.name)")`
|
||||||
COUNT
|
}
|
||||||
}
|
|
||||||
|
@enum DMN_ErrorKind:
|
||||||
@enum DMN_MemoryEventKind:
|
{
|
||||||
{
|
@expand(DMN_ErrorKindTable a) `$(a.name)`,
|
||||||
@expand(DMN_MemoryEventKindTable a) `$(a.name)`,
|
COUNT
|
||||||
COUNT
|
}
|
||||||
}
|
|
||||||
|
@enum DMN_MemoryEventKind:
|
||||||
@enum DMN_ExceptionKind:
|
{
|
||||||
{
|
@expand(DMN_MemoryEventKindTable a) `$(a.name)`,
|
||||||
@expand(DMN_ExceptionKindTable a) `$(a.name)`,
|
COUNT
|
||||||
COUNT
|
}
|
||||||
}
|
|
||||||
|
@enum DMN_ExceptionKind:
|
||||||
|
{
|
||||||
|
@expand(DMN_ExceptionKindTable a) `$(a.name)`,
|
||||||
|
COUNT
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(String8) dmn_exception_kind_string_table:
|
||||||
|
{
|
||||||
|
@expand(DMN_ExceptionKindTable a) `str8_lit_comp("$(a.name)")`
|
||||||
|
}
|
||||||
|
|||||||
+12
-10
@@ -1,10 +1,12 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#include "demon_core.c"
|
#include "demon/demon_core.c"
|
||||||
|
|
||||||
#if OS_WINDOWS
|
#if OS_WINDOWS
|
||||||
# include "win32/demon_core_win32.c"
|
# include "demon/win32/demon_core_win32.c"
|
||||||
#else
|
#elif OS_LINUX
|
||||||
# error Demon layer backend not defined for this operating system.
|
# include "demon/linux/demon_core_linux.c"
|
||||||
#endif
|
#else
|
||||||
|
# error Demon layer backend not defined for this operating system.
|
||||||
|
#endif
|
||||||
|
|||||||
+17
-15
@@ -1,15 +1,17 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DEMON_INC_H
|
#ifndef DEMON_INC_H
|
||||||
#define DEMON_INC_H
|
#define DEMON_INC_H
|
||||||
|
|
||||||
#include "demon_core.h"
|
#include "demon/demon_core.h"
|
||||||
|
|
||||||
#if OS_WINDOWS
|
#if OS_WINDOWS
|
||||||
# include "win32/demon_core_win32.h"
|
# include "demon/win32/demon_core_win32.h"
|
||||||
#else
|
#elif OS_LINUX
|
||||||
# error Demon layer backend not defined for this operating system.
|
# include "demon/linux/demon_core_linux.h"
|
||||||
#endif
|
#else
|
||||||
|
# error Demon layer backend not defined for this operating system.
|
||||||
#endif // DEMON_INC_H
|
#endif
|
||||||
|
|
||||||
|
#endif // DEMON_INC_H
|
||||||
|
|||||||
@@ -1,8 +1,38 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
//- GENERATED CODE
|
//- GENERATED CODE
|
||||||
|
|
||||||
C_LINKAGE_BEGIN
|
C_LINKAGE_BEGIN
|
||||||
C_LINKAGE_END
|
String8 dmn_event_kind_string_table[17] =
|
||||||
|
{
|
||||||
|
str8_lit_comp("Null"),
|
||||||
|
str8_lit_comp("Error"),
|
||||||
|
str8_lit_comp("HandshakeComplete"),
|
||||||
|
str8_lit_comp("CreateProcess"),
|
||||||
|
str8_lit_comp("ExitProcess"),
|
||||||
|
str8_lit_comp("CreateThread"),
|
||||||
|
str8_lit_comp("ExitThread"),
|
||||||
|
str8_lit_comp("LoadModule"),
|
||||||
|
str8_lit_comp("UnloadModule"),
|
||||||
|
str8_lit_comp("Breakpoint"),
|
||||||
|
str8_lit_comp("Trap"),
|
||||||
|
str8_lit_comp("SingleStep"),
|
||||||
|
str8_lit_comp("Exception"),
|
||||||
|
str8_lit_comp("Halt"),
|
||||||
|
str8_lit_comp("Memory"),
|
||||||
|
str8_lit_comp("DebugString"),
|
||||||
|
str8_lit_comp("SetThreadName"),
|
||||||
|
};
|
||||||
|
|
||||||
|
String8 dmn_exception_kind_string_table[5] =
|
||||||
|
{
|
||||||
|
str8_lit_comp("Null"),
|
||||||
|
str8_lit_comp("MemoryRead"),
|
||||||
|
str8_lit_comp("MemoryWrite"),
|
||||||
|
str8_lit_comp("MemoryExecute"),
|
||||||
|
str8_lit_comp("CppThrow"),
|
||||||
|
};
|
||||||
|
|
||||||
|
C_LINKAGE_END
|
||||||
|
|
||||||
|
|||||||
@@ -1,63 +1,66 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
//- GENERATED CODE
|
//- GENERATED CODE
|
||||||
|
|
||||||
#ifndef DEMON_META_H
|
#ifndef DEMON_META_H
|
||||||
#define DEMON_META_H
|
#define DEMON_META_H
|
||||||
|
|
||||||
typedef enum DMN_EventKind
|
typedef enum DMN_EventKind
|
||||||
{
|
{
|
||||||
DMN_EventKind_Null,
|
DMN_EventKind_Null,
|
||||||
DMN_EventKind_Error,
|
DMN_EventKind_Error,
|
||||||
DMN_EventKind_HandshakeComplete,
|
DMN_EventKind_HandshakeComplete,
|
||||||
DMN_EventKind_CreateProcess,
|
DMN_EventKind_CreateProcess,
|
||||||
DMN_EventKind_ExitProcess,
|
DMN_EventKind_ExitProcess,
|
||||||
DMN_EventKind_CreateThread,
|
DMN_EventKind_CreateThread,
|
||||||
DMN_EventKind_ExitThread,
|
DMN_EventKind_ExitThread,
|
||||||
DMN_EventKind_LoadModule,
|
DMN_EventKind_LoadModule,
|
||||||
DMN_EventKind_UnloadModule,
|
DMN_EventKind_UnloadModule,
|
||||||
DMN_EventKind_Breakpoint,
|
DMN_EventKind_Breakpoint,
|
||||||
DMN_EventKind_Trap,
|
DMN_EventKind_Trap,
|
||||||
DMN_EventKind_SingleStep,
|
DMN_EventKind_SingleStep,
|
||||||
DMN_EventKind_Exception,
|
DMN_EventKind_Exception,
|
||||||
DMN_EventKind_Halt,
|
DMN_EventKind_Halt,
|
||||||
DMN_EventKind_Memory,
|
DMN_EventKind_Memory,
|
||||||
DMN_EventKind_DebugString,
|
DMN_EventKind_DebugString,
|
||||||
DMN_EventKind_SetThreadName,
|
DMN_EventKind_SetThreadName,
|
||||||
DMN_EventKind_COUNT,
|
DMN_EventKind_COUNT,
|
||||||
} DMN_EventKind;
|
} DMN_EventKind;
|
||||||
|
|
||||||
typedef enum DMN_ErrorKind
|
typedef enum DMN_ErrorKind
|
||||||
{
|
{
|
||||||
DMN_ErrorKind_Null,
|
DMN_ErrorKind_Null,
|
||||||
DMN_ErrorKind_NotAttached,
|
DMN_ErrorKind_NotAttached,
|
||||||
DMN_ErrorKind_UnexpectedFailure,
|
DMN_ErrorKind_UnexpectedFailure,
|
||||||
DMN_ErrorKind_InvalidHandle,
|
DMN_ErrorKind_InvalidHandle,
|
||||||
DMN_ErrorKind_COUNT,
|
DMN_ErrorKind_COUNT,
|
||||||
} DMN_ErrorKind;
|
} DMN_ErrorKind;
|
||||||
|
|
||||||
typedef enum DMN_MemoryEventKind
|
typedef enum DMN_MemoryEventKind
|
||||||
{
|
{
|
||||||
DMN_MemoryEventKind_Null,
|
DMN_MemoryEventKind_Null,
|
||||||
DMN_MemoryEventKind_Commit,
|
DMN_MemoryEventKind_Commit,
|
||||||
DMN_MemoryEventKind_Reserve,
|
DMN_MemoryEventKind_Reserve,
|
||||||
DMN_MemoryEventKind_Decommit,
|
DMN_MemoryEventKind_Decommit,
|
||||||
DMN_MemoryEventKind_Release,
|
DMN_MemoryEventKind_Release,
|
||||||
DMN_MemoryEventKind_COUNT,
|
DMN_MemoryEventKind_COUNT,
|
||||||
} DMN_MemoryEventKind;
|
} DMN_MemoryEventKind;
|
||||||
|
|
||||||
typedef enum DMN_ExceptionKind
|
typedef enum DMN_ExceptionKind
|
||||||
{
|
{
|
||||||
DMN_ExceptionKind_Null,
|
DMN_ExceptionKind_Null,
|
||||||
DMN_ExceptionKind_MemoryRead,
|
DMN_ExceptionKind_MemoryRead,
|
||||||
DMN_ExceptionKind_MemoryWrite,
|
DMN_ExceptionKind_MemoryWrite,
|
||||||
DMN_ExceptionKind_MemoryExecute,
|
DMN_ExceptionKind_MemoryExecute,
|
||||||
DMN_ExceptionKind_CppThrow,
|
DMN_ExceptionKind_CppThrow,
|
||||||
DMN_ExceptionKind_COUNT,
|
DMN_ExceptionKind_COUNT,
|
||||||
} DMN_ExceptionKind;
|
} DMN_ExceptionKind;
|
||||||
|
|
||||||
C_LINKAGE_BEGIN
|
C_LINKAGE_BEGIN
|
||||||
C_LINKAGE_END
|
extern String8 dmn_event_kind_string_table[17];
|
||||||
|
extern String8 dmn_exception_kind_string_table[5];
|
||||||
#endif // DEMON_META_H
|
|
||||||
|
C_LINKAGE_END
|
||||||
|
|
||||||
|
#endif // DEMON_META_H
|
||||||
|
|||||||
@@ -0,0 +1,174 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: @dmn_os_hooks Main Layer Initialization (Implemented Per-OS)
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_init(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: @dmn_os_hooks Blocking Control Thread Operations (Implemented Per-OS)
|
||||||
|
|
||||||
|
internal DMN_CtrlCtx *
|
||||||
|
dmn_ctrl_begin(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_ctrl_exclusive_access_begin(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_ctrl_exclusive_access_end(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal U32
|
||||||
|
dmn_ctrl_launch(DMN_CtrlCtx *ctx, OS_ProcessLaunchParams *params)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_ctrl_attach(DMN_CtrlCtx *ctx, U32 pid)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_ctrl_kill(DMN_CtrlCtx *ctx, DMN_Handle process, U32 exit_code)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_ctrl_detach(DMN_CtrlCtx *ctx, DMN_Handle process)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal DMN_EventList
|
||||||
|
dmn_ctrl_run(Arena *arena, DMN_CtrlCtx *ctx, DMN_RunCtrls *ctrls)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: @dmn_os_hooks Halting (Implemented Per-OS)
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_halt(U64 code, U64 user_data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: @dmn_os_hooks Introspection Functions (Implemented Per-OS)
|
||||||
|
|
||||||
|
//- rjf: run/memory/register counters
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_run_gen(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_mem_gen(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_reg_gen(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//- rjf: non-blocking-control-thread access barriers
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_access_open(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_access_close(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//- rjf: processes
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_process_memory_reserve(DMN_Handle process, U64 vaddr, U64 size)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_process_memory_commit(DMN_Handle process, U64 vaddr, U64 size)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_process_memory_decommit(DMN_Handle process, U64 vaddr, U64 size)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_process_memory_release(DMN_Handle process, U64 vaddr, U64 size)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_process_memory_protect(DMN_Handle process, U64 vaddr, U64 size, OS_AccessFlags flags)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_process_read(DMN_Handle process, Rng1U64 range, void *dst)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_process_write(DMN_Handle process, Rng1U64 range, void *src)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//- rjf: threads
|
||||||
|
|
||||||
|
internal Arch
|
||||||
|
dmn_arch_from_thread(DMN_Handle handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_stack_base_vaddr_from_thread(DMN_Handle handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal U64
|
||||||
|
dmn_tls_root_vaddr_from_thread(DMN_Handle handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_thread_read_reg_block(DMN_Handle handle, void *reg_block)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_thread_write_reg_block(DMN_Handle handle, void *reg_block)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//- rjf: system process listing
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_process_iter_begin(DMN_ProcessIter *iter)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
dmn_process_iter_next(Arena *arena, DMN_ProcessIter *iter, DMN_ProcessInfo *info_out)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
dmn_process_iter_end(DMN_ProcessIter *iter)
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
#ifndef DEMON_CORE_LINUX_H
|
||||||
|
#define DEMON_CORE_LINUX_H
|
||||||
|
|
||||||
|
#endif // DEMON_CORE_LINUX_H
|
||||||
+2106
-2106
File diff suppressed because it is too large
Load Diff
+222
-222
@@ -1,222 +1,222 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DEMON_OS_LINUX_H
|
#ifndef DEMON_OS_LINUX_H
|
||||||
#define DEMON_OS_LINUX_H
|
#define DEMON_OS_LINUX_H
|
||||||
|
|
||||||
// TODO(allen): Potential Upgrades:
|
// TODO(allen): Potential Upgrades:
|
||||||
//
|
//
|
||||||
// memory fd upgrade - Right now for each process we hold open a file
|
// memory fd upgrade - Right now for each process we hold open a file
|
||||||
// descriptor for the process's memory (/proc/%d/mem) for the entire lifetime
|
// descriptor for the process's memory (/proc/%d/mem) for the entire lifetime
|
||||||
// of the process; it could be opened and closed with some kind of LRU cache
|
// of the process; it could be opened and closed with some kind of LRU cache
|
||||||
// to put a finite cap on the number of handles the demon holds
|
// to put a finite cap on the number of handles the demon holds
|
||||||
//
|
//
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(allen): Get The Linux Includes
|
//~ NOTE(allen): Get The Linux Includes
|
||||||
|
|
||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(allen): Linux Demon Types
|
//~ NOTE(allen): Linux Demon Types
|
||||||
|
|
||||||
//- entities
|
//- entities
|
||||||
|
|
||||||
// Demon Linux Entity Extensions
|
// Demon Linux Entity Extensions
|
||||||
// Process: ext_u64 set to memory file descriptor
|
// Process: ext_u64 set to memory file descriptor
|
||||||
// Thread : ext_u64 cast to DEMON_LNX_ThreadExt
|
// Thread : ext_u64 cast to DEMON_LNX_ThreadExt
|
||||||
// Module : ext_u64 set to U64 (address of name)
|
// Module : ext_u64 set to U64 (address of name)
|
||||||
|
|
||||||
struct DEMON_LNX_ThreadExt{
|
struct DEMON_LNX_ThreadExt{
|
||||||
B32 expecting_dummy_sigstop;
|
B32 expecting_dummy_sigstop;
|
||||||
};
|
};
|
||||||
StaticAssert(sizeof(DEMON_LNX_ThreadExt) <= sizeof(Member(DEMON_Entity, ext_u64)), check_demon_lnx_thread_ext);
|
StaticAssert(sizeof(DEMON_LNX_ThreadExt) <= sizeof(Member(DEMON_Entity, ext_u64)), check_demon_lnx_thread_ext);
|
||||||
|
|
||||||
//- helpers
|
//- helpers
|
||||||
|
|
||||||
struct DEMON_LNX_AttachNode{
|
struct DEMON_LNX_AttachNode{
|
||||||
DEMON_LNX_AttachNode *next;
|
DEMON_LNX_AttachNode *next;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_ProcessAux{
|
struct DEMON_LNX_ProcessAux{
|
||||||
B32 filled;
|
B32 filled;
|
||||||
U64 phnum;
|
U64 phnum;
|
||||||
U64 phent;
|
U64 phent;
|
||||||
U64 phdr;
|
U64 phdr;
|
||||||
U64 execfn;
|
U64 execfn;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_PhdrInfo{
|
struct DEMON_LNX_PhdrInfo{
|
||||||
Rng1U64 range;
|
Rng1U64 range;
|
||||||
U64 dynamic;
|
U64 dynamic;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_ModuleNode{
|
struct DEMON_LNX_ModuleNode{
|
||||||
DEMON_LNX_ModuleNode *next;
|
DEMON_LNX_ModuleNode *next;
|
||||||
U64 vaddr;
|
U64 vaddr;
|
||||||
U64 size;
|
U64 size;
|
||||||
U64 name;
|
U64 name;
|
||||||
U64 already_known;
|
U64 already_known;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_EntityNode{
|
struct DEMON_LNX_EntityNode{
|
||||||
DEMON_LNX_EntityNode *next;
|
DEMON_LNX_EntityNode *next;
|
||||||
DEMON_Entity *entity;
|
DEMON_Entity *entity;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ NOTE(allen): Linux Demon Register Layouts
|
//~ NOTE(allen): Linux Demon Register Layouts
|
||||||
|
|
||||||
// these are defined in <sys/user.h> but only for one architecture at a time
|
// these are defined in <sys/user.h> but only for one architecture at a time
|
||||||
// (and we can't really trick it into giving us both in any obvious way)
|
// (and we can't really trick it into giving us both in any obvious way)
|
||||||
// we define them here so that we have them all "at once"
|
// we define them here so that we have them all "at once"
|
||||||
|
|
||||||
struct DEMON_LNX_UserRegsX64{
|
struct DEMON_LNX_UserRegsX64{
|
||||||
U64 r15;
|
U64 r15;
|
||||||
U64 r14;
|
U64 r14;
|
||||||
U64 r13;
|
U64 r13;
|
||||||
U64 r12;
|
U64 r12;
|
||||||
U64 rbp;
|
U64 rbp;
|
||||||
U64 rbx;
|
U64 rbx;
|
||||||
U64 r11;
|
U64 r11;
|
||||||
U64 r10;
|
U64 r10;
|
||||||
U64 r9;
|
U64 r9;
|
||||||
U64 r8;
|
U64 r8;
|
||||||
U64 rax;
|
U64 rax;
|
||||||
U64 rcx;
|
U64 rcx;
|
||||||
U64 rdx;
|
U64 rdx;
|
||||||
U64 rsi;
|
U64 rsi;
|
||||||
U64 rdi;
|
U64 rdi;
|
||||||
U64 orig_rax;
|
U64 orig_rax;
|
||||||
U64 rip;
|
U64 rip;
|
||||||
U64 cs;
|
U64 cs;
|
||||||
U64 rflags;
|
U64 rflags;
|
||||||
U64 rsp;
|
U64 rsp;
|
||||||
U64 ss;
|
U64 ss;
|
||||||
U64 fsbase;
|
U64 fsbase;
|
||||||
U64 gsbase;
|
U64 gsbase;
|
||||||
U64 ds;
|
U64 ds;
|
||||||
U64 es;
|
U64 es;
|
||||||
U64 fs;
|
U64 fs;
|
||||||
U64 gs;
|
U64 gs;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_UserX64{
|
struct DEMON_LNX_UserX64{
|
||||||
DEMON_LNX_UserRegsX64 regs;
|
DEMON_LNX_UserRegsX64 regs;
|
||||||
S32 u_fpvalid, _pad0;
|
S32 u_fpvalid, _pad0;
|
||||||
SYMS_XSaveLegacy i387;
|
SYMS_XSaveLegacy i387;
|
||||||
U64 u_tsize, u_dsize, u_ssize, start_code, start_stack;
|
U64 u_tsize, u_dsize, u_ssize, start_code, start_stack;
|
||||||
U64 signal;
|
U64 signal;
|
||||||
S32 reserved, _pad1;
|
S32 reserved, _pad1;
|
||||||
U64 u_ar0, u_fpstate;
|
U64 u_ar0, u_fpstate;
|
||||||
U64 magic;
|
U64 magic;
|
||||||
U8 u_comm[32];
|
U8 u_comm[32];
|
||||||
U64 u_debugreg[8];
|
U64 u_debugreg[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_UserRegsX86{
|
struct DEMON_LNX_UserRegsX86{
|
||||||
U32 ebx;
|
U32 ebx;
|
||||||
U32 ecx;
|
U32 ecx;
|
||||||
U32 edx;
|
U32 edx;
|
||||||
U32 esi;
|
U32 esi;
|
||||||
U32 edi;
|
U32 edi;
|
||||||
U32 ebp;
|
U32 ebp;
|
||||||
U32 eax;
|
U32 eax;
|
||||||
U32 ds;
|
U32 ds;
|
||||||
U32 es;
|
U32 es;
|
||||||
U32 fs;
|
U32 fs;
|
||||||
U32 gs;
|
U32 gs;
|
||||||
U32 orig_eax;
|
U32 orig_eax;
|
||||||
U32 eip;
|
U32 eip;
|
||||||
U32 cs;
|
U32 cs;
|
||||||
U32 eflags;
|
U32 eflags;
|
||||||
U32 sp;
|
U32 sp;
|
||||||
U32 ss;
|
U32 ss;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DEMON_LNX_UserX86{
|
struct DEMON_LNX_UserX86{
|
||||||
DEMON_LNX_UserRegsX86 regs;
|
DEMON_LNX_UserRegsX86 regs;
|
||||||
S32 u_fpvalid;
|
S32 u_fpvalid;
|
||||||
SYMS_FSave i387;
|
SYMS_FSave i387;
|
||||||
U32 u_tsize, u_dsize, u_ssize, start_code, start_stack;
|
U32 u_tsize, u_dsize, u_ssize, start_code, start_stack;
|
||||||
S32 signal, reserved;
|
S32 signal, reserved;
|
||||||
U32 u_ar0, u_fpstate;
|
U32 u_ar0, u_fpstate;
|
||||||
U32 magic;
|
U32 magic;
|
||||||
U8 u_comm[32];
|
U8 u_comm[32];
|
||||||
U32 u_debugreg[8];
|
U32 u_debugreg[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DEMON_LNX_PermFlags_Read = (1 << 0),
|
DEMON_LNX_PermFlags_Read = (1 << 0),
|
||||||
DEMON_LNX_PermFlags_Write = (1 << 1),
|
DEMON_LNX_PermFlags_Write = (1 << 1),
|
||||||
DEMON_LNX_PermFlags_Exec = (1 << 2),
|
DEMON_LNX_PermFlags_Exec = (1 << 2),
|
||||||
DEMON_LNX_PermFlags_Private = (1 << 3)
|
DEMON_LNX_PermFlags_Private = (1 << 3)
|
||||||
};
|
};
|
||||||
typedef int DEMON_LNX_PermFlags;
|
typedef int DEMON_LNX_PermFlags;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DEMON_LNX_MapsEntryType_Null,
|
DEMON_LNX_MapsEntryType_Null,
|
||||||
DEMON_LNX_MapsEntryType_Path,
|
DEMON_LNX_MapsEntryType_Path,
|
||||||
DEMON_LNX_MapsEntryType_Heap,
|
DEMON_LNX_MapsEntryType_Heap,
|
||||||
DEMON_LNX_MapsEntryType_Stack,
|
DEMON_LNX_MapsEntryType_Stack,
|
||||||
DEMON_LNX_MapsEntryType_VDSO,
|
DEMON_LNX_MapsEntryType_VDSO,
|
||||||
};
|
};
|
||||||
typedef int DEMON_LNX_MapsEntryType;
|
typedef int DEMON_LNX_MapsEntryType;
|
||||||
|
|
||||||
struct DEMON_LNX_MapsEntry
|
struct DEMON_LNX_MapsEntry
|
||||||
{
|
{
|
||||||
U64 address_lo;
|
U64 address_lo;
|
||||||
U64 address_hi;
|
U64 address_hi;
|
||||||
DEMON_LNX_PermFlags perms;
|
DEMON_LNX_PermFlags perms;
|
||||||
U64 offset;
|
U64 offset;
|
||||||
U32 dev_major;
|
U32 dev_major;
|
||||||
U32 dev_minor;
|
U32 dev_minor;
|
||||||
U64 inode;
|
U64 inode;
|
||||||
String8 pathname;
|
String8 pathname;
|
||||||
DEMON_LNX_MapsEntryType type;
|
DEMON_LNX_MapsEntryType type;
|
||||||
pid_t stack_tid;
|
pid_t stack_tid;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Helpers
|
//~ rjf: Helpers
|
||||||
|
|
||||||
internal DEMON_LNX_ThreadExt* demon_lnx_thread_ext(DEMON_Entity *entity);
|
internal DEMON_LNX_ThreadExt* demon_lnx_thread_ext(DEMON_Entity *entity);
|
||||||
|
|
||||||
internal B32 demon_lnx_attach_pid(Arena *arena, pid_t pid, DEMON_LNX_AttachNode **new_node);
|
internal B32 demon_lnx_attach_pid(Arena *arena, pid_t pid, DEMON_LNX_AttachNode **new_node);
|
||||||
|
|
||||||
internal String8 demon_lnx_executable_path_from_pid(Arena *arena, pid_t pid);
|
internal String8 demon_lnx_executable_path_from_pid(Arena *arena, pid_t pid);
|
||||||
internal int demon_lnx_open_memory_fd_for_pid(pid_t pid);
|
internal int demon_lnx_open_memory_fd_for_pid(pid_t pid);
|
||||||
|
|
||||||
internal Architecture demon_lnx_arch_from_pid(pid_t pid);
|
internal Arch demon_lnx_arch_from_pid(pid_t pid);
|
||||||
internal DEMON_LNX_ProcessAux demon_lnx_aux_from_pid(pid_t pid, Architecture arch);
|
internal DEMON_LNX_ProcessAux demon_lnx_aux_from_pid(pid_t pid, Arch arch);
|
||||||
internal DEMON_LNX_PhdrInfo demon_lnx_phdr_info_from_memory(int memory_fd, B32 is_32bit,
|
internal DEMON_LNX_PhdrInfo demon_lnx_phdr_info_from_memory(int memory_fd, B32 is_32bit,
|
||||||
U64 phvaddr, U64 phstride, U64 phcount);
|
U64 phvaddr, U64 phstride, U64 phcount);
|
||||||
internal DEMON_LNX_ModuleNode* demon_lnx_module_list_from_process(Arena *arena, DEMON_Entity *process);
|
internal DEMON_LNX_ModuleNode* demon_lnx_module_list_from_process(Arena *arena, DEMON_Entity *process);
|
||||||
|
|
||||||
internal U64 demon_lnx_read_memory(int memory_fd, void *dst, U64 src, U64 size);
|
internal U64 demon_lnx_read_memory(int memory_fd, void *dst, U64 src, U64 size);
|
||||||
internal B32 demon_lnx_write_memory(int memory_fd, U64 dst, void *src, U64 size);
|
internal B32 demon_lnx_write_memory(int memory_fd, U64 dst, void *src, U64 size);
|
||||||
internal String8 demon_lnx_read_memory_str(Arena *arena, int memory_fd, U64 address);
|
internal String8 demon_lnx_read_memory_str(Arena *arena, int memory_fd, U64 address);
|
||||||
|
|
||||||
internal void demon_lnx_regs_x64_from_usr_regs_x64(SYMS_RegX64 *dst, DEMON_LNX_UserRegsX64 *src);
|
internal void demon_lnx_regs_x64_from_usr_regs_x64(SYMS_RegX64 *dst, DEMON_LNX_UserRegsX64 *src);
|
||||||
internal void demon_lnx_usr_regs_x64_from_regs_x64(DEMON_LNX_UserRegsX64 *dst, SYMS_RegX64 *src);
|
internal void demon_lnx_usr_regs_x64_from_regs_x64(DEMON_LNX_UserRegsX64 *dst, SYMS_RegX64 *src);
|
||||||
|
|
||||||
internal String8 demon_lnx_read_int_string(int fd);
|
internal String8 demon_lnx_read_int_string(int fd);
|
||||||
internal B32 demon_lnx_read_expect(int fd, char expect);
|
internal B32 demon_lnx_read_expect(int fd, char expect);
|
||||||
internal int demon_lnx_read_whitespace(int fd);
|
internal int demon_lnx_read_whitespace(int fd);
|
||||||
internal String8 demon_lnx_read_string(Arena *arena, int fd);
|
internal String8 demon_lnx_read_string(Arena *arena, int fd);
|
||||||
|
|
||||||
internal int demon_lnx_open_maps(pid_t pid);
|
internal int demon_lnx_open_maps(pid_t pid);
|
||||||
internal B32 demon_lnx_next_map(Arena *arena, int maps, DEMON_LNX_MapsEntry *entry_out);
|
internal B32 demon_lnx_next_map(Arena *arena, int maps, DEMON_LNX_MapsEntry *entry_out);
|
||||||
|
|
||||||
#endif //DEMON_OS_LINUX_H
|
#endif //DEMON_OS_LINUX_H
|
||||||
|
|||||||
+2915
-2630
File diff suppressed because it is too large
Load Diff
+286
-287
@@ -1,287 +1,286 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DEMON_CORE_WIN32_H
|
#ifndef DEMON_CORE_WIN32_H
|
||||||
#define DEMON_CORE_WIN32_H
|
#define DEMON_CORE_WIN32_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Windows Includes
|
//~ rjf: Windows Includes
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Win32 Exception Codes
|
//~ rjf: Win32 Exception Codes
|
||||||
|
|
||||||
#define DMN_W32_EXCEPTION_BREAKPOINT 0x80000003u
|
#define DMN_W32_EXCEPTION_BREAKPOINT 0x80000003u
|
||||||
#define DMN_W32_EXCEPTION_SINGLE_STEP 0x80000004u
|
#define DMN_W32_EXCEPTION_SINGLE_STEP 0x80000004u
|
||||||
#define DMN_W32_EXCEPTION_LONG_JUMP 0x80000026u
|
#define DMN_W32_EXCEPTION_LONG_JUMP 0x80000026u
|
||||||
#define DMN_W32_EXCEPTION_ACCESS_VIOLATION 0xC0000005u
|
#define DMN_W32_EXCEPTION_ACCESS_VIOLATION 0xC0000005u
|
||||||
#define DMN_W32_EXCEPTION_ARRAY_BOUNDS_EXCEEDED 0xC000008Cu
|
#define DMN_W32_EXCEPTION_ARRAY_BOUNDS_EXCEEDED 0xC000008Cu
|
||||||
#define DMN_W32_EXCEPTION_DATA_TYPE_MISALIGNMENT 0x80000002u
|
#define DMN_W32_EXCEPTION_DATA_TYPE_MISALIGNMENT 0x80000002u
|
||||||
#define DMN_W32_EXCEPTION_GUARD_PAGE_VIOLATION 0x80000001u
|
#define DMN_W32_EXCEPTION_GUARD_PAGE_VIOLATION 0x80000001u
|
||||||
#define DMN_W32_EXCEPTION_FLT_DENORMAL_OPERAND 0xC000008Du
|
#define DMN_W32_EXCEPTION_FLT_DENORMAL_OPERAND 0xC000008Du
|
||||||
#define DMN_W32_EXCEPTION_FLT_DEVIDE_BY_ZERO 0xC000008Eu
|
#define DMN_W32_EXCEPTION_FLT_DEVIDE_BY_ZERO 0xC000008Eu
|
||||||
#define DMN_W32_EXCEPTION_FLT_INEXACT_RESULT 0xC000008Fu
|
#define DMN_W32_EXCEPTION_FLT_INEXACT_RESULT 0xC000008Fu
|
||||||
#define DMN_W32_EXCEPTION_FLT_INVALID_OPERATION 0xC0000090u
|
#define DMN_W32_EXCEPTION_FLT_INVALID_OPERATION 0xC0000090u
|
||||||
#define DMN_W32_EXCEPTION_FLT_OVERFLOW 0xC0000091u
|
#define DMN_W32_EXCEPTION_FLT_OVERFLOW 0xC0000091u
|
||||||
#define DMN_W32_EXCEPTION_FLT_STACK_CHECK 0xC0000092u
|
#define DMN_W32_EXCEPTION_FLT_STACK_CHECK 0xC0000092u
|
||||||
#define DMN_W32_EXCEPTION_FLT_UNDERFLOW 0xC0000093u
|
#define DMN_W32_EXCEPTION_FLT_UNDERFLOW 0xC0000093u
|
||||||
#define DMN_W32_EXCEPTION_INT_DIVIDE_BY_ZERO 0xC0000094u
|
#define DMN_W32_EXCEPTION_INT_DIVIDE_BY_ZERO 0xC0000094u
|
||||||
#define DMN_W32_EXCEPTION_INT_OVERFLOW 0xC0000095u
|
#define DMN_W32_EXCEPTION_INT_OVERFLOW 0xC0000095u
|
||||||
#define DMN_W32_EXCEPTION_PRIVILEGED_INSTRUCTION 0xC0000096u
|
#define DMN_W32_EXCEPTION_PRIVILEGED_INSTRUCTION 0xC0000096u
|
||||||
#define DMN_W32_EXCEPTION_ILLEGAL_INSTRUCTION 0xC000001Du
|
#define DMN_W32_EXCEPTION_ILLEGAL_INSTRUCTION 0xC000001Du
|
||||||
#define DMN_W32_EXCEPTION_IN_PAGE_ERROR 0xC0000006u
|
#define DMN_W32_EXCEPTION_IN_PAGE_ERROR 0xC0000006u
|
||||||
#define DMN_W32_EXCEPTION_INVALID_DISPOSITION 0xC0000026u
|
#define DMN_W32_EXCEPTION_INVALID_DISPOSITION 0xC0000026u
|
||||||
#define DMN_W32_EXCEPTION_NONCONTINUABLE 0xC0000025u
|
#define DMN_W32_EXCEPTION_NONCONTINUABLE 0xC0000025u
|
||||||
#define DMN_W32_EXCEPTION_STACK_OVERFLOW 0xC00000FDu
|
#define DMN_W32_EXCEPTION_STACK_OVERFLOW 0xC00000FDu
|
||||||
#define DMN_W32_EXCEPTION_INVALID_HANDLE 0xC0000008u
|
#define DMN_W32_EXCEPTION_INVALID_HANDLE 0xC0000008u
|
||||||
#define DMN_W32_EXCEPTION_UNWIND_CONSOLIDATE 0x80000029u
|
#define DMN_W32_EXCEPTION_UNWIND_CONSOLIDATE 0x80000029u
|
||||||
#define DMN_W32_EXCEPTION_DLL_NOT_FOUND 0xC0000135u
|
#define DMN_W32_EXCEPTION_DLL_NOT_FOUND 0xC0000135u
|
||||||
#define DMN_W32_EXCEPTION_ORDINAL_NOT_FOUND 0xC0000138u
|
#define DMN_W32_EXCEPTION_ORDINAL_NOT_FOUND 0xC0000138u
|
||||||
#define DMN_W32_EXCEPTION_ENTRY_POINT_NOT_FOUND 0xC0000139u
|
#define DMN_W32_EXCEPTION_ENTRY_POINT_NOT_FOUND 0xC0000139u
|
||||||
#define DMN_W32_EXCEPTION_DLL_INIT_FAILED 0xC0000142u
|
#define DMN_W32_EXCEPTION_DLL_INIT_FAILED 0xC0000142u
|
||||||
#define DMN_W32_EXCEPTION_CONTROL_C_EXIT 0xC000013Au
|
#define DMN_W32_EXCEPTION_CONTROL_C_EXIT 0xC000013Au
|
||||||
#define DMN_W32_EXCEPTION_FLT_MULTIPLE_FAULTS 0xC00002B4u
|
#define DMN_W32_EXCEPTION_FLT_MULTIPLE_FAULTS 0xC00002B4u
|
||||||
#define DMN_W32_EXCEPTION_FLT_MULTIPLE_TRAPS 0xC00002B5u
|
#define DMN_W32_EXCEPTION_FLT_MULTIPLE_TRAPS 0xC00002B5u
|
||||||
#define DMN_W32_EXCEPTION_NAT_CONSUMPTION 0xC00002C9u
|
#define DMN_W32_EXCEPTION_NAT_CONSUMPTION 0xC00002C9u
|
||||||
#define DMN_W32_EXCEPTION_HEAP_CORRUPTION 0xC0000374u
|
#define DMN_W32_EXCEPTION_HEAP_CORRUPTION 0xC0000374u
|
||||||
#define DMN_W32_EXCEPTION_STACK_BUFFER_OVERRUN 0xC0000409u
|
#define DMN_W32_EXCEPTION_STACK_BUFFER_OVERRUN 0xC0000409u
|
||||||
#define DMN_W32_EXCEPTION_INVALID_CRUNTIME_PARAM 0xC0000417u
|
#define DMN_W32_EXCEPTION_INVALID_CRUNTIME_PARAM 0xC0000417u
|
||||||
#define DMN_W32_EXCEPTION_ASSERT_FAILURE 0xC0000420u
|
#define DMN_W32_EXCEPTION_ASSERT_FAILURE 0xC0000420u
|
||||||
#define DMN_W32_EXCEPTION_NO_MEMORY 0xC0000017u
|
#define DMN_W32_EXCEPTION_NO_MEMORY 0xC0000017u
|
||||||
#define DMN_W32_EXCEPTION_THROW 0xE06D7363u
|
#define DMN_W32_EXCEPTION_THROW 0xE06D7363u
|
||||||
#define DMN_W32_EXCEPTION_SET_THREAD_NAME 0x406d1388u
|
#define DMN_W32_EXCEPTION_SET_THREAD_NAME 0x406d1388u
|
||||||
|
#define DMN_w32_EXCEPTION_CLRDBG_NOTIFICATION 0x04242420u
|
||||||
////////////////////////////////
|
#define DMN_w32_EXCEPTION_CLR 0xE0434352u
|
||||||
//~ rjf: Win32 Register Codes
|
|
||||||
|
////////////////////////////////
|
||||||
#define DMN_W32_CTX_X86 0x00010000
|
//~ rjf: Win32 Register Codes
|
||||||
#define DMN_W32_CTX_X64 0x00100000
|
|
||||||
|
#define DMN_W32_CTX_X86 0x00010000
|
||||||
#define DMN_W32_CTX_INTEL_CONTROL 0x0001
|
#define DMN_W32_CTX_X64 0x00100000
|
||||||
#define DMN_W32_CTX_INTEL_INTEGER 0x0002
|
|
||||||
#define DMN_W32_CTX_INTEL_SEGMENTS 0x0004
|
#define DMN_W32_CTX_INTEL_CONTROL 0x0001 // segss, rsp, segcs, rip, and rflags
|
||||||
#define DMN_W32_CTX_INTEL_FLOATS 0x0008
|
#define DMN_W32_CTX_INTEL_INTEGER 0x0002 // rax, rcx, rdx, rbx, rbp, rsi, rdi, and r8-r15
|
||||||
#define DMN_W32_CTX_INTEL_DEBUG 0x0010
|
#define DMN_W32_CTX_INTEL_SEGMENTS 0x0004 // segds, seges, segfs, and seggs
|
||||||
#define DMN_W32_CTX_INTEL_EXTENDED 0x0020
|
#define DMN_W32_CTX_INTEL_FLOATS 0x0008 // xmm0-xmm15
|
||||||
#define DMN_W32_CTX_INTEL_XSTATE 0x0040
|
#define DMN_W32_CTX_INTEL_DEBUG 0x0010 // dr0-dr3 and dr6-dr7
|
||||||
|
#define DMN_W32_CTX_INTEL_EXTENDED 0x0020
|
||||||
#define DMN_W32_CTX_X86_ALL (DMN_W32_CTX_X86 | \
|
#define DMN_W32_CTX_INTEL_XSTATE 0x0040
|
||||||
DMN_W32_CTX_INTEL_CONTROL | DMN_W32_CTX_INTEL_INTEGER | \
|
|
||||||
DMN_W32_CTX_INTEL_SEGMENTS | DMN_W32_CTX_INTEL_DEBUG | \
|
#define DMN_W32_CTX_X86_ALL (DMN_W32_CTX_X86 | \
|
||||||
DMN_W32_CTX_INTEL_EXTENDED)
|
DMN_W32_CTX_INTEL_CONTROL | DMN_W32_CTX_INTEL_INTEGER | \
|
||||||
#define DMN_W32_CTX_X64_ALL (DMN_W32_CTX_X64 | \
|
DMN_W32_CTX_INTEL_SEGMENTS | DMN_W32_CTX_INTEL_DEBUG | \
|
||||||
DMN_W32_CTX_INTEL_CONTROL | DMN_W32_CTX_INTEL_INTEGER | \
|
DMN_W32_CTX_INTEL_EXTENDED)
|
||||||
DMN_W32_CTX_INTEL_SEGMENTS | DMN_W32_CTX_INTEL_FLOATS | \
|
#define DMN_W32_CTX_X64_ALL (DMN_W32_CTX_X64 | \
|
||||||
DMN_W32_CTX_INTEL_DEBUG)
|
DMN_W32_CTX_INTEL_CONTROL | DMN_W32_CTX_INTEL_INTEGER | \
|
||||||
|
DMN_W32_CTX_INTEL_SEGMENTS | DMN_W32_CTX_INTEL_FLOATS | \
|
||||||
////////////////////////////////
|
DMN_W32_CTX_INTEL_DEBUG)
|
||||||
//~ rjf: Per-Entity State
|
|
||||||
|
////////////////////////////////
|
||||||
typedef enum DMN_W32_EntityKind
|
//~ rjf: Per-Entity State
|
||||||
{
|
|
||||||
DMN_W32_EntityKind_Null,
|
typedef enum DMN_W32_EntityKind
|
||||||
DMN_W32_EntityKind_Root,
|
{
|
||||||
DMN_W32_EntityKind_Process,
|
DMN_W32_EntityKind_Null,
|
||||||
DMN_W32_EntityKind_Thread,
|
DMN_W32_EntityKind_Root,
|
||||||
DMN_W32_EntityKind_Module,
|
DMN_W32_EntityKind_Process,
|
||||||
DMN_W32_EntityKind_COUNT
|
DMN_W32_EntityKind_Thread,
|
||||||
}
|
DMN_W32_EntityKind_Module,
|
||||||
DMN_W32_EntityKind;
|
DMN_W32_EntityKind_COUNT
|
||||||
|
}
|
||||||
typedef struct DMN_W32_Entity DMN_W32_Entity;
|
DMN_W32_EntityKind;
|
||||||
struct DMN_W32_Entity
|
|
||||||
{
|
typedef struct DMN_W32_Entity DMN_W32_Entity;
|
||||||
DMN_W32_Entity *first;
|
struct DMN_W32_Entity
|
||||||
DMN_W32_Entity *last;
|
{
|
||||||
DMN_W32_Entity *next;
|
DMN_W32_Entity *first;
|
||||||
DMN_W32_Entity *prev;
|
DMN_W32_Entity *last;
|
||||||
DMN_W32_Entity *parent;
|
DMN_W32_Entity *next;
|
||||||
DMN_W32_EntityKind kind;
|
DMN_W32_Entity *prev;
|
||||||
U32 gen;
|
DMN_W32_Entity *parent;
|
||||||
U64 id;
|
DMN_W32_EntityKind kind;
|
||||||
HANDLE handle;
|
U32 gen;
|
||||||
Architecture arch;
|
U64 id;
|
||||||
union
|
HANDLE handle;
|
||||||
{
|
Arch arch;
|
||||||
struct
|
union
|
||||||
{
|
{
|
||||||
U64 injection_address;
|
struct
|
||||||
B32 did_first_bp;
|
{
|
||||||
}
|
U64 injection_address;
|
||||||
proc;
|
B32 did_first_bp;
|
||||||
struct
|
}
|
||||||
{
|
proc;
|
||||||
U64 thread_local_base;
|
struct
|
||||||
U64 last_name_hash;
|
{
|
||||||
U64 name_gather_time_us;
|
U64 thread_local_base;
|
||||||
B32 last_run_reported_trap;
|
U64 last_name_hash;
|
||||||
U64 last_run_reported_trap_pre_rip;
|
U64 name_gather_time_us;
|
||||||
U64 last_run_reported_trap_post_rip;
|
}
|
||||||
}
|
thread;
|
||||||
thread;
|
struct
|
||||||
struct
|
{
|
||||||
{
|
Rng1U64 vaddr_range;
|
||||||
Rng1U64 vaddr_range;
|
U64 address_of_name_pointer;
|
||||||
U64 address_of_name_pointer;
|
B32 is_main;
|
||||||
B32 is_main;
|
B32 name_is_unicode;
|
||||||
B32 name_is_unicode;
|
}
|
||||||
}
|
module;
|
||||||
module;
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
typedef struct DMN_W32_EntityNode DMN_W32_EntityNode;
|
||||||
typedef struct DMN_W32_EntityNode DMN_W32_EntityNode;
|
struct DMN_W32_EntityNode
|
||||||
struct DMN_W32_EntityNode
|
{
|
||||||
{
|
DMN_W32_EntityNode *next;
|
||||||
DMN_W32_EntityNode *next;
|
DMN_W32_Entity *v;
|
||||||
DMN_W32_Entity *v;
|
};
|
||||||
};
|
|
||||||
|
typedef struct DMN_W32_EntityIDHashNode DMN_W32_EntityIDHashNode;
|
||||||
typedef struct DMN_W32_EntityIDHashNode DMN_W32_EntityIDHashNode;
|
struct DMN_W32_EntityIDHashNode
|
||||||
struct DMN_W32_EntityIDHashNode
|
{
|
||||||
{
|
DMN_W32_EntityIDHashNode *next;
|
||||||
DMN_W32_EntityIDHashNode *next;
|
DMN_W32_EntityIDHashNode *prev;
|
||||||
DMN_W32_EntityIDHashNode *prev;
|
U64 id;
|
||||||
U64 id;
|
DMN_W32_Entity *entity;
|
||||||
DMN_W32_Entity *entity;
|
};
|
||||||
};
|
|
||||||
|
typedef struct DMN_W32_EntityIDHashSlot DMN_W32_EntityIDHashSlot;
|
||||||
typedef struct DMN_W32_EntityIDHashSlot DMN_W32_EntityIDHashSlot;
|
struct DMN_W32_EntityIDHashSlot
|
||||||
struct DMN_W32_EntityIDHashSlot
|
{
|
||||||
{
|
DMN_W32_EntityIDHashNode *first;
|
||||||
DMN_W32_EntityIDHashNode *first;
|
DMN_W32_EntityIDHashNode *last;
|
||||||
DMN_W32_EntityIDHashNode *last;
|
};
|
||||||
};
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Injection Types
|
||||||
//~ rjf: Injection Types
|
|
||||||
|
typedef struct DMN_W32_InjectedBreak DMN_W32_InjectedBreak;
|
||||||
typedef struct DMN_W32_InjectedBreak DMN_W32_InjectedBreak;
|
struct DMN_W32_InjectedBreak
|
||||||
struct DMN_W32_InjectedBreak
|
{
|
||||||
{
|
U64 code;
|
||||||
U64 code;
|
U64 user_data;
|
||||||
U64 user_data;
|
};
|
||||||
};
|
|
||||||
|
#define DMN_W32_INJECTED_CODE_SIZE 32
|
||||||
#define DMN_W32_INJECTED_CODE_SIZE 32
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Image Info Types
|
||||||
//~ rjf: Image Info Types
|
|
||||||
|
typedef struct DMN_W32_ImageInfo DMN_W32_ImageInfo;
|
||||||
typedef struct DMN_W32_ImageInfo DMN_W32_ImageInfo;
|
struct DMN_W32_ImageInfo
|
||||||
struct DMN_W32_ImageInfo
|
{
|
||||||
{
|
Arch arch;
|
||||||
Architecture arch;
|
U32 size;
|
||||||
U32 size;
|
};
|
||||||
};
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Dynamically-Loaded Win32 Function Types
|
||||||
//~ rjf: Dynamically-Loaded Win32 Function Types
|
|
||||||
|
typedef HRESULT DMN_W32_GetThreadDescriptionFunctionType(HANDLE hThread, WCHAR **ppszThreadDescription);
|
||||||
typedef HRESULT DMN_W32_GetThreadDescriptionFunctionType(HANDLE hThread, WCHAR **ppszThreadDescription);
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Shared State Bundle
|
||||||
//~ rjf: Shared State Bundle
|
|
||||||
|
typedef struct DMN_W32_Shared DMN_W32_Shared;
|
||||||
typedef struct DMN_W32_Shared DMN_W32_Shared;
|
struct DMN_W32_Shared
|
||||||
struct DMN_W32_Shared
|
{
|
||||||
{
|
// rjf: top-level info
|
||||||
// rjf: top-level info
|
Arena *arena;
|
||||||
Arena *arena;
|
String8List env_strings;
|
||||||
String8List env_strings;
|
|
||||||
|
// rjf: access locking mechanism
|
||||||
// rjf: access locking mechanism
|
OS_Handle access_mutex;
|
||||||
OS_Handle access_mutex;
|
B32 access_run_state;
|
||||||
B32 access_run_state;
|
|
||||||
|
// rjf: run/mem/reg gens
|
||||||
// rjf: run/mem/reg gens
|
U64 run_gen;
|
||||||
U64 run_gen;
|
U64 mem_gen;
|
||||||
U64 mem_gen;
|
U64 reg_gen;
|
||||||
U64 reg_gen;
|
|
||||||
|
// rjf: detaching info
|
||||||
// rjf: detaching info
|
Arena *detach_arena;
|
||||||
Arena *detach_arena;
|
DMN_HandleList detach_processes;
|
||||||
DMN_HandleList detach_processes;
|
|
||||||
|
// rjf: entity state
|
||||||
// rjf: entity state
|
Arena *entities_arena;
|
||||||
Arena *entities_arena;
|
DMN_W32_Entity *entities_base;
|
||||||
DMN_W32_Entity *entities_base;
|
DMN_W32_Entity *entities_first_free;
|
||||||
DMN_W32_Entity *entities_first_free;
|
U64 entities_count;
|
||||||
U64 entities_count;
|
DMN_W32_EntityIDHashSlot *entities_id_hash_slots;
|
||||||
DMN_W32_EntityIDHashSlot *entities_id_hash_slots;
|
U64 entities_id_hash_slots_count;
|
||||||
U64 entities_id_hash_slots_count;
|
DMN_W32_EntityIDHashNode *entities_id_hash_node_free;
|
||||||
DMN_W32_EntityIDHashNode *entities_id_hash_node_free;
|
|
||||||
|
// rjf: launch state
|
||||||
// rjf: launch state
|
B32 new_process_pending;
|
||||||
B32 new_process_pending;
|
|
||||||
|
// rjf: run results
|
||||||
// rjf: run results
|
B32 resume_needed;
|
||||||
B32 resume_needed;
|
U32 resume_pid;
|
||||||
U32 resume_pid;
|
U32 resume_tid;
|
||||||
U32 resume_tid;
|
B32 exception_not_handled;
|
||||||
B32 exception_not_handled;
|
|
||||||
|
// rjf: halting info
|
||||||
// rjf: halting info
|
DMN_Handle halter_process;
|
||||||
DMN_Handle halter_process;
|
U32 halter_tid;
|
||||||
U32 halter_tid;
|
};
|
||||||
};
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Globals
|
||||||
//~ rjf: Globals
|
|
||||||
|
global DMN_W32_Shared *dmn_w32_shared = 0;
|
||||||
global DMN_W32_Shared *dmn_w32_shared = 0;
|
global DMN_W32_Entity dmn_w32_entity_nil = {&dmn_w32_entity_nil, &dmn_w32_entity_nil, &dmn_w32_entity_nil, &dmn_w32_entity_nil, &dmn_w32_entity_nil};
|
||||||
global DMN_W32_Entity dmn_w32_entity_nil = {&dmn_w32_entity_nil, &dmn_w32_entity_nil, &dmn_w32_entity_nil, &dmn_w32_entity_nil, &dmn_w32_entity_nil};
|
global DMN_W32_GetThreadDescriptionFunctionType *dmn_w32_GetThreadDescription = 0;
|
||||||
global DMN_W32_GetThreadDescriptionFunctionType *dmn_w32_GetThreadDescription = 0;
|
thread_static B32 dmn_w32_ctrl_thread = 0;
|
||||||
thread_static B32 dmn_w32_ctrl_thread = 0;
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Basic Helpers
|
||||||
//~ rjf: Basic Helpers
|
|
||||||
|
internal U64 dmn_w32_hash_from_string(String8 string);
|
||||||
internal U64 dmn_w32_hash_from_string(String8 string);
|
internal U64 dmn_w32_hash_from_id(U64 id);
|
||||||
internal U64 dmn_w32_hash_from_id(U64 id);
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Entity Helpers
|
||||||
//~ rjf: Entity Helpers
|
|
||||||
|
//- rjf: entity <-> handle
|
||||||
//- rjf: entity <-> handle
|
internal DMN_Handle dmn_w32_handle_from_entity(DMN_W32_Entity *entity);
|
||||||
internal DMN_Handle dmn_w32_handle_from_entity(DMN_W32_Entity *entity);
|
internal DMN_W32_Entity *dmn_w32_entity_from_handle(DMN_Handle handle);
|
||||||
internal DMN_W32_Entity *dmn_w32_entity_from_handle(DMN_Handle handle);
|
|
||||||
|
//- rjf: entity allocation/deallocation
|
||||||
//- rjf: entity allocation/deallocation
|
internal DMN_W32_Entity *dmn_w32_entity_alloc(DMN_W32_Entity *parent, DMN_W32_EntityKind kind, U64 id);
|
||||||
internal DMN_W32_Entity *dmn_w32_entity_alloc(DMN_W32_Entity *parent, DMN_W32_EntityKind kind, U64 id);
|
internal void dmn_w32_entity_release(DMN_W32_Entity *entity);
|
||||||
internal void dmn_w32_entity_release(DMN_W32_Entity *entity);
|
|
||||||
|
//- rjf: kind*id -> entity
|
||||||
//- rjf: kind*id -> entity
|
internal DMN_W32_Entity *dmn_w32_entity_from_kind_id(DMN_W32_EntityKind kind, U64 id);
|
||||||
internal DMN_W32_Entity *dmn_w32_entity_from_kind_id(DMN_W32_EntityKind kind, U64 id);
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Module Info Extraction
|
||||||
//~ rjf: Module Info Extraction
|
|
||||||
|
internal String8 dmn_w32_full_path_from_module(Arena *arena, DMN_W32_Entity *module);
|
||||||
internal String8 dmn_w32_full_path_from_module(Arena *arena, DMN_W32_Entity *module);
|
|
||||||
|
////////////////////////////////
|
||||||
////////////////////////////////
|
//~ rjf: Win32-Level Process/Thread Reads/Writes
|
||||||
//~ rjf: Win32-Level Process/Thread Reads/Writes
|
|
||||||
|
//- rjf: processes
|
||||||
//- rjf: processes
|
internal U64 dmn_w32_process_read(HANDLE process, Rng1U64 range, void *dst);
|
||||||
internal U64 dmn_w32_process_read(HANDLE process, Rng1U64 range, void *dst);
|
internal B32 dmn_w32_process_write(HANDLE process, Rng1U64 range, void *src);
|
||||||
internal B32 dmn_w32_process_write(HANDLE process, Rng1U64 range, void *src);
|
internal String8 dmn_w32_read_memory_str(Arena *arena, HANDLE process_handle, U64 address);
|
||||||
internal String8 dmn_w32_read_memory_str(Arena *arena, HANDLE process_handle, U64 address);
|
internal String16 dmn_w32_read_memory_str16(Arena *arena, HANDLE process_handle, U64 address);
|
||||||
internal String16 dmn_w32_read_memory_str16(Arena *arena, HANDLE process_handle, U64 address);
|
#define dmn_w32_process_read_struct(process, vaddr, ptr) dmn_w32_process_read((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
||||||
#define dmn_w32_process_read_struct(process, vaddr, ptr) dmn_w32_process_read((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
#define dmn_w32_process_write_struct(process, vaddr, ptr) dmn_w32_process_write((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
||||||
#define dmn_w32_process_write_struct(process, vaddr, ptr) dmn_w32_process_write((process), r1u64((vaddr), (vaddr)+(sizeof(*ptr))), ptr)
|
internal DMN_W32_ImageInfo dmn_w32_image_info_from_process_base_vaddr(HANDLE process, U64 base_vaddr);
|
||||||
internal DMN_W32_ImageInfo dmn_w32_image_info_from_process_base_vaddr(HANDLE process, U64 base_vaddr);
|
|
||||||
|
//- rjf: threads
|
||||||
//- rjf: threads
|
internal U16 dmn_w32_real_tag_word_from_xsave(XSAVE_FORMAT *fxsave);
|
||||||
internal U16 dmn_w32_real_tag_word_from_xsave(XSAVE_FORMAT *fxsave);
|
internal U16 dmn_w32_xsave_tag_word_from_real_tag_word(U16 ftw);
|
||||||
internal U16 dmn_w32_xsave_tag_word_from_real_tag_word(U16 ftw);
|
internal B32 dmn_w32_thread_read_reg_block(Arch arch, HANDLE thread, void *reg_block);
|
||||||
internal B32 dmn_w32_thread_read_reg_block(Architecture arch, HANDLE thread, void *reg_block);
|
internal B32 dmn_w32_thread_write_reg_block(Arch arch, HANDLE thread, void *reg_block);
|
||||||
internal B32 dmn_w32_thread_write_reg_block(Architecture arch, HANDLE thread, void *reg_block);
|
|
||||||
|
//- rjf: remote thread injection
|
||||||
//- rjf: remote thread injection
|
internal DWORD dmn_w32_inject_thread(HANDLE process, U64 start_address);
|
||||||
internal DWORD dmn_w32_inject_thread(HANDLE process, U64 start_address);
|
|
||||||
|
#endif // DEMON_CORE_WIN32_H
|
||||||
#endif // DEMON_CORE_WIN32_H
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,516 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
//- GENERATED CODE
|
|
||||||
|
|
||||||
C_LINKAGE_BEGIN
|
|
||||||
Rng1U64 df_g_cmd_param_slot_range_table[19] =
|
|
||||||
{
|
|
||||||
{0},
|
|
||||||
{OffsetOf(DF_CmdParams, window), OffsetOf(DF_CmdParams, window) + sizeof(DF_Handle)},
|
|
||||||
{OffsetOf(DF_CmdParams, panel), OffsetOf(DF_CmdParams, panel) + sizeof(DF_Handle)},
|
|
||||||
{OffsetOf(DF_CmdParams, dest_panel), OffsetOf(DF_CmdParams, dest_panel) + sizeof(DF_Handle)},
|
|
||||||
{OffsetOf(DF_CmdParams, prev_view), OffsetOf(DF_CmdParams, prev_view) + sizeof(DF_Handle)},
|
|
||||||
{OffsetOf(DF_CmdParams, view), OffsetOf(DF_CmdParams, view) + sizeof(DF_Handle)},
|
|
||||||
{OffsetOf(DF_CmdParams, entity), OffsetOf(DF_CmdParams, entity) + sizeof(DF_Handle)},
|
|
||||||
{OffsetOf(DF_CmdParams, entity_list), OffsetOf(DF_CmdParams, entity_list) + sizeof(DF_HandleList)},
|
|
||||||
{OffsetOf(DF_CmdParams, string), OffsetOf(DF_CmdParams, string) + sizeof(String8)},
|
|
||||||
{OffsetOf(DF_CmdParams, file_path), OffsetOf(DF_CmdParams, file_path) + sizeof(String8)},
|
|
||||||
{OffsetOf(DF_CmdParams, text_point), OffsetOf(DF_CmdParams, text_point) + sizeof(TxtPt)},
|
|
||||||
{OffsetOf(DF_CmdParams, cmd_spec), OffsetOf(DF_CmdParams, cmd_spec) + sizeof(struct DF_CmdSpec *)},
|
|
||||||
{OffsetOf(DF_CmdParams, view_spec), OffsetOf(DF_CmdParams, view_spec) + sizeof(struct DF_ViewSpec *)},
|
|
||||||
{OffsetOf(DF_CmdParams, vaddr), OffsetOf(DF_CmdParams, vaddr) + sizeof(U64)},
|
|
||||||
{OffsetOf(DF_CmdParams, voff), OffsetOf(DF_CmdParams, voff) + sizeof(U64)},
|
|
||||||
{OffsetOf(DF_CmdParams, index), OffsetOf(DF_CmdParams, index) + sizeof(U64)},
|
|
||||||
{OffsetOf(DF_CmdParams, id), OffsetOf(DF_CmdParams, id) + sizeof(U64)},
|
|
||||||
{OffsetOf(DF_CmdParams, prefer_dasm), OffsetOf(DF_CmdParams, prefer_dasm) + sizeof(B32)},
|
|
||||||
{OffsetOf(DF_CmdParams, force_confirm), OffsetOf(DF_CmdParams, force_confirm) + sizeof(B32)},
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_IconKind df_g_entity_kind_icon_kind_table[26] =
|
|
||||||
{
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Machine,
|
|
||||||
DF_IconKind_FileOutline,
|
|
||||||
DF_IconKind_FileOutline,
|
|
||||||
DF_IconKind_FileOutline,
|
|
||||||
DF_IconKind_FileOutline,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Pin,
|
|
||||||
DF_IconKind_CircleFilled,
|
|
||||||
DF_IconKind_CircleFilled,
|
|
||||||
DF_IconKind_Target,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Threads,
|
|
||||||
DF_IconKind_Thread,
|
|
||||||
DF_IconKind_Module,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Threads,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
DF_IconKind_Null,
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_entity_kind_display_string_table[26] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("Nil"),
|
|
||||||
str8_lit_comp("Root"),
|
|
||||||
str8_lit_comp("Machine"),
|
|
||||||
str8_lit_comp("File"),
|
|
||||||
str8_lit_comp("Override File Link"),
|
|
||||||
str8_lit_comp("Pending File Change"),
|
|
||||||
str8_lit_comp("Diagnostics Log"),
|
|
||||||
str8_lit_comp("Flash Marker"),
|
|
||||||
str8_lit_comp("Watch Pin"),
|
|
||||||
str8_lit_comp("Breakpoint"),
|
|
||||||
str8_lit_comp("Condition"),
|
|
||||||
str8_lit_comp("Target"),
|
|
||||||
str8_lit_comp("Executable"),
|
|
||||||
str8_lit_comp("Arguments"),
|
|
||||||
str8_lit_comp("Execution Path"),
|
|
||||||
str8_lit_comp("Entry Point Name"),
|
|
||||||
str8_lit_comp("Source"),
|
|
||||||
str8_lit_comp("Destination"),
|
|
||||||
str8_lit_comp("Process"),
|
|
||||||
str8_lit_comp("Thread"),
|
|
||||||
str8_lit_comp("Module"),
|
|
||||||
str8_lit_comp("Debug Info Override"),
|
|
||||||
str8_lit_comp("Pending Thread Name"),
|
|
||||||
str8_lit_comp("Conversion Task"),
|
|
||||||
str8_lit_comp("Conversion Failure"),
|
|
||||||
str8_lit_comp("EndedProcess"),
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_entity_kind_name_label_table[26] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Expression"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Expression"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Executable"),
|
|
||||||
str8_lit_comp("Arguments"),
|
|
||||||
str8_lit_comp("Execution Path"),
|
|
||||||
str8_lit_comp("Symbol Name"),
|
|
||||||
str8_lit_comp("Path"),
|
|
||||||
str8_lit_comp("Path"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
str8_lit_comp("Label"),
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_EntityKindFlags df_g_entity_kind_flags_table[26] =
|
|
||||||
{
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(1*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 1*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 1*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 1*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 1*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 1*DF_EntityKindFlag_LeafMutationProfileConfig | 1*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 1*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 1*DF_EntityKindFlag_LeafMutationSoftHalt | 1*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 1*DF_EntityKindFlag_TreeMutationSoftHalt | 1*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
(0*DF_EntityKindFlag_LeafMutationUserConfig | 0*DF_EntityKindFlag_LeafMutationProfileConfig | 0*DF_EntityKindFlag_LeafMutationSoftHalt | 0*DF_EntityKindFlag_LeafMutationDebugInfoMap | 0*DF_EntityKindFlag_TreeMutationUserConfig | 0*DF_EntityKindFlag_TreeMutationProfileConfig | 0*DF_EntityKindFlag_TreeMutationSoftHalt | 0*DF_EntityKindFlag_TreeMutationDebugInfoMap | 0*DF_EntityKindFlag_NameIsCode | 0*DF_EntityKindFlag_UserDefinedLifetime),
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_EntityOpFlags df_g_entity_kind_op_flags_table[26] =
|
|
||||||
{
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (1*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(1*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (1*DF_EntityOpFlag_Duplicate),
|
|
||||||
(1*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (1*DF_EntityOpFlag_Enable) | (1*DF_EntityOpFlag_Condition) | (1*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(1*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (1*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (1*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (1*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (1*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (1*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (0*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(0*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
(1*DF_EntityOpFlag_Delete) | (0*DF_EntityOpFlag_Freeze) | (0*DF_EntityOpFlag_Edit) | (1*DF_EntityOpFlag_Rename) | (0*DF_EntityOpFlag_Enable) | (0*DF_EntityOpFlag_Condition) | (0*DF_EntityOpFlag_Duplicate),
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_cfg_src_string_table[4] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("user"),
|
|
||||||
str8_lit_comp("profile"),
|
|
||||||
str8_lit_comp("command_line"),
|
|
||||||
str8_lit_comp("transient"),
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_CoreCmdKind df_g_cfg_src_load_cmd_kind_table[4] =
|
|
||||||
{
|
|
||||||
DF_CoreCmdKind_OpenUser,
|
|
||||||
DF_CoreCmdKind_OpenProfile,
|
|
||||||
DF_CoreCmdKind_Null,
|
|
||||||
DF_CoreCmdKind_Null,
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_CoreCmdKind df_g_cfg_src_write_cmd_kind_table[4] =
|
|
||||||
{
|
|
||||||
DF_CoreCmdKind_WriteUserData,
|
|
||||||
DF_CoreCmdKind_WriteProfileData,
|
|
||||||
DF_CoreCmdKind_Null,
|
|
||||||
DF_CoreCmdKind_Null,
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_CoreCmdKind df_g_cfg_src_apply_cmd_kind_table[4] =
|
|
||||||
{
|
|
||||||
DF_CoreCmdKind_ApplyUserData,
|
|
||||||
DF_CoreCmdKind_ApplyProfileData,
|
|
||||||
DF_CoreCmdKind_Null,
|
|
||||||
DF_CoreCmdKind_Null,
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[206] =
|
|
||||||
{
|
|
||||||
{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
|
|
||||||
{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp("Run Command"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_CmdSpec, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("error"), str8_lit_comp("Notifies of an error."), str8_lit_comp(""), str8_lit_comp("Error"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp("Launch and Run"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Play},
|
|
||||||
{ str8_lit_comp("launch_and_init"), str8_lit_comp("Starts debugging a new instance of a target, then stops at the program's entry point."), str8_lit_comp("launch,start,entry,point"), str8_lit_comp("Launch and Initialize"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward},
|
|
||||||
{ str8_lit_comp("kill"), str8_lit_comp("Kills the specified existing debugged process(es)."), str8_lit_comp("stop,kill"), str8_lit_comp("Kill"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Stop},
|
|
||||||
{ str8_lit_comp("kill_all"), str8_lit_comp("Kills all debugged child processes."), str8_lit_comp("stop,kill,all"), str8_lit_comp("Kill All"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Stop},
|
|
||||||
{ str8_lit_comp("detach"), str8_lit_comp("Detaches the specified debugged process."), str8_lit_comp("detach"), str8_lit_comp("Detach"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("continue"), str8_lit_comp("Continues all halted threads."), str8_lit_comp(""), str8_lit_comp("Continue"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play},
|
|
||||||
{ str8_lit_comp("step_into_inst"), str8_lit_comp("Performs a step that goes into calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Into (Assembly)"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto},
|
|
||||||
{ str8_lit_comp("step_over_inst"), str8_lit_comp("Performs a step that skips calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Over (Assembly)"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver},
|
|
||||||
{ str8_lit_comp("step_into_line"), str8_lit_comp("Performs a step that goes into calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Into (Line)"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto},
|
|
||||||
{ str8_lit_comp("step_over_line"), str8_lit_comp("Performs a step that skips calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Over (Line)"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver},
|
|
||||||
{ str8_lit_comp("step_out"), str8_lit_comp("Runs to the end of the current function and exits it."), str8_lit_comp(""), str8_lit_comp("Step Out"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOut},
|
|
||||||
{ str8_lit_comp("halt"), str8_lit_comp("Halts all running processes."), str8_lit_comp("pause"), str8_lit_comp("Halt"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pause},
|
|
||||||
{ str8_lit_comp("soft_halt_refresh"), str8_lit_comp("Interrupts all running processes to collect data, and then resumes them."), str8_lit_comp(""), str8_lit_comp("Soft Halt Refresh"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Refresh},
|
|
||||||
{ str8_lit_comp("set_thread_ip"), str8_lit_comp("Sets the passed thread's instruction pointer at the passed address."), str8_lit_comp(""), str8_lit_comp("Set Thread IP"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("run_to_line"), str8_lit_comp("Runs until a particular source line is hit."), str8_lit_comp(""), str8_lit_comp("Run To Line"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play},
|
|
||||||
{ str8_lit_comp("run_to_address"), str8_lit_comp("Runs until a particular address is hit."), str8_lit_comp(""), str8_lit_comp("Run To Address"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward},
|
|
||||||
{ str8_lit_comp("run"), str8_lit_comp("Runs all targets after starting them if they have not been started yet."), str8_lit_comp("play"), str8_lit_comp("Run"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play},
|
|
||||||
{ str8_lit_comp("restart"), str8_lit_comp("Kills all running processes, then restarts the targets which were used to launch all current processes (if any)."), str8_lit_comp("restart,retry"), str8_lit_comp("Restart"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Redo},
|
|
||||||
{ str8_lit_comp("step_into"), str8_lit_comp("Steps once, possibly into function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Into"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepInto},
|
|
||||||
{ str8_lit_comp("step_over"), str8_lit_comp("Steps once, always over function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Over"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_StepOver},
|
|
||||||
{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp(""), str8_lit_comp("Run To Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Play},
|
|
||||||
{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
|
|
||||||
{ str8_lit_comp("enable_solo_stepping_mode"), str8_lit_comp("Enables 'solo stepping mode', which suspends all non-selected threads before stepping."), str8_lit_comp("solo,stepping,mode,suspend"), str8_lit_comp("Enable Solo Stepping Mode"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thread},
|
|
||||||
{ str8_lit_comp("disable_solo_stepping_mode"), str8_lit_comp("Disables 'solo stepping mode', which suspends all non-selected threads before stepping."), str8_lit_comp("solo,stepping,mode,suspend"), str8_lit_comp("Disable Solo Stepping Mode"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thread},
|
|
||||||
{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), str8_lit_comp(""), str8_lit_comp("Select Thread"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("select_thread_window"), str8_lit_comp("Selects a thread for the active window, overriding the global selected thread."), str8_lit_comp(""), str8_lit_comp("Select Thread On Window"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("select_thread_view"), str8_lit_comp("Selects a thread for the active view, overriding the global and per-window selected threads."), str8_lit_comp(""), str8_lit_comp("Select Thread On View"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp("Select Unwind"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("up_one_frame"), str8_lit_comp("Selects the callstack frame above the currently selected."), str8_lit_comp(""), str8_lit_comp("Up One Frame"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow},
|
|
||||||
{ str8_lit_comp("down_one_frame"), str8_lit_comp("Selects the callstack frame below the currently selected."), str8_lit_comp(""), str8_lit_comp("Down One Frame"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow},
|
|
||||||
{ str8_lit_comp("freeze_thread"), str8_lit_comp("Freezes the passed thread."), str8_lit_comp(""), str8_lit_comp("Freeze Thread"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Locked},
|
|
||||||
{ str8_lit_comp("thaw_thread"), str8_lit_comp("Thaws the passed thread."), str8_lit_comp(""), str8_lit_comp("Thaw Thread"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked},
|
|
||||||
{ str8_lit_comp("freeze_process"), str8_lit_comp("Freezes the passed process."), str8_lit_comp(""), str8_lit_comp("Freeze Process"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Locked},
|
|
||||||
{ str8_lit_comp("thaw_process"), str8_lit_comp("Thaws the passed process."), str8_lit_comp(""), str8_lit_comp("Thaw Process"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked},
|
|
||||||
{ str8_lit_comp("freeze_machine"), str8_lit_comp("Freezes the passed machine."), str8_lit_comp(""), str8_lit_comp("Freeze Machine"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Machine, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Locked},
|
|
||||||
{ str8_lit_comp("thaw_machine"), str8_lit_comp("Thaws the passed machine."), str8_lit_comp(""), str8_lit_comp("Thaw Machine"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Machine, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Unlocked},
|
|
||||||
{ str8_lit_comp("freeze_local_machine"), str8_lit_comp("Freezes the local machine."), str8_lit_comp(""), str8_lit_comp("Freeze Local Machine"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Machine},
|
|
||||||
{ str8_lit_comp("thaw_local_machine"), str8_lit_comp("Thaws the local machine."), str8_lit_comp(""), str8_lit_comp("Thaw Local Machine"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Machine},
|
|
||||||
{ str8_lit_comp("inc_ui_font_scale"), str8_lit_comp("Increases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Increase UI Font Scale"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("dec_ui_font_scale"), str8_lit_comp("Decreases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Decrease UI Font Scale"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("inc_code_font_scale"), str8_lit_comp("Increases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Increase Code Font Scale"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("dec_code_font_scale"), str8_lit_comp("Decreases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Decrease Code Font Scale"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("open_window"), str8_lit_comp("Opens a new window."), str8_lit_comp(""), str8_lit_comp("Open New Window"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window},
|
|
||||||
{ str8_lit_comp("close_window"), str8_lit_comp("Closes an opened window."), str8_lit_comp(""), str8_lit_comp("Close Window"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window},
|
|
||||||
{ str8_lit_comp("toggle_fullscreen"), str8_lit_comp("Toggles fullscreen view on the active window."), str8_lit_comp(""), str8_lit_comp("Toggle Fullscreen"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window},
|
|
||||||
{ str8_lit_comp("confirm_accept"), str8_lit_comp("Accepts the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Accept"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("confirm_cancel"), str8_lit_comp("Cancels the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Cancel"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("reset_to_default_panels"), str8_lit_comp("Resets the window to the default panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Default Panel Layout"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Window},
|
|
||||||
{ str8_lit_comp("new_panel_right"), str8_lit_comp("Creates a new panel to the right of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Vertically"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_XSplit},
|
|
||||||
{ str8_lit_comp("new_panel_down"), str8_lit_comp("Creates a new panel at the bottom of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Horizontally"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_YSplit},
|
|
||||||
{ str8_lit_comp("rotate_panel_columns"), str8_lit_comp("Rotates all panels at the closest column level of the panel hierarchy."), str8_lit_comp(""), str8_lit_comp("Rotate Panel Columns"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("next_panel"), str8_lit_comp("Cycles the active panel forward."), str8_lit_comp(""), str8_lit_comp("Focus Next Panel"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
|
|
||||||
{ str8_lit_comp("prev_panel"), str8_lit_comp("Cycles the active panel backwards."), str8_lit_comp(""), str8_lit_comp("Focus Previous Panel"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow},
|
|
||||||
{ str8_lit_comp("focus_panel"), str8_lit_comp("Focuses a new panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("focus_panel_right"), str8_lit_comp("Focuses a panel rightward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Right"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
|
|
||||||
{ str8_lit_comp("focus_panel_left"), str8_lit_comp("Focuses a panel leftward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Left"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow},
|
|
||||||
{ str8_lit_comp("focus_panel_up"), str8_lit_comp("Focuses a panel upward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Up"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow},
|
|
||||||
{ str8_lit_comp("focus_panel_down"), str8_lit_comp("Focuses a panel downward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Down"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow},
|
|
||||||
{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Undo},
|
|
||||||
{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Redo},
|
|
||||||
{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow},
|
|
||||||
{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
|
|
||||||
{ str8_lit_comp("close_panel"), str8_lit_comp("Closes the currently active panel."), str8_lit_comp(""), str8_lit_comp("Close Panel"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_ClosePanel},
|
|
||||||
{ str8_lit_comp("next_tab"), str8_lit_comp("Focuses the next tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Next Tab"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
|
|
||||||
{ str8_lit_comp("prev_tab"), str8_lit_comp("Focuses the previous tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Previous Tab"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow},
|
|
||||||
{ str8_lit_comp("move_tab_right"), str8_lit_comp("Moves the selected tab right one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Right"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_RightArrow},
|
|
||||||
{ str8_lit_comp("move_tab_left"), str8_lit_comp("Moves the selected tab left one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Left"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_LeftArrow},
|
|
||||||
{ str8_lit_comp("open_tab"), str8_lit_comp("Opens a new tab with the parameterized view specification."), str8_lit_comp(""), str8_lit_comp("Open Tab"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("close_tab"), str8_lit_comp("Closes the currently opened tab."), str8_lit_comp(""), str8_lit_comp("Close Tab"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
|
|
||||||
{ str8_lit_comp("move_tab"), str8_lit_comp("Moves a tab to a new panel."), str8_lit_comp(""), str8_lit_comp("Move Tab"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("tab_bar_top"), str8_lit_comp("Anchors a panel's tab bar to the top of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Top"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_UpArrow},
|
|
||||||
{ str8_lit_comp("tab_bar_bottom"), str8_lit_comp("Anchors a panel's tab bar to the bottom of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Bottom"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_DownArrow},
|
|
||||||
{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp("Set Current Path"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp("Open"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("reload"), str8_lit_comp("Reloads a loaded file."), str8_lit_comp("code,source,file,reload"), str8_lit_comp("Reload"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_File, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("reload_active"), str8_lit_comp("Reloads the active file."), str8_lit_comp("code,source,file,reload"), str8_lit_comp("Reload Active File"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("switch"), str8_lit_comp("Switches to a loaded file."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_File, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch To Partner File"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("set_file_override_link_src"), str8_lit_comp("Sets the source path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Source"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("set_file_override_link_dst"), str8_lit_comp("Sets the destination path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Destination"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp("Set File Replacement Path"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,profile,layout"), str8_lit_comp("Open User"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Person},
|
|
||||||
{ str8_lit_comp("open_profile"), str8_lit_comp("Opens a profile file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("profile,project,session"), str8_lit_comp("Open Profile"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Briefcase},
|
|
||||||
{ str8_lit_comp("apply_user_data"), str8_lit_comp("Applies user data from the active user file."), str8_lit_comp(""), str8_lit_comp("Apply User Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("apply_profile_data"), str8_lit_comp("Applies profile data from the active profile file."), str8_lit_comp(""), str8_lit_comp("Apply Profile Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp("Write User Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("write_profile_data"), str8_lit_comp("Writes profile data to the active profile file."), str8_lit_comp(""), str8_lit_comp("Write Profile Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_left"), str8_lit_comp("Moves the cursor or selection left."), str8_lit_comp(""), str8_lit_comp("Move Left"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_right"), str8_lit_comp("Moves the cursor or selection right."), str8_lit_comp(""), str8_lit_comp("Move Right"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up"), str8_lit_comp("Moves the cursor or selection up."), str8_lit_comp(""), str8_lit_comp("Move Up"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down"), str8_lit_comp("Moves the cursor or selection down."), str8_lit_comp(""), str8_lit_comp("Move Down"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_left_select"), str8_lit_comp("Moves the cursor or selection left, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_right_select"), str8_lit_comp("Moves the cursor or selection right, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_select"), str8_lit_comp("Moves the cursor or selection up, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_select"), str8_lit_comp("Moves the cursor or selection down, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_left_chunk"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_right_chunk"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_chunk"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_chunk"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_page"), str8_lit_comp("Moves the cursor or selection up one page."), str8_lit_comp(""), str8_lit_comp("Move Up Page"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_page"), str8_lit_comp("Moves the cursor or selection down one page."), str8_lit_comp(""), str8_lit_comp("Move Down Page"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_whole"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Up Whole"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_whole"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Down Whole"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_left_chunk_select"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Chunk Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_right_chunk_select"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Chunk Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_chunk_select"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_chunk_select"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_page_select"), str8_lit_comp("Moves the cursor or selection up one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Page Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_page_select"), str8_lit_comp("Moves the cursor or selection down one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Page Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_up_whole_select"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Whole Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_down_whole_select"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Whole Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_home"), str8_lit_comp("Moves the cursor to the beginning of the line."), str8_lit_comp(""), str8_lit_comp("Move Home"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_end"), str8_lit_comp("Moves the cursor to the end of the line."), str8_lit_comp(""), str8_lit_comp("Move End"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_home_select"), str8_lit_comp("Moves the cursor to the beginning of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Home Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("move_end_select"), str8_lit_comp("Moves the cursor to the end of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move End Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("select_all"), str8_lit_comp("Selects everything possible."), str8_lit_comp(""), str8_lit_comp("Select All"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("delete_single"), str8_lit_comp("Deletes a single element to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Single"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("delete_chunk"), str8_lit_comp("Deletes a chunk to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Chunk"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("backspace_single"), str8_lit_comp("Deletes a single element to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Single"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("backspace_chunk"), str8_lit_comp("Deletes a chunk to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Chunk"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("copy"), str8_lit_comp("Copies the active selection to the clipboard."), str8_lit_comp(""), str8_lit_comp("Copy"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard},
|
|
||||||
{ str8_lit_comp("cut"), str8_lit_comp("Copies the active selection to the clipboard, then deletes it."), str8_lit_comp(""), str8_lit_comp("Cut"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard},
|
|
||||||
{ str8_lit_comp("paste"), str8_lit_comp("Pastes the current contents of the clipboard."), str8_lit_comp(""), str8_lit_comp("Paste"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Clipboard},
|
|
||||||
{ str8_lit_comp("insert_text"), str8_lit_comp("Inserts the text that was used to cause this command."), str8_lit_comp(""), str8_lit_comp("Insert Text"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("goto_line"), str8_lit_comp("Jumps to a line number in the current code file."), str8_lit_comp(""), str8_lit_comp("Go To Line"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_TextPoint, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("goto_address"), str8_lit_comp("Jumps to an address in the current memory or disassembly view."), str8_lit_comp(""), str8_lit_comp("Go To Address"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("center_cursor"), str8_lit_comp("Snaps the current code view to center the cursor."), str8_lit_comp(""), str8_lit_comp("Center Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("contain_cursor"), str8_lit_comp("Snaps the current code view to contain the cursor."), str8_lit_comp(""), str8_lit_comp("Contain Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("find_text_forward"), str8_lit_comp("Searches the current code file forward (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Forward)"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*1)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("find_text_backward"), str8_lit_comp("Searches the current code file backwards (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Backwards)"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*1)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("find_next"), str8_lit_comp("Searches the current code file forward (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Next"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("find_prev"), str8_lit_comp("Searches the current code file backwards (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Previous"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*1)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("find_thread"), str8_lit_comp("Jumps to the passed thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Thread"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Thread, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("find_selected_thread"), str8_lit_comp("Jumps to the selected thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Selected Thread"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("goto_name"), str8_lit_comp("Searches for the passed string as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("goto_name_at_cursor"), str8_lit_comp("Searches for the text at the cursor as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name At Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("toggle_watch_expr"), str8_lit_comp("Adds or removes an expression to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("toggle_watch_expr_at_cursor"), str8_lit_comp("Adds or removes the expression that the cursor or selection is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("set_columns"), str8_lit_comp("Sets the number of columns for a memory view."), str8_lit_comp(""), str8_lit_comp("Set Columns"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Index, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Thumbnails},
|
|
||||||
{ str8_lit_comp("toggle_address_visibility"), str8_lit_comp("Toggles the visibility of addresses in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Address Visibility"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thumbnails},
|
|
||||||
{ str8_lit_comp("toggle_code_bytes_visibility"), str8_lit_comp("Toggles the visibility of machine code bytes in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Code Bytes Visibility"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thumbnails},
|
|
||||||
{ str8_lit_comp("enable_entity"), str8_lit_comp("Enables an entity."), str8_lit_comp(""), str8_lit_comp("Enable Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("disable_entity"), str8_lit_comp("Disables an entity."), str8_lit_comp(""), str8_lit_comp("Disable Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("freeze_entity"), str8_lit_comp("Freezes an entity."), str8_lit_comp(""), str8_lit_comp("Freeze Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("thaw_entity"), str8_lit_comp("Thaws an entity."), str8_lit_comp(""), str8_lit_comp("Thaw Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("remove_entity"), str8_lit_comp("Removes an entity."), str8_lit_comp(""), str8_lit_comp("Remove Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("name_entity"), str8_lit_comp("Equips an entity with a name."), str8_lit_comp(""), str8_lit_comp("Name Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("edit_entity"), str8_lit_comp("Opens the editor for an entity."), str8_lit_comp(""), str8_lit_comp("Edit Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("duplicate_entity"), str8_lit_comp("Duplicates an entity."), str8_lit_comp(""), str8_lit_comp("Duplicate Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("text_breakpoint"), str8_lit_comp("Places or removes a breakpoint on the specified line of source code."), str8_lit_comp(""), str8_lit_comp("Text Breakpoint"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
|
|
||||||
{ str8_lit_comp("address_breakpoint"), str8_lit_comp("Places or removes a breakpoint on the specified address."), str8_lit_comp(""), str8_lit_comp("Address Breakpoint"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_VirtualAddr, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled},
|
|
||||||
{ str8_lit_comp("function_breakpoint"), str8_lit_comp("Places or removes a breakpoint on the first address(es) of the specified function."), str8_lit_comp(""), str8_lit_comp("Function Breakpoint"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CircleFilled},
|
|
||||||
{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
|
|
||||||
{ str8_lit_comp("remove_breakpoint"), str8_lit_comp("Removes an existing breakpoint."), str8_lit_comp(""), str8_lit_comp("Remove Breakpoint"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Trash},
|
|
||||||
{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled},
|
|
||||||
{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Breakpoint, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow},
|
|
||||||
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin on a textual location on a particular entity."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("Places or removes a watch pin at the cursor on the currently active file."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin At Cursor"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_String, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("Add Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Target},
|
|
||||||
{ str8_lit_comp("remove_target"), str8_lit_comp("Removes an existing target."), str8_lit_comp("delete,remove,target"), str8_lit_comp("Remove Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Trash},
|
|
||||||
{ str8_lit_comp("edit_target"), str8_lit_comp("Edits an existing target."), str8_lit_comp(""), str8_lit_comp("Edit Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Pencil},
|
|
||||||
{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp("Select Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Target},
|
|
||||||
{ str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp("Enable Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled},
|
|
||||||
{ str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp("Disable Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow},
|
|
||||||
{ str8_lit_comp("retry_ended_process"), str8_lit_comp("Launches a new process with the same options as the passed ended process."), str8_lit_comp(""), str8_lit_comp("Retry Ended Process"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_ID, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."), str8_lit_comp(""), str8_lit_comp("Register As Just-In-Time (JIT) Debugger"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("entity_ref_fast_path"), str8_lit_comp("Activates the default behavior when clicking an entity reference."), str8_lit_comp(""), str8_lit_comp("Entity Reference Fast Path"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("spawn_entity_view"), str8_lit_comp("Spawns a new view, given an entity and other parameterizations."), str8_lit_comp(""), str8_lit_comp("Spawn Entity View"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("find_code_location"), str8_lit_comp("Finds a specific source code location given file, line, and column coordinates. Opens the file if necessary."), str8_lit_comp(""), str8_lit_comp("Find Code Location"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("filter"), str8_lit_comp("Begins filtering the active view."), str8_lit_comp("sort,search,filter,find"), str8_lit_comp("Filter"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("apply_filter"), str8_lit_comp("Applies the typed filter to the active view."), str8_lit_comp("sort,search,filter,find,apply"), str8_lit_comp("Apply Filter"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("clear_filter"), str8_lit_comp("Clears the filter applied to the active view."), str8_lit_comp("sort,search,filter,find,clear"), str8_lit_comp("Clear Filter"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Find},
|
|
||||||
{ str8_lit_comp("commands"), str8_lit_comp("Opens the list of all commands."), str8_lit_comp(""), str8_lit_comp("Commands"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_List},
|
|
||||||
{ str8_lit_comp("target"), str8_lit_comp("Opens the editor for a target."), str8_lit_comp(""), str8_lit_comp("Target"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Target},
|
|
||||||
{ str8_lit_comp("targets"), str8_lit_comp("Opens the list of all targets."), str8_lit_comp(""), str8_lit_comp("Targets"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Target},
|
|
||||||
{ str8_lit_comp("file_path_map"), str8_lit_comp("Opens the file path mapping editor."), str8_lit_comp(""), str8_lit_comp("File Path Map"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("scheduler"), str8_lit_comp("Opens the scheduler view, for process and thread controls."), str8_lit_comp("threads,processes,targets"), str8_lit_comp("Scheduler"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Scheduler},
|
|
||||||
{ str8_lit_comp("call_stack"), str8_lit_comp("Opens the call stack view."), str8_lit_comp("callstack,thread"), str8_lit_comp("Call Stack"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Thread},
|
|
||||||
{ str8_lit_comp("modules"), str8_lit_comp("Opens the modules view."), str8_lit_comp(""), str8_lit_comp("Modules"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Module},
|
|
||||||
{ str8_lit_comp("pending_entity"), str8_lit_comp("Opens a view which waits for the passed entity to be completely loaded, then replaces itself with a new view."), str8_lit_comp(""), str8_lit_comp("Pending Entity"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("code"), str8_lit_comp("Opens the code view for an already-loaded file."), str8_lit_comp(""), str8_lit_comp("Code"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("globals"), str8_lit_comp("Opens a globals view."), str8_lit_comp(""), str8_lit_comp("Globals"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("procedures"), str8_lit_comp("Opens a procedures view."), str8_lit_comp(""), str8_lit_comp("Procedures"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Binoculars},
|
|
||||||
{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_List},
|
|
||||||
{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Grid},
|
|
||||||
{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Glasses},
|
|
||||||
{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CircleFilled},
|
|
||||||
{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pin},
|
|
||||||
{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp("Exception Filters"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Gear},
|
|
||||||
{ str8_lit_comp("theme"), str8_lit_comp("Opens the theme view."), str8_lit_comp("theme,color,scheme,palette"), str8_lit_comp("Theme"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Palette},
|
|
||||||
{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp("Pick Folder"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*1)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FolderOpenFilled},
|
|
||||||
{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp("Pick File/Folder"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_FilePath, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*1)|(DF_CmdQueryFlag_AllowFolders*1)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_FileOutline},
|
|
||||||
{ str8_lit_comp("complete_query"), str8_lit_comp("Completes a query."), str8_lit_comp(""), str8_lit_comp("Complete Query"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("cancel_query"), str8_lit_comp("Cancels a query."), str8_lit_comp(""), str8_lit_comp("Cancel Query"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_CoreViewRuleSpecInfo df_g_core_view_rule_spec_info_table[16] =
|
|
||||||
{
|
|
||||||
{str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
|
||||||
{str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(array) , 0, },
|
|
||||||
{str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(list) , },
|
|
||||||
{str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp("Specifies that all integer primitives should be byte-swapped, such that their endianness is reversed."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(bswap) , 0, },
|
|
||||||
{str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
|
||||||
{str8_lit_comp("bin"), str8_lit_comp("Binary Base (Base 2)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-2 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
|
||||||
{str8_lit_comp("oct"), str8_lit_comp("Octal Base (Base 8)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-8 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
|
||||||
{str8_lit_comp("hex"), str8_lit_comp("Hexadecimal Base (Base 16)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-16 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
|
||||||
{str8_lit_comp("only"), str8_lit_comp("Only Specified Members"), str8_lit_comp("Specifies that only the specified members should appear in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(only) , },
|
|
||||||
{str8_lit_comp("omit"), str8_lit_comp("Omit Specified Members"), str8_lit_comp("Omits a list of member names from appearing in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(omit) , },
|
|
||||||
{str8_lit_comp("no_addr"), str8_lit_comp("Disable Address Values"), str8_lit_comp("Displays only what pointers point to, if possible, without the pointer's address value."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
|
||||||
{str8_lit_comp("rgba"), str8_lit_comp("Color (RGBA)"), str8_lit_comp("Displays as a color, interpreting the data as encoding R, G, B, and A values."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(rgba) , },
|
|
||||||
{str8_lit_comp("text"), str8_lit_comp("Text"), str8_lit_comp("Displays as text."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(text) , },
|
|
||||||
{str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), str8_lit_comp("Displays as disassembled instructions, interpreting the data as raw machine code."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(disasm) , },
|
|
||||||
{str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), str8_lit_comp("Displays as a bitmap, interpreting the data as raw pixel data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(bitmap) , },
|
|
||||||
{str8_lit_comp("geo"), str8_lit_comp("Geometry"), str8_lit_comp("Displays as geometry, interpreting the data as vertex data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(geo) , },
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_icon_kind_text_table[69] =
|
|
||||||
{
|
|
||||||
str8_lit_comp(""),
|
|
||||||
str8_lit_comp("b"),
|
|
||||||
str8_lit_comp("c"),
|
|
||||||
str8_lit_comp("B"),
|
|
||||||
str8_lit_comp("C"),
|
|
||||||
str8_lit_comp("f"),
|
|
||||||
str8_lit_comp("F"),
|
|
||||||
str8_lit_comp("g"),
|
|
||||||
str8_lit_comp("h"),
|
|
||||||
str8_lit_comp("r"),
|
|
||||||
str8_lit_comp("s"),
|
|
||||||
str8_lit_comp("i"),
|
|
||||||
str8_lit_comp("w"),
|
|
||||||
str8_lit_comp("W"),
|
|
||||||
str8_lit_comp("k"),
|
|
||||||
str8_lit_comp("K"),
|
|
||||||
str8_lit_comp("L"),
|
|
||||||
str8_lit_comp("R"),
|
|
||||||
str8_lit_comp("U"),
|
|
||||||
str8_lit_comp("D"),
|
|
||||||
str8_lit_comp("G"),
|
|
||||||
str8_lit_comp("P"),
|
|
||||||
str8_lit_comp("3"),
|
|
||||||
str8_lit_comp("p"),
|
|
||||||
str8_lit_comp("O"),
|
|
||||||
str8_lit_comp("o"),
|
|
||||||
str8_lit_comp("!"),
|
|
||||||
str8_lit_comp("1"),
|
|
||||||
str8_lit_comp("<"),
|
|
||||||
str8_lit_comp(">"),
|
|
||||||
str8_lit_comp("^"),
|
|
||||||
str8_lit_comp("v"),
|
|
||||||
str8_lit_comp("9"),
|
|
||||||
str8_lit_comp("0"),
|
|
||||||
str8_lit_comp("7"),
|
|
||||||
str8_lit_comp("8"),
|
|
||||||
str8_lit_comp("+"),
|
|
||||||
str8_lit_comp("-"),
|
|
||||||
str8_lit_comp("'"),
|
|
||||||
str8_lit_comp("\""),
|
|
||||||
str8_lit_comp("M"),
|
|
||||||
str8_lit_comp("."),
|
|
||||||
str8_lit_comp("x"),
|
|
||||||
str8_lit_comp("q"),
|
|
||||||
str8_lit_comp("j"),
|
|
||||||
str8_lit_comp("u"),
|
|
||||||
str8_lit_comp("m"),
|
|
||||||
str8_lit_comp("n"),
|
|
||||||
str8_lit_comp("l"),
|
|
||||||
str8_lit_comp("a"),
|
|
||||||
str8_lit_comp("z"),
|
|
||||||
str8_lit_comp("y"),
|
|
||||||
str8_lit_comp("X"),
|
|
||||||
str8_lit_comp("Y"),
|
|
||||||
str8_lit_comp("S"),
|
|
||||||
str8_lit_comp("T"),
|
|
||||||
str8_lit_comp("Z"),
|
|
||||||
str8_lit_comp("d"),
|
|
||||||
str8_lit_comp("N"),
|
|
||||||
str8_lit_comp("E"),
|
|
||||||
str8_lit_comp("H"),
|
|
||||||
str8_lit_comp("e"),
|
|
||||||
str8_lit_comp("I"),
|
|
||||||
str8_lit_comp("J"),
|
|
||||||
str8_lit_comp("A"),
|
|
||||||
str8_lit_comp("?"),
|
|
||||||
str8_lit_comp("4"),
|
|
||||||
str8_lit_comp("5"),
|
|
||||||
str8_lit_comp("c"),
|
|
||||||
};
|
|
||||||
|
|
||||||
C_LINKAGE_END
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
#include "df/core/df_core.c"
|
|
||||||
#include "df/gfx/df_gfx.c"
|
|
||||||
#include "df/gfx/df_views.c"
|
|
||||||
#include "df/gfx/df_view_rule_hooks.c"
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
#ifndef DEBUG_FRONTEND_INC_H
|
|
||||||
#define DEBUG_FRONTEND_INC_H
|
|
||||||
|
|
||||||
#include "df/core/df_core.h"
|
|
||||||
#include "df/gfx/df_gfx.h"
|
|
||||||
#include "df/gfx/df_views.h"
|
|
||||||
#include "df/gfx/df_view_rule_hooks.h"
|
|
||||||
|
|
||||||
#endif // DEBUG_FRONTEND_INC_H
|
|
||||||
-12207
File diff suppressed because it is too large
Load Diff
-1010
File diff suppressed because it is too large
Load Diff
@@ -1,714 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Embedded Data
|
|
||||||
|
|
||||||
@embed_file df_g_icon_font_bytes: "../data/icons.ttf"
|
|
||||||
@embed_file df_g_default_main_font_bytes: "../data/Roboto-Regular.ttf"
|
|
||||||
@embed_file df_g_default_code_font_bytes: "../data/liberation-mono.ttf"
|
|
||||||
//@embed_file df_g_default_code_font_bytes: "../data/Inconsolata-Regular.ttf"
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Default Bindings
|
|
||||||
|
|
||||||
@table(name key ctrl shift alt)
|
|
||||||
DF_DefaultBindingTable:
|
|
||||||
{
|
|
||||||
//- rjf: low-level target control operations
|
|
||||||
{ "kill_all" F5 0 shift 0 }
|
|
||||||
{ "step_into_inst" F11 0 0 alt }
|
|
||||||
{ "step_over_inst" F10 0 0 alt }
|
|
||||||
{ "step_out" F11 0 shift 0 }
|
|
||||||
{ "halt" X ctrl shift 0 }
|
|
||||||
{ "halt" Pause 0 0 0 }
|
|
||||||
{ "soft_halt_refresh" R 0 0 alt }
|
|
||||||
|
|
||||||
//- rjf: high-level composite target control operations
|
|
||||||
{ "run" F5 0 0 0 }
|
|
||||||
{ "restart" F5 ctrl shift 0 }
|
|
||||||
{ "step_into" F11 0 0 0 }
|
|
||||||
{ "step_over" F10 0 0 0 }
|
|
||||||
{ "run_to_cursor" F10 ctrl 0 0 }
|
|
||||||
{ "set_next_statement" F10 ctrl shift 0 }
|
|
||||||
|
|
||||||
//- rjf: font sizes
|
|
||||||
{ "inc_ui_font_scale" Equal 0 0 alt }
|
|
||||||
{ "dec_ui_font_scale" Minus 0 0 alt }
|
|
||||||
{ "inc_code_font_scale" Equal 0 shift alt }
|
|
||||||
{ "dec_code_font_scale" Minus 0 shift alt }
|
|
||||||
|
|
||||||
//- rjf: windows
|
|
||||||
{ "window" N ctrl shift 0 }
|
|
||||||
{ "toggle_fullscreen" Return ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: panel splitting
|
|
||||||
{ "new_panel_right" P ctrl 0 0 }
|
|
||||||
{ "new_panel_down" Minus ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: panel rotation
|
|
||||||
{ "rotate_panel_columns" 2 ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: focused panel changing
|
|
||||||
{ "next_panel" Comma ctrl 0 0 }
|
|
||||||
{ "prev_panel" Comma ctrl shift 0 }
|
|
||||||
{ "focus_panel_right" Right ctrl 0 alt }
|
|
||||||
{ "focus_panel_left" Left ctrl 0 alt }
|
|
||||||
{ "focus_panel_up" Up ctrl 0 alt }
|
|
||||||
{ "focus_panel_down" Down ctrl 0 alt }
|
|
||||||
|
|
||||||
//- rjf: undo/redo
|
|
||||||
//{ "undo" Z ctrl 0 0 }
|
|
||||||
//{ "redo" Y ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: focus history
|
|
||||||
//{ "go_back" Left 0 0 alt }
|
|
||||||
//{ "go_forward" Right 0 0 alt }
|
|
||||||
|
|
||||||
//- rjf: panel removal
|
|
||||||
{ "close_panel" P ctrl shift 0 }
|
|
||||||
|
|
||||||
//- rjf: panel tab
|
|
||||||
{ "next_tab" PageDown ctrl 0 0 }
|
|
||||||
{ "prev_tab" PageUp ctrl 0 0 }
|
|
||||||
{ "next_tab" Tab ctrl 0 0 }
|
|
||||||
{ "prev_tab" Tab ctrl shift 0 }
|
|
||||||
{ "move_tab_right" PageDown ctrl shift 0 }
|
|
||||||
{ "move_tab_left" PageUp ctrl shift 0 }
|
|
||||||
{ "close_tab" W ctrl 0 0 }
|
|
||||||
{ "tab_bar_top" Up ctrl shift alt }
|
|
||||||
{ "tab_bar_bottom" Down ctrl shift alt }
|
|
||||||
|
|
||||||
//- rjf: files
|
|
||||||
{ "open" O ctrl 0 0 }
|
|
||||||
{ "reload_active" R ctrl shift 0 }
|
|
||||||
{ "switch" I ctrl 0 0 }
|
|
||||||
{ "switch_to_partner_file" O 0 0 alt }
|
|
||||||
|
|
||||||
//- rjf: setting config paths
|
|
||||||
{ "load_user" O ctrl shift alt }
|
|
||||||
{ "load_profile" O ctrl 0 alt }
|
|
||||||
|
|
||||||
//- rjf: directional movement & text controls
|
|
||||||
{ "move_left" Left 0 0 0 }
|
|
||||||
{ "move_right" Right 0 0 0 }
|
|
||||||
{ "move_up" Up 0 0 0 }
|
|
||||||
{ "move_down" Down 0 0 0 }
|
|
||||||
{ "move_left_select" Left 0 shift 0 }
|
|
||||||
{ "move_right_select" Right 0 shift 0 }
|
|
||||||
{ "move_up_select" Up 0 shift 0 }
|
|
||||||
{ "move_down_select" Down 0 shift 0 }
|
|
||||||
{ "move_left_chunk" Left ctrl 0 0 }
|
|
||||||
{ "move_right_chunk" Right ctrl 0 0 }
|
|
||||||
{ "move_up_chunk" Up ctrl 0 0 }
|
|
||||||
{ "move_down_chunk" Down ctrl 0 0 }
|
|
||||||
{ "move_up_page" PageUp 0 0 0 }
|
|
||||||
{ "move_down_page" PageDown 0 0 0 }
|
|
||||||
{ "move_up_whole" Home ctrl 0 0 }
|
|
||||||
{ "move_down_whole" End ctrl 0 0 }
|
|
||||||
{ "move_left_chunk_select" Left ctrl shift 0 }
|
|
||||||
{ "move_right_chunk_select" Right ctrl shift 0 }
|
|
||||||
{ "move_up_chunk_select" Up ctrl shift 0 }
|
|
||||||
{ "move_down_chunk_select" Down ctrl shift 0 }
|
|
||||||
{ "move_up_page_select" PageUp 0 shift 0 }
|
|
||||||
{ "move_down_page_select" PageDown 0 shift 0 }
|
|
||||||
{ "move_up_whole_select" Home ctrl shift 0 }
|
|
||||||
{ "move_down_whole_select" End ctrl shift 0 }
|
|
||||||
{ "move_home" Home 0 0 0 }
|
|
||||||
{ "move_end" End 0 0 0 }
|
|
||||||
{ "move_home_select" Home 0 shift 0 }
|
|
||||||
{ "move_end_select" End 0 shift 0 }
|
|
||||||
{ "select_all" A ctrl 0 0 }
|
|
||||||
{ "delete_single" Delete 0 0 0 }
|
|
||||||
{ "delete_chunk" Delete ctrl 0 0 }
|
|
||||||
{ "backspace_single" Backspace 0 0 0 }
|
|
||||||
{ "backspace_chunk" Backspace ctrl 0 0 }
|
|
||||||
{ "copy" C ctrl 0 0 }
|
|
||||||
{ "cut" X ctrl 0 0 }
|
|
||||||
{ "paste" V ctrl 0 0 }
|
|
||||||
{ "insert_text" Null 0 0 0 }
|
|
||||||
|
|
||||||
//- rjf: code navigation
|
|
||||||
{ "goto_line" G ctrl 0 0 }
|
|
||||||
{ "goto_address" G 0 0 alt }
|
|
||||||
{ "find_text_forward" F ctrl 0 0 }
|
|
||||||
{ "find_text_backward" R ctrl 0 0 }
|
|
||||||
{ "find_next" F3 0 0 0 }
|
|
||||||
{ "find_prev" F3 shift 0 0 }
|
|
||||||
|
|
||||||
//- rjf: thread finding
|
|
||||||
{ "find_selected_thread" F4 0 0 0 }
|
|
||||||
|
|
||||||
//- rjf: name finding
|
|
||||||
{ "goto_name" J ctrl 0 0 }
|
|
||||||
{ "goto_name_at_cursor" F12 0 0 0 }
|
|
||||||
|
|
||||||
//- rjf: watch expressions
|
|
||||||
{ "toggle_watch_expr_at_cursor" W 0 0 alt }
|
|
||||||
{ "toggle_watch_pin_at_cursor" F9 ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: breakpoints
|
|
||||||
{ "toggle_breakpoint_cursor" F9 0 0 0 }
|
|
||||||
|
|
||||||
//- rjf: targets
|
|
||||||
{ "add_target" T ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: attaching
|
|
||||||
{ "attach" F6 0 shift 0 }
|
|
||||||
|
|
||||||
//- rjf: filtering
|
|
||||||
{ "filter" Slash ctrl 0 0 }
|
|
||||||
|
|
||||||
//- rjf: command lister
|
|
||||||
{ "run_command" F1 0 0 0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Binding Version Remap Table
|
|
||||||
|
|
||||||
@table(old_name new_name)
|
|
||||||
DF_BindingVersionRemapTable:
|
|
||||||
{
|
|
||||||
{"commands" "run_command"}
|
|
||||||
{"load_user" "open_user"}
|
|
||||||
{"load_profile" "open_profile"}
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Gfx Layer View Kinds
|
|
||||||
|
|
||||||
@table(name)
|
|
||||||
DF_NameKindTable:
|
|
||||||
{
|
|
||||||
{Null}
|
|
||||||
{EntityName}
|
|
||||||
{EntityKindName}
|
|
||||||
}
|
|
||||||
|
|
||||||
@table(name, name_lower, display_string, name_kind, icon, parameterized_by_entity, can_serialize, can_serialize_entity_path, can_filter, filter_is_code, typing_automatically_filters, inc_in_docs, docs_desc)
|
|
||||||
DF_GfxViewTable:
|
|
||||||
{
|
|
||||||
{ Null "null" "" Null Null 0 0 0 0 0 0 0 "" }
|
|
||||||
{ Empty "empty" "" Null Null 0 0 0 0 0 0 0 "" }
|
|
||||||
{ Commands "commands" "Commands" Null List 0 0 0 0 0 0 0 "" }
|
|
||||||
{ FileSystem "file_system" "File System" Null FileOutline 0 0 0 0 0 0 0 "" }
|
|
||||||
{ SystemProcesses "system_processes" "System Processes" Null Null 0 0 0 0 0 0 0 "" }
|
|
||||||
{ EntityLister "entity_lister" "Entity List" EntityKindName Null 0 0 0 0 0 0 0 "" }
|
|
||||||
{ SymbolLister "symbol_lister" "Symbols" Null Null 0 0 0 0 0 0 0 "" }
|
|
||||||
{ Target "target" "Target" EntityName Target 1 0 0 0 0 0 0 "" }
|
|
||||||
{ Targets "targets" "Targets" Null Target 0 1 0 1 0 1 1 "Displays a list of all targets, as well as controls for enabling, disabling, launching, editing, or deleting each target. For more information on targets, read the `Targets` section." }
|
|
||||||
{ FilePathMap "file_path_map" "File Path Map" Null FileOutline 0 1 0 0 0 0 1 "Displays a table of *path maps*. Each path map is a pair of file or folder paths, one being a 'source' path, and one being a 'destination' path. These pairs are used by the debugger when automatically searching for specific files - for instance, when attempting to snap to a source code location specified by debug info. If debug info refers to a path on the machine on which a target executable was originally built, but that path is not valid on the debugger machine, but some alternative path exists, then path maps may be used to redirect the debugger from the debug info's specified paths to the associated appropriate debugger machine file paths." }
|
|
||||||
{ Scheduler "scheduler" "Scheduler" Null Scheduler 0 1 0 1 1 1 1 "Displays all processes and threads to which the debugger is currently attached, and contains controls for selecting and freezing threads." }
|
|
||||||
{ CallStack "call_stack" "Call Stack" Null Thread 0 1 0 0 0 0 1 "Displays the call stack of the currently selected thread. Each frame in the call stack contains the associated module, function name, and return address. Allows selection of a particular call stack frame other than the top." }
|
|
||||||
{ Modules "modules" "Modules" Null Module 0 1 0 1 0 1 1 "Displays a table of all modules currently loaded by any process to which the debugger is attached. This table displays each module's name, virtual address range in the containing process' address space, and which debug info file is being used by the debugger for the associated module." }
|
|
||||||
{ PendingEntity "pending_entity" "Pending Entity" EntityName FileOutline 1 0 0 0 0 0 0 "" }
|
|
||||||
{ Code "code" "Code" EntityName FileOutline 1 1 1 0 0 0 0 "" }
|
|
||||||
{ Disassembly "disassembly" "Disassembly" Null Glasses 0 1 0 0 0 0 1 "Displays disassembled instructions in a textual form from the selected thread's containing process virtual address space." }
|
|
||||||
{ EvalViewer "eval_viewer" "Evaluation Viewer" Null Binoculars 0 1 0 0 0 0 0 "." }
|
|
||||||
{ Watch "watch" "Watch" Null Binoculars 0 1 0 1 1 1 1 "The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section." }
|
|
||||||
{ Locals "locals" "Locals" Null Binoculars 0 1 0 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with local variables found within the selected call stack frame of the selected thread, according to the associated debug info. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
|
||||||
{ Registers "registers" "Registers" Null Binoculars 0 1 0 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all register names according to the selected thread's architecture. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
|
||||||
{ Globals "globals" "Globals" Null Binoculars 0 1 0 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all global variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
|
||||||
{ ThreadLocals "thread_locals" "Thread Locals" Null Binoculars 0 1 0 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all thread local variables within the selected thread's module. View rules and evaluation values can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
|
||||||
{ Types "types" "Types" Null Binoculars 0 1 0 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all types within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
|
||||||
{ Procedures "procedures" "Procedures" Null Binoculars 0 1 0 1 1 1 1 "Nearly identical to `Watch`, but automatically filled with all procedures within the selected thread's module. View rules can be edited, like in `Watch`, but unlike `Watch`, expressions cannot be edited or added to the table." }
|
|
||||||
{ Output "output" "Output" Null List 0 1 0 0 0 0 1 "Displays textual output from the selected thread's containing process." }
|
|
||||||
{ Memory "memory" "Memory" Null Grid 0 1 1 0 0 0 1 "A familiar hex-editor-like interface for viewing memory of attached processes." }
|
|
||||||
{ Breakpoints "breakpoints" "Breakpoints" Null CircleFilled 0 1 0 1 0 1 1 "Displays a table of all breakpoints, containing information about each breakpoint's name, location, and hit count. Also contains per-breakpoint controls for enabling, deleting, or editing each breakpoint. For more information on breakpoints and their features, read the 'Breakpoints' section." }
|
|
||||||
{ WatchPins "watch_pins" "Watch Pins" Null Pin 0 1 0 1 1 1 1 "Displays a table of all watch pins (watched expressions, like those found in `Watch`, but instead of being within a table, being pinned to some source code location, like breakpoints). This table contains each pin's name, location, and controls for editing or deleting each pin." }
|
|
||||||
{ ExceptionFilters "exception_filters" "Exception Filters" Null Gear 0 1 0 1 0 1 1 "An interface which controls whether or not the debugger will halt attached processes upon encountering specific exception codes for the first time." }
|
|
||||||
{ Theme "theme" "Theme" Null Palette 0 1 0 0 0 0 1 "An interface for modifying the colors used in the debugger's UI. Allows selecting a theme preset, loading a theme from a file, and modifying individual colors within a theme." }
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Command Parameter Slot -> View
|
|
||||||
|
|
||||||
@table(slot view_spec opt_cmd_spec)
|
|
||||||
DF_CmdParamSlot2ViewSpecMap:
|
|
||||||
{
|
|
||||||
{Entity "entity_lister" "" }
|
|
||||||
{EntityList "entity_lister" "" }
|
|
||||||
{FilePath "file_system" "" }
|
|
||||||
{CmdSpec "commands" "" }
|
|
||||||
{ID "system_processes" "" }
|
|
||||||
{String "symbol_lister" "goto_name" }
|
|
||||||
{String "symbol_lister" "function_breakpoint" }
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Built-In Graphical View Rule Extensions
|
|
||||||
//
|
|
||||||
// NOTE(rjf): see @view_rule_info
|
|
||||||
|
|
||||||
@table(string vr ls ru bu wu)
|
|
||||||
DF_GfxViewRuleTable:
|
|
||||||
{
|
|
||||||
{"array" - - - - - }
|
|
||||||
{"list" x - - - - }
|
|
||||||
{"dec" - x - - - }
|
|
||||||
{"bin" - x - - - }
|
|
||||||
{"oct" - x - - - }
|
|
||||||
{"hex" - x - - - }
|
|
||||||
{"only" x x - - - }
|
|
||||||
{"omit" x x - - - }
|
|
||||||
{"no_addr" - x - - - }
|
|
||||||
{"rgba" - - x x - }
|
|
||||||
{"text" - - - x - }
|
|
||||||
{"disasm" - - - x - }
|
|
||||||
{"bitmap" - - x x x }
|
|
||||||
{"geo" - - x x - }
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Theme Color Codes
|
|
||||||
|
|
||||||
@table(name display_name name_lower)
|
|
||||||
DF_ThemeTable:
|
|
||||||
{
|
|
||||||
{Null "Null" null }
|
|
||||||
{PlainText "Plain Text" plain_text }
|
|
||||||
{PlainBackground "Plain Background" plain_background }
|
|
||||||
{PlainBorder "Plain Border" plain_border }
|
|
||||||
{PlainOverlay "Plain Overlay" plain_overlay }
|
|
||||||
{CodeDefault "Code (Default)" code_default }
|
|
||||||
{CodeFunction "Code (Function)" code_function }
|
|
||||||
{CodeType "Code (Type)" code_type }
|
|
||||||
{CodeLocal "Code (Local)" code_local }
|
|
||||||
{CodeRegister "Code (Register)" code_register }
|
|
||||||
{CodeKeyword "Code (Keyword)" code_keyword }
|
|
||||||
{CodeSymbol "Code (Symbol)" code_symbol }
|
|
||||||
{CodeNumeric "Code (Numeric)" code_numeric }
|
|
||||||
{CodeString "Code (String)" code_string }
|
|
||||||
{CodeMeta "Code (Meta)" code_meta }
|
|
||||||
{CodeComment "Code (Comment)" code_comment }
|
|
||||||
{LineInfo0 "Line Info (0)" line_info_0 }
|
|
||||||
{LineInfo1 "Line Info (1)" line_info_1 }
|
|
||||||
{LineInfo2 "Line Info (2)" line_info_2 }
|
|
||||||
{LineInfo3 "Line Info (3)" line_info_3 }
|
|
||||||
{AltText "Alt Text" alt_text }
|
|
||||||
{AltBackground "Alt Background" alt_background }
|
|
||||||
{AltBorder "Alt Border" alt_border }
|
|
||||||
{AltOverlay "Alt Overlay" alt_overlay }
|
|
||||||
{TabInactive "Inactive Tab" tab_inactive }
|
|
||||||
{TabActive "Active Tab" tab_active }
|
|
||||||
{EntityBackground "Entity Background" entity_background }
|
|
||||||
{QueryBar "Query Bar" query_bar }
|
|
||||||
{WeakText "Weak Text" weak_text }
|
|
||||||
{TextSelection "Text Selection" text_selection }
|
|
||||||
{Cursor "Cursor" cursor }
|
|
||||||
{Highlight0 "Highlight (0)" highlight_0 }
|
|
||||||
{Highlight1 "Highlight (1)" highlight_1 }
|
|
||||||
{SuccessText "Success Text" success_text }
|
|
||||||
{SuccessBackground "Success Background" success_background }
|
|
||||||
{SuccessBorder "Success Border" success_border }
|
|
||||||
{FailureText "Failure Text" failure_text }
|
|
||||||
{FailureBackground "Failure Background" failure_background }
|
|
||||||
{FailureBorder "Failure Border" failure_border }
|
|
||||||
{ActionText "Action Text" action_text }
|
|
||||||
{ActionBackground "Action Background" action_background }
|
|
||||||
{ActionBorder "Action Border" action_border }
|
|
||||||
{DropSiteOverlay "Drop Site Overlay" drop_site_overlay }
|
|
||||||
{Thread0 "Thread (0)" thread_0 }
|
|
||||||
{Thread1 "Thread (1)" thread_1 }
|
|
||||||
{Thread2 "Thread (2)" thread_2 }
|
|
||||||
{Thread3 "Thread (3)" thread_3 }
|
|
||||||
{Thread4 "Thread (4)" thread_4 }
|
|
||||||
{Thread5 "Thread (5)" thread_5 }
|
|
||||||
{Thread6 "Thread (6)" thread_6 }
|
|
||||||
{Thread7 "Thread (7)" thread_7 }
|
|
||||||
{ThreadUnwound "Thread (Unwound)" thread_unwound }
|
|
||||||
{InactivePanelOverlay "Inactive Panel Overlay" inactive_panel_overlay }
|
|
||||||
{DropShadow "Drop Shadow" drop_shadow }
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Theme Color Version Remap Table
|
|
||||||
|
|
||||||
@table(old_name new_name)
|
|
||||||
DF_ThemeColorVersionRemapTable:
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Theme Presets
|
|
||||||
|
|
||||||
@table(name_upper name_lower display_string)
|
|
||||||
DF_ThemePresetTable:
|
|
||||||
{
|
|
||||||
{ DefaultDark default_dark "Default (Dark)" }
|
|
||||||
{ DefaultLight default_light "Default (Light)" }
|
|
||||||
{ VSDark vs_dark "VS (Dark)" }
|
|
||||||
{ VSLight vs_light "VS (Light)" }
|
|
||||||
{ SolarizedDark solarized_dark "Solarized (Dark)" }
|
|
||||||
{ SolarizedLight solarized_light "Solarized (Light)" }
|
|
||||||
{ HandmadeHero handmade_hero "Handmade Hero" }
|
|
||||||
{ FourCoder four_coder "4coder" }
|
|
||||||
{ FarManager far_manager "Far Manager" }
|
|
||||||
}
|
|
||||||
|
|
||||||
@table(name default_dark default_light vs_dark vs_light solarized_dark solarized_light handmade_hero four_coder far_manager)
|
|
||||||
DF_ThemePresetColorTable:
|
|
||||||
{
|
|
||||||
(null 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff )
|
|
||||||
(plain_text 0xe5e5e5ff 0x383838ff 0xe5e5e5ff 0x1e1e1eff 0xe5e5e5ff 0x1e1e1eff 0xa08563ff 0x90b080ff 0x00ffffff )
|
|
||||||
(plain_background 0x3333337f 0xedededfe 0x1e1e1eff 0xffffffff 0x002b36ff 0xfcf6e2ff 0x0c0c0cff 0x0c0c0cff 0x000082ff )
|
|
||||||
(plain_border 0xffffff19 0x0000001d 0xffffff19 0xcccedb1d 0xffffff19 0xcccedb1d 0xffffff19 0x181818a0 0xffffff19 )
|
|
||||||
(plain_overlay 0xffffff33 0x00000033 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 )
|
|
||||||
(code_default 0xe5e5e5ff 0x282828ff 0xd4d4d4ff 0x000000ff 0x839496ff 0x74878cff 0xa08563ff 0x90b080ff 0x00ffffff )
|
|
||||||
(code_function 0x7fcc99ff 0x2a7a45ff 0xdcdcaaff 0x74531fff 0x1c7dd1ff 0xc39d36ff 0xcc5735ff 0x7fcc99ff 0x49b2ffff )
|
|
||||||
(code_type 0x66b2e5ff 0x2c688fff 0x4ec9b0ff 0x2b91afff 0x1c7dd1ff 0x66b2e5ff 0xd8a51dff 0x66b2e5ff 0x49b2ffff )
|
|
||||||
(code_local 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff )
|
|
||||||
(code_register 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff )
|
|
||||||
(code_keyword 0xf7bf5eff 0xa47729ff 0x569cd6ff 0x0000ffff 0x63980fff 0xc39d36ff 0xac7b0bff 0xd08f20ff 0xff0000ff )
|
|
||||||
(code_symbol 0x994c32ff 0x6c2d18ff 0xb4b4b4ff 0x000000ff 0x839496ff 0x2e5256ff 0x994c32ff 0x994c32ff 0xffffffff )
|
|
||||||
(code_numeric 0x4ce54cff 0x2c7d2cff 0xb5cea8ff 0x000000ff 0xcb4b20ff 0x657b83ff 0x6b8e23ff 0x50ff30ff 0x2cff50ff )
|
|
||||||
(code_string 0xe5cc66ff 0xcc5a0fff 0xd69d85ff 0xc11515ff 0x2aa198ff 0x5ab4a9ff 0x6b8e23ff 0x50ff30ff 0xe5cc66ff )
|
|
||||||
(code_meta 0xe54c4cff 0x8a0c0cff 0x9b9b9bff 0x808080ff 0xe54c4cff 0xe54c4cff 0xdab98fff 0x50ff30ff 0xffff00ff )
|
|
||||||
(code_comment 0x7f7f7fff 0x7f7f7fff 0x6a9955ff 0x008000ff 0x7f7f7fff 0xadafb2ff 0x686868ff 0x2090f0ff 0x7f7f7fff )
|
|
||||||
(line_info_0 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f )
|
|
||||||
(line_info_1 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f )
|
|
||||||
(line_info_2 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f )
|
|
||||||
(line_info_3 0xcefd693f 0xcefd693f 0xcefd693f 0xcefd693f 0xcefd693f 0xcefd693f 0xcefd693f 0xcefd693f 0xcefd693f )
|
|
||||||
(alt_text 0xe5e5e5ff 0x535353ff 0xf1f1f1ff 0x535353ff 0xe5e5e5ff 0x535353ff 0xa08563ff 0x90b080ff 0x000000ff )
|
|
||||||
(alt_background 0x42474c7f 0xfefefebc 0x1b1b1cff 0xfefefebc 0x002b36ff 0xfcf6e2ff 0x0c0c0cff 0x0c0c0cff 0x008184ff )
|
|
||||||
(alt_border 0xffffff19 0xffffff19 0x333337ff 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 )
|
|
||||||
(alt_overlay 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 )
|
|
||||||
(tab_inactive 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f )
|
|
||||||
(tab_active 0xa87a4c99 0xc7a27dff 0x007accff 0x007accff 0x28515eff 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 )
|
|
||||||
(entity_background 0x4293cc99 0x4293cc99 0x4293cc99 0x4293cc99 0x4293cc99 0x4293cc99 0x4293cc99 0x4293cc99 0x4293cc99 )
|
|
||||||
(query_bar 0x8e2d4ccc 0xd76489cc 0x8e2d4ccc 0x8e2d4ccc 0x8e2d4ccc 0x8e2d4ccc 0x8e2d4ccc 0x8e2d4ccc 0x8e2d4ccc )
|
|
||||||
(weak_text 0xffffff7f 0x0000007f 0xffffff7f 0x0000007f 0xffffff7f 0x0000007f 0xa08563af 0x90b080af 0xffffff7f )
|
|
||||||
(text_selection 0x99ccff4c 0x7d98b34c 0x99ccff4c 0x7d98b34c 0x99ccff4c 0x7d98b34c 0x99ccff4c 0x99ccff4c 0x99ccff4c )
|
|
||||||
(cursor 0x66e566e5 0x101010ff 0x66e566e5 0x101010ff 0x66e566e5 0x101010ff 0x66e566e5 0x66e566e5 0x66e566e5 )
|
|
||||||
(highlight_0 0xb27219ff 0xb272189b 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff )
|
|
||||||
(highlight_1 0x327f19ff 0x327f19ff 0x327f19ff 0x327f19ff 0x327f19ff 0x327f19ff 0x327f19ff 0x327f19ff 0x327f19ff )
|
|
||||||
(success_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff )
|
|
||||||
(success_background 0x32b219ff 0x75db61ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff )
|
|
||||||
(success_border 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 )
|
|
||||||
(failure_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff )
|
|
||||||
(failure_background 0xb23219ff 0xf27961ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff )
|
|
||||||
(failure_border 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 )
|
|
||||||
(action_text 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff )
|
|
||||||
(action_background 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff )
|
|
||||||
(action_border 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 )
|
|
||||||
(drop_site_overlay 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c )
|
|
||||||
(thread_0 0xffcb7fff 0xad7c34ff 0xffcb7fff 0xad7c34ff 0xffcb7fff 0xad7c34ff 0xffcb7fff 0xffcb7fff 0xffcb7fff )
|
|
||||||
(thread_1 0xb2ff65ff 0x639b2aff 0xb2ff65ff 0x639b2aff 0xb2ff65ff 0x639b2aff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff )
|
|
||||||
(thread_2 0xff99e5ff 0xa94c91ff 0xff99e5ff 0xa94c91ff 0xff99e5ff 0xa94c91ff 0xff99e5ff 0xff99e5ff 0xff99e5ff )
|
|
||||||
(thread_3 0x6598ffff 0x305398ff 0x6598ffff 0x305398ff 0x6598ffff 0x305398ff 0x6598ffff 0x6598ffff 0x6598ffff )
|
|
||||||
(thread_4 0x65ffcbff 0x339574ff 0x65ffcbff 0x339574ff 0x65ffcbff 0x339574ff 0x65ffcbff 0x65ffcbff 0x65ffcbff )
|
|
||||||
(thread_5 0xff9819ff 0xbf7416ff 0xff9819ff 0xbf7416ff 0xff9819ff 0xbf7416ff 0xff9819ff 0xff9819ff 0xff9819ff )
|
|
||||||
(thread_6 0x9932ffff 0x57238bff 0x9932ffff 0x57238bff 0x9932ffff 0x57238bff 0x9932ffff 0x9932ffff 0x9932ffff )
|
|
||||||
(thread_7 0x65ff4cff 0x2a7e1cff 0x65ff4cff 0x2a7e1cff 0x65ff4cff 0x2a7e1cff 0x65ff4cff 0x65ff4cff 0x65ff4cff )
|
|
||||||
(thread_unwound 0xb2ccd8ff 0x236481ff 0xb2ccd8ff 0x236481ff 0xb2ccd8ff 0x236481ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff )
|
|
||||||
(inactive_panel_overlay 0x0000003f 0x0000000d 0x0000003f 0x0000000d 0x0000003f 0x0000000d 0x0000003f 0x0000003f 0x0000003f )
|
|
||||||
(drop_shadow 0x0000007f 0x0000003b 0x0000007f 0x0000003b 0x0000007f 0x0000003b 0x0000007f 0x0000007f 0x0000007f )
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Generators
|
|
||||||
|
|
||||||
//- rjf: enums
|
|
||||||
|
|
||||||
@enum DF_NameKind:
|
|
||||||
{
|
|
||||||
@expand(DF_NameKindTable, a) `$(a.name)`,
|
|
||||||
COUNT,
|
|
||||||
}
|
|
||||||
|
|
||||||
@enum DF_GfxViewKind:
|
|
||||||
{
|
|
||||||
@expand(DF_GfxViewTable a) `$(a.name)`,
|
|
||||||
COUNT,
|
|
||||||
}
|
|
||||||
|
|
||||||
@enum DF_ThemeColor:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemeTable a) `$(a.name)`,
|
|
||||||
COUNT,
|
|
||||||
}
|
|
||||||
|
|
||||||
@enum DF_ThemePreset:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetTable a) `$(a.name)`,
|
|
||||||
COUNT,
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: theme preset color tables
|
|
||||||
|
|
||||||
@data(String8) df_g_theme_preset_display_string_table:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetTable a) `str8_lit_comp("$(a.display_string)")`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(String8) df_g_theme_preset_code_string_table:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetTable a) `str8_lit_comp("$(a.name_lower)")`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__default_dark:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.default_dark))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__default_light:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.default_light))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__vs_dark:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.vs_dark))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__vs_light:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.vs_light))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__solarized_dark:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.solarized_dark))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__solarized_light:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.solarized_light))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__handmade_hero:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.handmade_hero))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__four_coder:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.four_coder))`,
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(Vec4F32) df_g_theme_preset_colors__far_manager:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetColorTable a) `rgba_from_u32_lit_comp($(a.far_manager))`;
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(`Vec4F32*`) df_g_theme_preset_colors_table:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemePresetTable a) `df_g_theme_preset_colors__$(a.name_lower)`,
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: cmd param slot -> view spec tables
|
|
||||||
|
|
||||||
@data(DF_CmdParamSlot) df_g_cmd_param_slot_2_view_spec_src_map:
|
|
||||||
{
|
|
||||||
@expand(DF_CmdParamSlot2ViewSpecMap a) `DF_CmdParamSlot_$(a.slot)`
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(String8) df_g_cmd_param_slot_2_view_spec_dst_map:
|
|
||||||
{
|
|
||||||
@expand(DF_CmdParamSlot2ViewSpecMap a) `str8_lit_comp("$(a.view_spec)")`
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(String8) df_g_cmd_param_slot_2_view_spec_cmd_map:
|
|
||||||
{
|
|
||||||
@expand(DF_CmdParamSlot2ViewSpecMap a) `str8_lit_comp("$(a.opt_cmd_spec)")`
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: default bindings table
|
|
||||||
|
|
||||||
@data(DF_StringBindingPair) df_g_default_binding_table:
|
|
||||||
{
|
|
||||||
@expand(DF_DefaultBindingTable a) ```{str8_lit_comp("$(a.name)"), {OS_Key_$(a.key), 0 $(a.ctrl != 0 -> `|OS_EventFlag_Ctrl`) $(a.shift != 0 -> `|OS_EventFlag_Shift`) $(a.alt != 0 -> `|OS_EventFlag_Alt`)}}```;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: binding version remap tables
|
|
||||||
|
|
||||||
@data(String8) df_g_binding_version_remap_old_name_table:
|
|
||||||
{
|
|
||||||
@expand(DF_BindingVersionRemapTable a) `str8_lit_comp("$(a.old_name)")`
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(String8) df_g_binding_version_remap_new_name_table:
|
|
||||||
{
|
|
||||||
@expand(DF_BindingVersionRemapTable a) `str8_lit_comp("$(a.new_name)")`
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: view hook forward declares
|
|
||||||
|
|
||||||
@gen
|
|
||||||
{
|
|
||||||
@expand(DF_GfxViewTable a) `DF_VIEW_SETUP_FUNCTION_DEF($(a.name));`;
|
|
||||||
@expand(DF_GfxViewTable a) `DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF($(a.name));`;
|
|
||||||
@expand(DF_GfxViewTable a) `DF_VIEW_CMD_FUNCTION_DEF($(a.name));`;
|
|
||||||
@expand(DF_GfxViewTable a) `DF_VIEW_UI_FUNCTION_DEF($(a.name));`;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: gfx view rule function forward declares
|
|
||||||
|
|
||||||
@gen
|
|
||||||
{
|
|
||||||
``;
|
|
||||||
@expand(DF_GfxViewRuleTable a)
|
|
||||||
`$(a.vr == "x" -> "DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
|
||||||
@expand(DF_GfxViewRuleTable a)
|
|
||||||
`$(a.ls == "x" -> "DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
|
||||||
@expand(DF_GfxViewRuleTable a)
|
|
||||||
`$(a.ru == "x" -> "DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
|
||||||
@expand(DF_GfxViewRuleTable a)
|
|
||||||
`$(a.bu == "x" -> "DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
|
||||||
@expand(DF_GfxViewRuleTable a)
|
|
||||||
`$(a.wu == "x" -> "DF_GFX_VIEW_RULE_WHOLE_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: gfx view rule tables
|
|
||||||
|
|
||||||
@data(DF_GfxViewRuleSpecInfo) @c_file df_g_gfx_view_rule_spec_info_table:
|
|
||||||
{
|
|
||||||
@expand(DF_GfxViewRuleTable a)
|
|
||||||
```{ str8_lit_comp("$(a.string)"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*$(a.vr == "x"))|(DF_GfxViewRuleSpecInfoFlag_LineStringize*$(a.ls == "x"))|(DF_GfxViewRuleSpecInfoFlag_RowUI*$(a.ru == "x"))|(DF_GfxViewRuleSpecInfoFlag_BlockUI*$(a.bu == "x")), $(a.vr == "x" -> "DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vr != "x" -> 0), $(a.ls == "x" -> "DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME("..a.name_lower..")") $(a.ls != "x" -> 0), $(a.ru == "x" -> "DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME("..a.name_lower..")") $(a.ru != "x" -> 0), $(a.bu == "x" -> "DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME("..a.name_lower..")") $(a.bu != "x" -> 0), $(a.wu == "x" -> "DF_GFX_VIEW_RULE_WHOLE_UI_FUNCTION_NAME("..a.name_lower..")") $(a.wu != "x" -> 0) }```;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: default view spec info table
|
|
||||||
|
|
||||||
@data(DF_ViewSpecInfo) df_g_gfx_view_kind_spec_info_table:
|
|
||||||
{
|
|
||||||
@expand(DF_GfxViewTable a) ```{(0|$(a.parameterized_by_entity)*DF_ViewSpecFlag_ParameterizedByEntity|$(a.can_serialize)*DF_ViewSpecFlag_CanSerialize|$(a.can_serialize_entity_path)*DF_ViewSpecFlag_CanSerializeEntityPath|$(a.can_filter)*DF_ViewSpecFlag_CanFilter|$(a.filter_is_code)*DF_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), DF_NameKind_$(a.name_kind), DF_IconKind_$(a.icon), DF_VIEW_SETUP_FUNCTION_NAME($(a.name)), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME($(a.name)), DF_VIEW_CMD_FUNCTION_NAME($(a.name)), DF_VIEW_UI_FUNCTION_NAME($(a.name))}```;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: theme color tables
|
|
||||||
|
|
||||||
@data(String8) df_g_theme_color_display_string_table:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemeTable a) `str8_lit_comp("$(a.display_name)")`
|
|
||||||
}
|
|
||||||
|
|
||||||
@data(String8) df_g_theme_color_cfg_string_table:
|
|
||||||
{
|
|
||||||
@expand(DF_ThemeTable a) `str8_lit_comp("$(a.name_lower)")`
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Help/Docs/README
|
|
||||||
|
|
||||||
@markdown
|
|
||||||
raddbg_readme:
|
|
||||||
{
|
|
||||||
@title "The RAD Debugger (ALPHA)";
|
|
||||||
@p "The RAD Debugger is a native, user-mode, multi-process, graphical debugger. It currently only supports local-machine Windows x64 debugging with PDBs, with plans to expand and port in the future.";
|
|
||||||
|
|
||||||
@subtitle "Getting Started";
|
|
||||||
@p "To launch the RAD Debugger with your executable and command line arguments, run `raddbg` from the command line like so:";
|
|
||||||
@p "```raddbg my_program.exe --foo --bar --baz```";
|
|
||||||
@p "For more information, see the 'Command-Line Usage' section.";
|
|
||||||
@p "Default keyboard shortcuts for common debugger controls include:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@p "**Ctrl + O**: Open Source Code File";
|
|
||||||
@p "**F10**: Step Over";
|
|
||||||
@p "**F11**: Step Into";
|
|
||||||
@p "**Shift + F11**: Step Out";
|
|
||||||
@p "**F5**: Run";
|
|
||||||
@p "**Ctrl + Shift + X**, or **Pause**: Halt All Processes";
|
|
||||||
@p "**Shift + F5**: Kill All Processes";
|
|
||||||
@p "**Shift + F6**: Attach To Process";
|
|
||||||
@p "**Ctrl + F**: Search For Text (Forwards)";
|
|
||||||
@p "**F9**: Toggle Breakpoint At Cursor";
|
|
||||||
@p "**Ctrl + Comma**: Focus Next Panel";
|
|
||||||
@p "**Ctrl + Shift + Comma**: Focus Previous Panel";
|
|
||||||
@p "**Ctrl + Shift + Alt + Arrow Key**: Focus Panel In Direction";
|
|
||||||
@p "**Ctrl + Tab**: Focus Next Tab";
|
|
||||||
@p "**Ctrl + Shift + Tab**: Focus Previous Tab";
|
|
||||||
@p "**Ctrl + W**: Close Tab";
|
|
||||||
@p "**F1**: Open Command Palette";
|
|
||||||
}
|
|
||||||
@p "For more information, see the 'Commands' section.";
|
|
||||||
@p "View rules can be used to visualize expressions differently in the watch window. Here are some examples:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@p "`array:16`: Visualize a pointer as pointing to a 16-element array.";
|
|
||||||
@p "`array:(count*2)`: Visualize a pointer as pointing to a `count*2`-element array.";
|
|
||||||
@p "`list:next`: Visualize a linked list flatly, where each node has a `next` pointer, which points to the next node in the list.";
|
|
||||||
@p "`hex`: Visualize numeric literals as base-16 (hexadecimal).";
|
|
||||||
@p "`dec`: Visualize numeric literals as base-10 (decimal).";
|
|
||||||
@p "`oct`: Visualize numeric literals as base-8 (octal).";
|
|
||||||
@p "`bin`: Visualize numeric literals as base-2 (binary).";
|
|
||||||
@p "`omit:(foo bar baz)`: Prohibits members named `foo`, `bar`, and `baz` from being displayed.";
|
|
||||||
@p "`only:(foo bar baz)`: Only allows members named `foo`, `bar`, and `baz` to be displayed.";
|
|
||||||
}
|
|
||||||
@p "Multiple view rules can be specified on one line, so they can be combined like so:";
|
|
||||||
@p "```list:next, hex, omit:next```";
|
|
||||||
@p "For more information, see the 'View Rules' section.";
|
|
||||||
|
|
||||||
@subtitle "Command-Line Usage";
|
|
||||||
@p "When run normally, either by launching through a file explorer or running from a command line without arguments, `raddbg` will open a new instance of the debugger. But it also supports a number of command line options for a number of other purposes. These options are specified with a `-` or `--` prefix, followed by the name of the option, and if the option requires a parameter, followed by a `:` or `=`, followed by the parameter's content. A list of the possible options follows:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@p "`--help` Displays a help menu which documents the possible command line options.";
|
|
||||||
@p "`--user:<path>` Specifies a path to the user file which the debugger should use instead of the default. The default user file is stored at `%appdata%/raddbg/default.raddbg_user`. For more information on user files, read the 'User & Profile Files' section.";
|
|
||||||
@p "`--profile:<path>` Specifies a path to the profile file which the debugger should use instead of the default. The default profile file is stored at `%appdata%/raddbg/default.raddbg_profile`. For more information on profile files, read the 'User & Profile Files' section.";
|
|
||||||
@p "`--auto_run` Specifies that the debugger should immediately run its selected targets upon launching.";
|
|
||||||
@p "`--auto_step` Specifies that the debugger should immediately step into its selected targets upon launching.";
|
|
||||||
//@p "`--ipc` Specifies that the launched debugger instance is for communicating a command to another instance of the debugger. In this mode, any non-argument command line contents will be used to express a command. For more information on commands, read the 'Commands' section. For more information on driving another debugger instance with this argument, read the 'Driving Another Debugger Instance' section."
|
|
||||||
}
|
|
||||||
@p "On the command line, non-options (meaning any command line arguments *not* prefixed with a `-` or `--`) can also be specified. with normal usage, they are interpreted as the command line for a target (see the 'Targets' section)."
|
|
||||||
// add when --ipc support is ready: "When driving another debugger instance (using the `--ipc` argument), this additional command line text is used to encode a debugger command.";
|
|
||||||
@p "The debugger will stop parsing `-` and `--` prefixes as arguments after seeing a standalone `--`, *or* after seeing the first non-option argument, when reading the command line left-to-right. Some examples of command line usage and their interpretations are below:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@p "`raddbg --foo --bar --a:b --c=d test.exe` All options are used to configure `raddbg`. `test.exe` is interpreted as a target executable. `b` is interpreted as the parameter for the `a` option. `d` is interpreted as the parameter for the `c` option.";
|
|
||||||
@p "`raddbg test.exe --foo --bar` `test.exe` is interpreted as a target executable. `--foo --bar` is interpreted as arguments for `test.exe`, and thus are *not* used to configure `raddbg`.";
|
|
||||||
@p "`raddbg -- test.exe` `test.exe` is interpreted as a target executable.";
|
|
||||||
//@p "`raddbg --ipc find_code_location \"c:/foo/bar/baz.c:123:1\"` `--ipc` configures `raddbg` to drive another instance of `raddbg`. The remainder of the text is interpreted as a command.";
|
|
||||||
@p "`raddbg \"C:/path with spaces/test.exe\" --foo --bar` A target is formed from the `test.exe` path, and `--foo --bar` are interpreted as arguments to the `test.exe` target.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@subtitle "Windows, Panels, & Tabs";
|
|
||||||
@p "Each opened *window* in the debugger frontend is subdivided into *panels*. Panels subdivide regions of their window without overlapping. Each panel can contain multiple *tabs*, and can have one tab selected at any time. Tabs can be dragged and dropped between panels. Each tab is used to view one of the many supported debugger interfaces, including source code, disassembly, memory, or watches. When a tab is selected, that interface will fill the tab's containing panel's region of the containing window.";
|
|
||||||
@p "There are no 'special' windows, panels, or tabs; the debugger is written such that the number of windows, each window's panel organization, and the placement and arrangement of tabs can all be organized in a large variety of ways.";
|
|
||||||
@p "A list of debugger interfaces, which can occupy tabs, are below:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@expand(DF_GfxViewTable a) @p "$(a.inc_in_docs -> '`'..a.display_string..'` '..a.docs_desc)";
|
|
||||||
}
|
|
||||||
|
|
||||||
@subtitle "Commands";
|
|
||||||
@p "The debugger is operated with *commands*. Commands may be manually executed in the debugger UI through the `Commands` menu (which you can open either in the `View` menu bar list, or by using the keybinding, which is F1 by default). Operations in the debugger UI are implemented with commands, so if it's ever unclear how to accomplish some operation through the UI, a useful fallback is searching for and running the command through the command menu.";
|
|
||||||
//@p "Commands are also how a debugger instance launched with `--ipc` may communicate with a primary debugger instance.";
|
|
||||||
//@p "A list of commands, how they're referred to textually (for the purposes of `--ipc` debugger instances), and their descriptions are below:";
|
|
||||||
@p "A list of commands and their descriptions are below:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@expand(DF_CoreCmdTable a) @p "$(a.lister_omit == 0 -> '`'..a.display_name..'` '..'(`'..a.string..'`) '..a.desc)";
|
|
||||||
}
|
|
||||||
|
|
||||||
@subtitle "Targets";
|
|
||||||
@p "A *target* is one executable and configuration for launching that executable, including command line arguments and working directory (the directory from which the executable is launched). Each target may also have a custom label (replaces the executable path when visualizing the target), and the name of a custom entry point function (when the default entry points - `main`, `WinMain`, etc. - are not desired when stepping into the program upon launch). The debugger can have several targets at once. Each target can also be enabled or disabled. Some operations work on all enabled targets - for instance, the `Run` or `Kill All` commands (standardly bound as F5 or Shift + F5). Enabling and disabling targets allows one to filter which targets are currently being worked with.";
|
|
||||||
@p "To add a target, you can run the `Add Target` command. A target is also created automatically from command line arguments - the rules for how this happens can be found in the `Command-Line Usage` section.";
|
|
||||||
@p "Targets created through command line usage are temporary, meaning they are not persistently saved across runs of the debugger. To change this, you can right click the command-line-created target in the `Targets` view, and click `Save To Profile`. After doing so, the target will be restored across runs, and will no longer need to be specified on the command-line.";
|
|
||||||
|
|
||||||
@subtitle "View Rules";
|
|
||||||
@p "*View Rules* are used to transform the way that evaluations in the debugger are visualized. An evaluation is produced by taking an expression string - for instance, the name of a variable - and using debug info and information from an attached process' live runtime (memory, registers, and so on) to interpret it.";
|
|
||||||
@p "Evaluations may be visualized in a variety of ways. A 64-bit unsigned integer may be visualized as a textual representation of the value with a radix of 10. A 32-bit floating-point value may be visualized as a textual representation of the value. An array of 32-bit floating-point values can be visualized as a list of textual representations of those values.";
|
|
||||||
@p "But all of these cases may be visualized in a number of other ways, as well. A 64-bit unsigned integer may be more usefully represented with a radix of 16, 8, or 2. An array of 32-bit floating-point values may encode the R, G, B, and A components of a color, or vertex positions for 3D geometry, or samples for a waveform. An array of bytes may encode raw pixel data for an image, or image data in a compressed format. A struct may have several members which are not useful to look at all the time. A struct may form the head of a linked list, and a flat linked list representation may be more preferable than the traditional watch view representation, which adds an additional layer of hierarchical nesting with the expansion of each 'next' pointer in a linked list. When designing the debugger, we felt that the traditional memory view and watch view representations of data in a debugged-process were not sufficient. View rules were added to the traditional watch view structure to allow per-row specification of extra visualization parameters.";
|
|
||||||
@p "View rules are specified with the name of a view rule, and depending on the view rule, a `:`, followed by parameters for the view rule. These parameters may be whitespace delimited, but importantly, multiple view rules may be specified per-row in a watch view. To explicitly separate the parameters of one view rule from the name of another - for instance, in a case like `array:16 bin`, where `bin` will not be interpreted as a view rule, but as a parameter of `array` - then commas and semicolons may be used to separate the two view rules (`array:16, bin`), or parentheses/braces/brackets may also be used to explicitly delimit the view rule parameters (`array:(16) bin`).";
|
|
||||||
@p "A list of currently-supported view rules are below:";
|
|
||||||
@unordered_list
|
|
||||||
{
|
|
||||||
@expand(DF_CoreViewRuleTable a) @p "$(a.docs == 'x' -> '`'..a.string..'` ('..a.display_name..') '..a.description)";
|
|
||||||
}
|
|
||||||
|
|
||||||
@subtitle "Breakpoints";
|
|
||||||
@p "Breakpoints interrupt execution of attached processes. They may be placed on specific code addresses, lines of source code, on specific symbol names. In the latter two cases, the higher level locations are resolved to code addresses. If there is no code associated with a line of source code, then the resolution path chooses to use the next closest line of source code in the same file. A symbol name breakpoint will only work if the symbol name is found within loaded debug info.";
|
|
||||||
@p "Breakpoints may have stop conditions attached to them. When a breakpoint is hit by a thread, before it stops execution, the stop condition is evaluated, and if it evaluates to a nonzero value, only then is execution stopped.";
|
|
||||||
@p "Each breakpoint has a hit count. Every time a breakpoint causes execution to stop, this counter is increased.";
|
|
||||||
@p "Processor breakpoints are not currently supported, but planned to be in the future.";
|
|
||||||
|
|
||||||
@subtitle "User & Profile Files";
|
|
||||||
@p "Applicable state controlling the debugger's appearance, behavior, targets, breakpoints, and other configurations is saved and reloaded across runs of the debugger through both *user files* and *profile files*. These files are auto-saved. These files are written in a textual format which can be hand-edited as necessary, but they're also continuously re-read and re-written by the debugger. By default, the debugger uses `%appdata%/raddbg/default.raddbg_user` for its user file path, and `%appdata%/raddbg/default.raddbg_profile` for its profile file path. These paths can be overridden on the command line (see the 'Command-Line Usage' section).";
|
|
||||||
@p "The *user file* defaultly stores file path maps, windows (including their preferred monitor, placement, and size), each window's panel layout and tabs, keybindings, theme colors, and fonts.";
|
|
||||||
@p "The *profile file* defaultly stores targets, breakpoints, watch pins, and exception code filters.";
|
|
||||||
@p "Because both can be hand-edited, however, if you want to store something normally stored in a user file in a profile file, or vice versa, this can be done by hand transferring the textual data from one file to another. There is no path in the debugger's UI to support this transfer, currently, although this is planned.";
|
|
||||||
|
|
||||||
//@subtitle "Driving Another Debugger Instance";
|
|
||||||
//@p "When the debugger is launched with the `--ipc` command-line argument, it does not launch another instance of the graphical debugger. Instead, it launches, sends a string encoding a command to a running instance of the graphical debugger, and then terminates. The set of commands which can be sent are identical to those which can be run from the debugger's UI itself, but these commands must be encoded textually (through the other command-line arguments). These commands are described in the 'Commands' section.";
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,49 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
#ifndef DF_VIEW_RULE_HOOKS_H
|
|
||||||
#define DF_VIEW_RULE_HOOKS_H
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Helper Types
|
|
||||||
|
|
||||||
typedef struct DF_BitmapTopologyInfo DF_BitmapTopologyInfo;
|
|
||||||
struct DF_BitmapTopologyInfo
|
|
||||||
{
|
|
||||||
U64 width;
|
|
||||||
U64 height;
|
|
||||||
R_Tex2DFormat fmt;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_GeoTopologyInfo DF_GeoTopologyInfo;
|
|
||||||
struct DF_GeoTopologyInfo
|
|
||||||
{
|
|
||||||
U64 index_count;
|
|
||||||
Rng1U64 vertices_vaddr_range;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_TxtTopologyInfo DF_TxtTopologyInfo;
|
|
||||||
struct DF_TxtTopologyInfo
|
|
||||||
{
|
|
||||||
TXT_LangKind lang;
|
|
||||||
U64 size_cap;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_DisasmTopologyInfo DF_DisasmTopologyInfo;
|
|
||||||
struct DF_DisasmTopologyInfo
|
|
||||||
{
|
|
||||||
Architecture arch;
|
|
||||||
U64 size_cap;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Helpers
|
|
||||||
|
|
||||||
internal Vec4F32 df_view_rule_hooks__rgba_from_eval(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_Entity *process);
|
|
||||||
internal void df_view_rule_hooks__eval_commit_rgba(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_CtrlCtx *ctrl_ctx, Vec4F32 rgba);
|
|
||||||
internal DF_BitmapTopologyInfo df_view_rule_hooks__bitmap_topology_info_from_cfg(DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg);
|
|
||||||
internal DF_GeoTopologyInfo df_view_rule_hooks__geo_topology_info_from_cfg(DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg);
|
|
||||||
internal DF_TxtTopologyInfo df_view_rule_hooks__txt_topology_info_from_cfg(DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg);
|
|
||||||
internal DF_DisasmTopologyInfo df_view_rule_hooks__disasm_topology_info_from_cfg(DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg);
|
|
||||||
|
|
||||||
#endif //DF_VIEW_RULE_HOOKS_H
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,463 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
#ifndef DEBUG_FRONTEND_VIEWS_H
|
|
||||||
#define DEBUG_FRONTEND_VIEWS_H
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: FileSystem @view_types
|
|
||||||
|
|
||||||
typedef enum DF_FileSortKind
|
|
||||||
{
|
|
||||||
DF_FileSortKind_Null,
|
|
||||||
DF_FileSortKind_Filename,
|
|
||||||
DF_FileSortKind_LastModified,
|
|
||||||
DF_FileSortKind_Size,
|
|
||||||
DF_FileSortKind_COUNT
|
|
||||||
}
|
|
||||||
DF_FileSortKind;
|
|
||||||
|
|
||||||
typedef struct DF_FileInfo DF_FileInfo;
|
|
||||||
struct DF_FileInfo
|
|
||||||
{
|
|
||||||
String8 filename;
|
|
||||||
FileProperties props;
|
|
||||||
FuzzyMatchRangeList match_ranges;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_FileInfoNode DF_FileInfoNode;
|
|
||||||
struct DF_FileInfoNode
|
|
||||||
{
|
|
||||||
DF_FileInfoNode *next;
|
|
||||||
DF_FileInfo file_info;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_FileSystemViewPathState DF_FileSystemViewPathState;
|
|
||||||
struct DF_FileSystemViewPathState
|
|
||||||
{
|
|
||||||
DF_FileSystemViewPathState *hash_next;
|
|
||||||
String8 normalized_path;
|
|
||||||
Vec2S64 cursor;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_FileSystemViewState DF_FileSystemViewState;
|
|
||||||
struct DF_FileSystemViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
U64 path_state_table_size;
|
|
||||||
DF_FileSystemViewPathState **path_state_table;
|
|
||||||
DF_FileSortKind sort_kind;
|
|
||||||
Side sort_side;
|
|
||||||
Arena *cached_files_arena;
|
|
||||||
String8 cached_files_path;
|
|
||||||
DF_FileSortKind cached_files_sort_kind;
|
|
||||||
Side cached_files_sort_side;
|
|
||||||
U64 cached_file_count;
|
|
||||||
DF_FileInfo *cached_files;
|
|
||||||
F32 col_pcts[3];
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Commands @view_types
|
|
||||||
|
|
||||||
typedef struct DF_CmdListerItem DF_CmdListerItem;
|
|
||||||
struct DF_CmdListerItem
|
|
||||||
{
|
|
||||||
DF_CmdSpec *cmd_spec;
|
|
||||||
U64 registrar_idx;
|
|
||||||
U64 ordering_idx;
|
|
||||||
FuzzyMatchRangeList name_match_ranges;
|
|
||||||
FuzzyMatchRangeList desc_match_ranges;
|
|
||||||
FuzzyMatchRangeList tags_match_ranges;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_CmdListerItemNode DF_CmdListerItemNode;
|
|
||||||
struct DF_CmdListerItemNode
|
|
||||||
{
|
|
||||||
DF_CmdListerItemNode *next;
|
|
||||||
DF_CmdListerItem item;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_CmdListerItemList DF_CmdListerItemList;
|
|
||||||
struct DF_CmdListerItemList
|
|
||||||
{
|
|
||||||
DF_CmdListerItemNode *first;
|
|
||||||
DF_CmdListerItemNode *last;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_CmdListerItemArray DF_CmdListerItemArray;
|
|
||||||
struct DF_CmdListerItemArray
|
|
||||||
{
|
|
||||||
DF_CmdListerItem *v;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: PendingEntity @view_types
|
|
||||||
|
|
||||||
typedef struct DF_PendingEntityViewState DF_PendingEntityViewState;
|
|
||||||
struct DF_PendingEntityViewState
|
|
||||||
{
|
|
||||||
Arena *deferred_cmd_arena;
|
|
||||||
DF_CmdList deferred_cmds;
|
|
||||||
DF_Handle pick_file_override_target;
|
|
||||||
Arena *complete_cfg_arena;
|
|
||||||
DF_CfgNode *complete_cfg_root;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: EntityLister @view_types
|
|
||||||
|
|
||||||
typedef struct DF_EntityListerItem DF_EntityListerItem;
|
|
||||||
struct DF_EntityListerItem
|
|
||||||
{
|
|
||||||
DF_Entity *entity;
|
|
||||||
FuzzyMatchRangeList name_match_ranges;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_EntityListerItemNode DF_EntityListerItemNode;
|
|
||||||
struct DF_EntityListerItemNode
|
|
||||||
{
|
|
||||||
DF_EntityListerItemNode *next;
|
|
||||||
DF_EntityListerItem item;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_EntityListerItemList DF_EntityListerItemList;
|
|
||||||
struct DF_EntityListerItemList
|
|
||||||
{
|
|
||||||
DF_EntityListerItemNode *first;
|
|
||||||
DF_EntityListerItemNode *last;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_EntityListerItemArray DF_EntityListerItemArray;
|
|
||||||
struct DF_EntityListerItemArray
|
|
||||||
{
|
|
||||||
DF_EntityListerItem *v;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: SystemProcesses @view_types
|
|
||||||
|
|
||||||
typedef struct DF_ProcessInfo DF_ProcessInfo;
|
|
||||||
struct DF_ProcessInfo
|
|
||||||
{
|
|
||||||
DMN_ProcessInfo info;
|
|
||||||
B32 is_attached;
|
|
||||||
FuzzyMatchRangeList attached_match_ranges;
|
|
||||||
FuzzyMatchRangeList name_match_ranges;
|
|
||||||
FuzzyMatchRangeList pid_match_ranges;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_ProcessInfoNode DF_ProcessInfoNode;
|
|
||||||
struct DF_ProcessInfoNode
|
|
||||||
{
|
|
||||||
DF_ProcessInfoNode *next;
|
|
||||||
DF_ProcessInfo info;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_ProcessInfoList DF_ProcessInfoList;
|
|
||||||
struct DF_ProcessInfoList
|
|
||||||
{
|
|
||||||
DF_ProcessInfoNode *first;
|
|
||||||
DF_ProcessInfoNode *last;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_ProcessInfoArray DF_ProcessInfoArray;
|
|
||||||
struct DF_ProcessInfoArray
|
|
||||||
{
|
|
||||||
DF_ProcessInfo *v;
|
|
||||||
U64 count;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Breakpoint @view_types
|
|
||||||
|
|
||||||
typedef struct DF_BreakpointViewState DF_BreakpointViewState;
|
|
||||||
struct DF_BreakpointViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
Vec2S32 selected_p;
|
|
||||||
F32 key_pct;
|
|
||||||
F32 val_pct;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Target @view_types
|
|
||||||
|
|
||||||
typedef struct DF_TargetViewState DF_TargetViewState;
|
|
||||||
struct DF_TargetViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
|
|
||||||
// rjf: pick file kind
|
|
||||||
DF_EntityKind pick_dst_kind;
|
|
||||||
|
|
||||||
// rjf: selection cursor
|
|
||||||
Vec2S64 cursor;
|
|
||||||
|
|
||||||
// rjf: text input state
|
|
||||||
TxtPt input_cursor;
|
|
||||||
TxtPt input_mark;
|
|
||||||
U8 input_buffer[1024];
|
|
||||||
U64 input_size;
|
|
||||||
B32 input_editing;
|
|
||||||
|
|
||||||
// rjf: table column pcts
|
|
||||||
F32 key_pct;
|
|
||||||
F32 value_pct;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: FilePathMap @view_types
|
|
||||||
|
|
||||||
typedef struct DF_FilePathMapViewState DF_FilePathMapViewState;
|
|
||||||
struct DF_FilePathMapViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
Vec2S64 cursor;
|
|
||||||
TxtPt input_cursor;
|
|
||||||
TxtPt input_mark;
|
|
||||||
U8 input_buffer[1024];
|
|
||||||
U64 input_size;
|
|
||||||
B32 input_editing;
|
|
||||||
DF_Handle pick_file_dst_map;
|
|
||||||
Side pick_file_dst_side;
|
|
||||||
F32 src_column_pct;
|
|
||||||
F32 dst_column_pct;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Modules @view_types
|
|
||||||
|
|
||||||
typedef struct DF_ModulesViewState DF_ModulesViewState;
|
|
||||||
struct DF_ModulesViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
DF_Handle selected_entity;
|
|
||||||
S64 selected_column;
|
|
||||||
B32 txt_editing;
|
|
||||||
TxtPt txt_cursor;
|
|
||||||
TxtPt txt_mark;
|
|
||||||
U8 txt_buffer[1024];
|
|
||||||
U64 txt_size;
|
|
||||||
DF_Handle pick_file_dst_entity;
|
|
||||||
F32 idx_col_pct;
|
|
||||||
F32 desc_col_pct;
|
|
||||||
F32 range_col_pct;
|
|
||||||
F32 dbg_col_pct;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Watch, Locals, Registers @view_types
|
|
||||||
|
|
||||||
typedef struct DF_EvalRoot DF_EvalRoot;
|
|
||||||
struct DF_EvalRoot
|
|
||||||
{
|
|
||||||
DF_EvalRoot *next;
|
|
||||||
DF_EvalRoot *prev;
|
|
||||||
U64 expr_buffer_string_size;
|
|
||||||
U64 expr_buffer_cap;
|
|
||||||
U8 *expr_buffer;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum DF_EvalWatchViewColumnKind
|
|
||||||
{
|
|
||||||
DF_EvalWatchViewColumnKind_Expr,
|
|
||||||
DF_EvalWatchViewColumnKind_Value,
|
|
||||||
DF_EvalWatchViewColumnKind_Type,
|
|
||||||
DF_EvalWatchViewColumnKind_ViewRule,
|
|
||||||
DF_EvalWatchViewColumnKind_COUNT
|
|
||||||
}
|
|
||||||
DF_EvalWatchViewColumnKind;
|
|
||||||
|
|
||||||
typedef enum DF_EvalWatchViewFillKind
|
|
||||||
{
|
|
||||||
DF_EvalWatchViewFillKind_Mutable,
|
|
||||||
DF_EvalWatchViewFillKind_Registers,
|
|
||||||
DF_EvalWatchViewFillKind_Locals,
|
|
||||||
DF_EvalWatchViewFillKind_Globals,
|
|
||||||
DF_EvalWatchViewFillKind_ThreadLocals,
|
|
||||||
DF_EvalWatchViewFillKind_Types,
|
|
||||||
DF_EvalWatchViewFillKind_Procedures,
|
|
||||||
DF_EvalWatchViewFillKind_COUNT
|
|
||||||
}
|
|
||||||
DF_EvalWatchViewFillKind;
|
|
||||||
|
|
||||||
typedef struct DF_EvalWatchViewPoint DF_EvalWatchViewPoint;
|
|
||||||
struct DF_EvalWatchViewPoint
|
|
||||||
{
|
|
||||||
DF_EvalWatchViewColumnKind column_kind;
|
|
||||||
DF_ExpandKey parent_key;
|
|
||||||
DF_ExpandKey key;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DF_EvalWatchViewState DF_EvalWatchViewState;
|
|
||||||
struct DF_EvalWatchViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
|
|
||||||
// rjf: fill kind (way that the contents of the watch view are computed)
|
|
||||||
DF_EvalWatchViewFillKind fill_kind;
|
|
||||||
|
|
||||||
// rjf; table cursor state
|
|
||||||
DF_EvalWatchViewPoint cursor;
|
|
||||||
DF_EvalWatchViewPoint mark;
|
|
||||||
|
|
||||||
// rjf: text input state
|
|
||||||
TxtPt input_cursor;
|
|
||||||
TxtPt input_mark;
|
|
||||||
U8 input_buffer[1024];
|
|
||||||
U64 input_size;
|
|
||||||
B32 input_editing;
|
|
||||||
|
|
||||||
// rjf: table column width state
|
|
||||||
F32 expr_column_pct;
|
|
||||||
F32 value_column_pct;
|
|
||||||
F32 type_column_pct;
|
|
||||||
F32 view_rule_column_pct;
|
|
||||||
|
|
||||||
// rjf: mutable fill-kind root expression state
|
|
||||||
DF_EvalRoot *first_root;
|
|
||||||
DF_EvalRoot *last_root;
|
|
||||||
DF_EvalRoot *first_free_root;
|
|
||||||
U64 root_count;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Code @view_types
|
|
||||||
|
|
||||||
typedef struct DF_CodeViewState DF_CodeViewState;
|
|
||||||
struct DF_CodeViewState
|
|
||||||
{
|
|
||||||
// rjf: stable state
|
|
||||||
B32 initialized;
|
|
||||||
TxtPt cursor;
|
|
||||||
TxtPt mark;
|
|
||||||
S64 preferred_column;
|
|
||||||
B32 drifted_for_search;
|
|
||||||
DF_Handle pick_file_override_target;
|
|
||||||
|
|
||||||
// rjf: per-frame command info
|
|
||||||
S64 goto_line_num;
|
|
||||||
B32 center_cursor;
|
|
||||||
B32 contain_cursor;
|
|
||||||
Arena *find_text_arena;
|
|
||||||
String8 find_text_fwd;
|
|
||||||
String8 find_text_bwd;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Disassembly @view_types
|
|
||||||
|
|
||||||
typedef struct DF_DisasmViewState DF_DisasmViewState;
|
|
||||||
struct DF_DisasmViewState
|
|
||||||
{
|
|
||||||
// rjf: stable state
|
|
||||||
B32 initialized;
|
|
||||||
DF_Handle process;
|
|
||||||
U64 base_vaddr;
|
|
||||||
TxtPt cursor;
|
|
||||||
TxtPt mark;
|
|
||||||
S64 preferred_column;
|
|
||||||
B32 drifted_for_search;
|
|
||||||
DASM_StyleFlags style_flags;
|
|
||||||
|
|
||||||
// rjf: per-frame command info
|
|
||||||
S64 goto_line_num;
|
|
||||||
U64 goto_vaddr;
|
|
||||||
B32 center_cursor;
|
|
||||||
B32 contain_cursor;
|
|
||||||
Arena *find_text_arena;
|
|
||||||
String8 find_text_fwd;
|
|
||||||
String8 find_text_bwd;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Memory @view_types
|
|
||||||
|
|
||||||
typedef struct DF_MemoryViewState DF_MemoryViewState;
|
|
||||||
struct DF_MemoryViewState
|
|
||||||
{
|
|
||||||
B32 initialized;
|
|
||||||
|
|
||||||
// rjf: last-viewed-memory cache
|
|
||||||
Arena *last_viewed_memory_cache_arena;
|
|
||||||
U8 *last_viewed_memory_cache_buffer;
|
|
||||||
Rng1U64 last_viewed_memory_cache_range;
|
|
||||||
U64 last_viewed_memory_cache_memgen_idx;
|
|
||||||
|
|
||||||
// rjf: control state
|
|
||||||
U64 cursor;
|
|
||||||
U64 mark;
|
|
||||||
|
|
||||||
// rjf: organization state
|
|
||||||
U64 num_columns;
|
|
||||||
U64 bytes_per_cell;
|
|
||||||
|
|
||||||
// rjf: command pass-through data
|
|
||||||
B32 center_cursor;
|
|
||||||
B32 contain_cursor;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Quick Sort Comparisons
|
|
||||||
|
|
||||||
internal int df_qsort_compare_file_info__default(DF_FileInfo *a, DF_FileInfo *b);
|
|
||||||
internal int df_qsort_compare_file_info__default_filtered(DF_FileInfo *a, DF_FileInfo *b);
|
|
||||||
internal int df_qsort_compare_file_info__filename(DF_FileInfo *a, DF_FileInfo *b);
|
|
||||||
internal int df_qsort_compare_file_info__last_modified(DF_FileInfo *a, DF_FileInfo *b);
|
|
||||||
internal int df_qsort_compare_file_info__size(DF_FileInfo *a, DF_FileInfo *b);
|
|
||||||
internal int df_qsort_compare_process_info(DF_ProcessInfo *a, DF_ProcessInfo *b);
|
|
||||||
internal int df_qsort_compare_cmd_lister__strength(DF_CmdListerItem *a, DF_CmdListerItem *b);
|
|
||||||
internal int df_qsort_compare_entity_lister__strength(DF_EntityListerItem *a, DF_EntityListerItem *b);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Command Lister
|
|
||||||
|
|
||||||
internal DF_CmdListerItemList df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle);
|
|
||||||
internal DF_CmdListerItemArray df_cmd_lister_item_array_from_list(Arena *arena, DF_CmdListerItemList list);
|
|
||||||
internal void df_cmd_lister_item_array_sort_by_strength__in_place(DF_CmdListerItemArray array);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: System Process Lister
|
|
||||||
|
|
||||||
internal DF_ProcessInfoList df_process_info_list_from_query(Arena *arena, String8 query);
|
|
||||||
internal DF_ProcessInfoArray df_process_info_array_from_list(Arena *arena, DF_ProcessInfoList list);
|
|
||||||
internal void df_process_info_array_sort_by_strength__in_place(DF_ProcessInfoArray array);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Entity Lister
|
|
||||||
|
|
||||||
internal DF_EntityListerItemList df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_EntityFlags omit_flags, String8 needle);
|
|
||||||
internal DF_EntityListerItemArray df_entity_lister_item_array_from_list(Arena *arena, DF_EntityListerItemList list);
|
|
||||||
internal void df_entity_lister_item_array_sort_by_strength__in_place(DF_EntityListerItemArray array);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Eval/Watch Views
|
|
||||||
|
|
||||||
//- rjf: eval watch view instance -> eval view key
|
|
||||||
internal DF_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_EvalWatchViewState *ewv);
|
|
||||||
|
|
||||||
//- rjf: root allocation/deallocation/mutation
|
|
||||||
internal DF_EvalRoot * df_eval_root_alloc(DF_View *view, DF_EvalWatchViewState *ews);
|
|
||||||
internal void df_eval_root_release(DF_EvalWatchViewState *ews, DF_EvalRoot *root);
|
|
||||||
internal void df_eval_root_equip_string(DF_EvalRoot *root, String8 string);
|
|
||||||
internal DF_EvalRoot * df_eval_root_from_string(DF_EvalWatchViewState *ews, String8 string);
|
|
||||||
internal DF_EvalRoot * df_eval_root_from_expand_key(DF_EvalWatchViewState *ews, DF_EvalView *eval_view, DF_ExpandKey expand_key);
|
|
||||||
internal String8 df_string_from_eval_root(DF_EvalRoot *root);
|
|
||||||
internal DF_ExpandKey df_parent_expand_key_from_eval_root(DF_EvalRoot *root);
|
|
||||||
internal DF_ExpandKey df_expand_key_from_eval_root(DF_EvalRoot *root);
|
|
||||||
|
|
||||||
//- rjf: windowed watch tree visualization
|
|
||||||
internal DF_EvalVizBlockList df_eval_viz_block_list_from_watch_view_state(Arena *arena, DBGI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_View *view, DF_EvalWatchViewState *ews);
|
|
||||||
|
|
||||||
//- rjf: eval/watch views main hooks
|
|
||||||
internal void df_eval_watch_view_init(DF_EvalWatchViewState *ewv, DF_View *view, DF_EvalWatchViewFillKind fill_kind);
|
|
||||||
internal void df_eval_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalWatchViewState *ewv, DF_CmdList *cmds);
|
|
||||||
internal void df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalWatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect);
|
|
||||||
|
|
||||||
#endif // DEBUG_FRONTEND_VIEWS_H
|
|
||||||
@@ -1,885 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
//- GENERATED CODE
|
|
||||||
|
|
||||||
C_LINKAGE_BEGIN
|
|
||||||
String8 df_g_theme_preset_display_string_table[9] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("Default (Dark)"),
|
|
||||||
str8_lit_comp("Default (Light)"),
|
|
||||||
str8_lit_comp("VS (Dark)"),
|
|
||||||
str8_lit_comp("VS (Light)"),
|
|
||||||
str8_lit_comp("Solarized (Dark)"),
|
|
||||||
str8_lit_comp("Solarized (Light)"),
|
|
||||||
str8_lit_comp("Handmade Hero"),
|
|
||||||
str8_lit_comp("4coder"),
|
|
||||||
str8_lit_comp("Far Manager"),
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_theme_preset_code_string_table[9] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("default_dark"),
|
|
||||||
str8_lit_comp("default_light"),
|
|
||||||
str8_lit_comp("vs_dark"),
|
|
||||||
str8_lit_comp("vs_light"),
|
|
||||||
str8_lit_comp("solarized_dark"),
|
|
||||||
str8_lit_comp("solarized_light"),
|
|
||||||
str8_lit_comp("handmade_hero"),
|
|
||||||
str8_lit_comp("four_coder"),
|
|
||||||
str8_lit_comp("far_manager"),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__default_dark[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x3333337f),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x7fcc99ff),
|
|
||||||
rgba_from_u32_lit_comp(0x66b2e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0xf7bf5eff),
|
|
||||||
rgba_from_u32_lit_comp(0x994c32ff),
|
|
||||||
rgba_from_u32_lit_comp(0x4ce54cff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5cc66ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe54c4cff),
|
|
||||||
rgba_from_u32_lit_comp(0x7f7f7fff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xa87a4c99),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff7f),
|
|
||||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
|
||||||
rgba_from_u32_lit_comp(0x66e566e5),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6598ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ffcbff),
|
|
||||||
rgba_from_u32_lit_comp(0xff9819ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9932ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003f),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__default_light[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x383838ff),
|
|
||||||
rgba_from_u32_lit_comp(0xedededfe),
|
|
||||||
rgba_from_u32_lit_comp(0x0000001d),
|
|
||||||
rgba_from_u32_lit_comp(0x00000033),
|
|
||||||
rgba_from_u32_lit_comp(0x282828ff),
|
|
||||||
rgba_from_u32_lit_comp(0x2a7a45ff),
|
|
||||||
rgba_from_u32_lit_comp(0x2c688fff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0xa47729ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6c2d18ff),
|
|
||||||
rgba_from_u32_lit_comp(0x2c7d2cff),
|
|
||||||
rgba_from_u32_lit_comp(0xcc5a0fff),
|
|
||||||
rgba_from_u32_lit_comp(0x8a0c0cff),
|
|
||||||
rgba_from_u32_lit_comp(0x7f7f7fff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0x535353ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfefefebc),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xc7a27dff),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0xd76489cc),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
rgba_from_u32_lit_comp(0x7d98b34c),
|
|
||||||
rgba_from_u32_lit_comp(0x101010ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb272189b),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x75db61ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xf27961ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xad7c34ff),
|
|
||||||
rgba_from_u32_lit_comp(0x639b2aff),
|
|
||||||
rgba_from_u32_lit_comp(0xa94c91ff),
|
|
||||||
rgba_from_u32_lit_comp(0x305398ff),
|
|
||||||
rgba_from_u32_lit_comp(0x339574ff),
|
|
||||||
rgba_from_u32_lit_comp(0xbf7416ff),
|
|
||||||
rgba_from_u32_lit_comp(0x57238bff),
|
|
||||||
rgba_from_u32_lit_comp(0x2a7e1cff),
|
|
||||||
rgba_from_u32_lit_comp(0x236481ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000000d),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003b),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__vs_dark[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x1e1e1eff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xd4d4d4ff),
|
|
||||||
rgba_from_u32_lit_comp(0xdcdcaaff),
|
|
||||||
rgba_from_u32_lit_comp(0x4ec9b0ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0x569cd6ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb4b4b4ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb5cea8ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd69d85ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9b9b9bff),
|
|
||||||
rgba_from_u32_lit_comp(0x6a9955ff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0xf1f1f1ff),
|
|
||||||
rgba_from_u32_lit_comp(0x1b1b1cff),
|
|
||||||
rgba_from_u32_lit_comp(0x333337ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0x007accff),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff7f),
|
|
||||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
|
||||||
rgba_from_u32_lit_comp(0x66e566e5),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6598ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ffcbff),
|
|
||||||
rgba_from_u32_lit_comp(0xff9819ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9932ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003f),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__vs_light[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x1e1e1eff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0xcccedb1d),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x000000ff),
|
|
||||||
rgba_from_u32_lit_comp(0x74531fff),
|
|
||||||
rgba_from_u32_lit_comp(0x2b91afff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x000000ff),
|
|
||||||
rgba_from_u32_lit_comp(0x000000ff),
|
|
||||||
rgba_from_u32_lit_comp(0xc11515ff),
|
|
||||||
rgba_from_u32_lit_comp(0x808080ff),
|
|
||||||
rgba_from_u32_lit_comp(0x008000ff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0x535353ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfefefebc),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0x007accff),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
rgba_from_u32_lit_comp(0x7d98b34c),
|
|
||||||
rgba_from_u32_lit_comp(0x101010ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xad7c34ff),
|
|
||||||
rgba_from_u32_lit_comp(0x639b2aff),
|
|
||||||
rgba_from_u32_lit_comp(0xa94c91ff),
|
|
||||||
rgba_from_u32_lit_comp(0x305398ff),
|
|
||||||
rgba_from_u32_lit_comp(0x339574ff),
|
|
||||||
rgba_from_u32_lit_comp(0xbf7416ff),
|
|
||||||
rgba_from_u32_lit_comp(0x57238bff),
|
|
||||||
rgba_from_u32_lit_comp(0x2a7e1cff),
|
|
||||||
rgba_from_u32_lit_comp(0x236481ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000000d),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003b),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__solarized_dark[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x002b36ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x839496ff),
|
|
||||||
rgba_from_u32_lit_comp(0x1c7dd1ff),
|
|
||||||
rgba_from_u32_lit_comp(0x1c7dd1ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0x63980fff),
|
|
||||||
rgba_from_u32_lit_comp(0x839496ff),
|
|
||||||
rgba_from_u32_lit_comp(0xcb4b20ff),
|
|
||||||
rgba_from_u32_lit_comp(0x2aa198ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe54c4cff),
|
|
||||||
rgba_from_u32_lit_comp(0x7f7f7fff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x002b36ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0x28515eff),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff7f),
|
|
||||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
|
||||||
rgba_from_u32_lit_comp(0x66e566e5),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6598ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ffcbff),
|
|
||||||
rgba_from_u32_lit_comp(0xff9819ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9932ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003f),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__solarized_light[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x1e1e1eff),
|
|
||||||
rgba_from_u32_lit_comp(0xfcf6e2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xcccedb1d),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x74878cff),
|
|
||||||
rgba_from_u32_lit_comp(0xc39d36ff),
|
|
||||||
rgba_from_u32_lit_comp(0x66b2e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0xc39d36ff),
|
|
||||||
rgba_from_u32_lit_comp(0x2e5256ff),
|
|
||||||
rgba_from_u32_lit_comp(0x657b83ff),
|
|
||||||
rgba_from_u32_lit_comp(0x5ab4a9ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe54c4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xadafb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0x535353ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfcf6e2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xa87a4c99),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
rgba_from_u32_lit_comp(0x7d98b34c),
|
|
||||||
rgba_from_u32_lit_comp(0x101010ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xad7c34ff),
|
|
||||||
rgba_from_u32_lit_comp(0x639b2aff),
|
|
||||||
rgba_from_u32_lit_comp(0xa94c91ff),
|
|
||||||
rgba_from_u32_lit_comp(0x305398ff),
|
|
||||||
rgba_from_u32_lit_comp(0x339574ff),
|
|
||||||
rgba_from_u32_lit_comp(0xbf7416ff),
|
|
||||||
rgba_from_u32_lit_comp(0x57238bff),
|
|
||||||
rgba_from_u32_lit_comp(0x2a7e1cff),
|
|
||||||
rgba_from_u32_lit_comp(0x236481ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000000d),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003b),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__handmade_hero[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0xa08563ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0c0c0cff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xa08563ff),
|
|
||||||
rgba_from_u32_lit_comp(0xcc5735ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd8a51dff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0xac7b0bff),
|
|
||||||
rgba_from_u32_lit_comp(0x994c32ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6b8e23ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6b8e23ff),
|
|
||||||
rgba_from_u32_lit_comp(0xdab98fff),
|
|
||||||
rgba_from_u32_lit_comp(0x686868ff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0xa08563ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0c0c0cff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xa87a4c99),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0xa08563af),
|
|
||||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
|
||||||
rgba_from_u32_lit_comp(0x66e566e5),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6598ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ffcbff),
|
|
||||||
rgba_from_u32_lit_comp(0xff9819ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9932ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003f),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__four_coder[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x90b080ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0c0c0cff),
|
|
||||||
rgba_from_u32_lit_comp(0x181818a0),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x90b080ff),
|
|
||||||
rgba_from_u32_lit_comp(0x7fcc99ff),
|
|
||||||
rgba_from_u32_lit_comp(0x66b2e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd08f20ff),
|
|
||||||
rgba_from_u32_lit_comp(0x994c32ff),
|
|
||||||
rgba_from_u32_lit_comp(0x50ff30ff),
|
|
||||||
rgba_from_u32_lit_comp(0x50ff30ff),
|
|
||||||
rgba_from_u32_lit_comp(0x50ff30ff),
|
|
||||||
rgba_from_u32_lit_comp(0x2090f0ff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0x90b080ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0c0c0cff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xa87a4c99),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0x90b080af),
|
|
||||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
|
||||||
rgba_from_u32_lit_comp(0x66e566e5),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6598ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ffcbff),
|
|
||||||
rgba_from_u32_lit_comp(0xff9819ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9932ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003f),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32 df_g_theme_preset_colors__far_manager[54] =
|
|
||||||
{
|
|
||||||
rgba_from_u32_lit_comp(0xff00ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x00ffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x000082ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x00ffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x49b2ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x49b2ffff),
|
|
||||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
|
||||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff0000ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x2cff50ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5cc66ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffff00ff),
|
|
||||||
rgba_from_u32_lit_comp(0x7f7f7fff),
|
|
||||||
rgba_from_u32_lit_comp(0x99503d3f),
|
|
||||||
rgba_from_u32_lit_comp(0xfe82493f),
|
|
||||||
rgba_from_u32_lit_comp(0xffba173f),
|
|
||||||
rgba_from_u32_lit_comp(0xcefd693f),
|
|
||||||
rgba_from_u32_lit_comp(0x000000ff),
|
|
||||||
rgba_from_u32_lit_comp(0x008184ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff19),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0x42474c7f),
|
|
||||||
rgba_from_u32_lit_comp(0xa87a4c99),
|
|
||||||
rgba_from_u32_lit_comp(0x4293cc99),
|
|
||||||
rgba_from_u32_lit_comp(0x8e2d4ccc),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff7f),
|
|
||||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
|
||||||
rgba_from_u32_lit_comp(0x66e566e5),
|
|
||||||
rgba_from_u32_lit_comp(0xb27219ff),
|
|
||||||
rgba_from_u32_lit_comp(0x327f19ff),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x32b219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0xb23219ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffffff),
|
|
||||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff33),
|
|
||||||
rgba_from_u32_lit_comp(0xffffff0c),
|
|
||||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
|
||||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
|
||||||
rgba_from_u32_lit_comp(0x6598ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ffcbff),
|
|
||||||
rgba_from_u32_lit_comp(0xff9819ff),
|
|
||||||
rgba_from_u32_lit_comp(0x9932ffff),
|
|
||||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
|
||||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
|
||||||
rgba_from_u32_lit_comp(0x0000003f),
|
|
||||||
rgba_from_u32_lit_comp(0x0000007f),
|
|
||||||
};
|
|
||||||
|
|
||||||
Vec4F32* df_g_theme_preset_colors_table[9] =
|
|
||||||
{
|
|
||||||
df_g_theme_preset_colors__default_dark,
|
|
||||||
df_g_theme_preset_colors__default_light,
|
|
||||||
df_g_theme_preset_colors__vs_dark,
|
|
||||||
df_g_theme_preset_colors__vs_light,
|
|
||||||
df_g_theme_preset_colors__solarized_dark,
|
|
||||||
df_g_theme_preset_colors__solarized_light,
|
|
||||||
df_g_theme_preset_colors__handmade_hero,
|
|
||||||
df_g_theme_preset_colors__four_coder,
|
|
||||||
df_g_theme_preset_colors__far_manager,
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_CmdParamSlot df_g_cmd_param_slot_2_view_spec_src_map[7] =
|
|
||||||
{
|
|
||||||
DF_CmdParamSlot_Entity,
|
|
||||||
DF_CmdParamSlot_EntityList,
|
|
||||||
DF_CmdParamSlot_FilePath,
|
|
||||||
DF_CmdParamSlot_CmdSpec,
|
|
||||||
DF_CmdParamSlot_ID,
|
|
||||||
DF_CmdParamSlot_String,
|
|
||||||
DF_CmdParamSlot_String,
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_cmd_param_slot_2_view_spec_dst_map[7] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("entity_lister"),
|
|
||||||
str8_lit_comp("entity_lister"),
|
|
||||||
str8_lit_comp("file_system"),
|
|
||||||
str8_lit_comp("commands"),
|
|
||||||
str8_lit_comp("system_processes"),
|
|
||||||
str8_lit_comp("symbol_lister"),
|
|
||||||
str8_lit_comp("symbol_lister"),
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_cmd_param_slot_2_view_spec_cmd_map[7] =
|
|
||||||
{
|
|
||||||
str8_lit_comp(""),
|
|
||||||
str8_lit_comp(""),
|
|
||||||
str8_lit_comp(""),
|
|
||||||
str8_lit_comp(""),
|
|
||||||
str8_lit_comp(""),
|
|
||||||
str8_lit_comp("goto_name"),
|
|
||||||
str8_lit_comp("function_breakpoint"),
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_StringBindingPair df_g_default_binding_table[97] =
|
|
||||||
{
|
|
||||||
{str8_lit_comp("kill_all"), {OS_Key_F5, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("step_into_inst"), {OS_Key_F11, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("step_over_inst"), {OS_Key_F10, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("step_out"), {OS_Key_F11, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("halt"), {OS_Key_X, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("halt"), {OS_Key_Pause, 0 }},
|
|
||||||
{str8_lit_comp("soft_halt_refresh"), {OS_Key_R, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("run"), {OS_Key_F5, 0 }},
|
|
||||||
{str8_lit_comp("restart"), {OS_Key_F5, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("step_into"), {OS_Key_F11, 0 }},
|
|
||||||
{str8_lit_comp("step_over"), {OS_Key_F10, 0 }},
|
|
||||||
{str8_lit_comp("run_to_cursor"), {OS_Key_F10, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("set_next_statement"), {OS_Key_F10, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("inc_ui_font_scale"), {OS_Key_Equal, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("dec_ui_font_scale"), {OS_Key_Minus, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("inc_code_font_scale"), {OS_Key_Equal, 0 |OS_EventFlag_Shift |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("dec_code_font_scale"), {OS_Key_Minus, 0 |OS_EventFlag_Shift |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("window"), {OS_Key_N, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("toggle_fullscreen"), {OS_Key_Return, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("new_panel_right"), {OS_Key_P, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("new_panel_down"), {OS_Key_Minus, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("rotate_panel_columns"), {OS_Key_2, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("next_panel"), {OS_Key_Comma, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("prev_panel"), {OS_Key_Comma, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("focus_panel_right"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("focus_panel_left"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("focus_panel_up"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("focus_panel_down"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("close_panel"), {OS_Key_P, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("next_tab"), {OS_Key_PageDown, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("prev_tab"), {OS_Key_PageUp, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("next_tab"), {OS_Key_Tab, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("prev_tab"), {OS_Key_Tab, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_tab_right"), {OS_Key_PageDown, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_tab_left"), {OS_Key_PageUp, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("close_tab"), {OS_Key_W, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("tab_bar_top"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("tab_bar_bottom"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("open"), {OS_Key_O, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("reload_active"), {OS_Key_R, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("switch"), {OS_Key_I, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("switch_to_partner_file"), {OS_Key_O, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("load_user"), {OS_Key_O, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("load_profile"), {OS_Key_O, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("move_left"), {OS_Key_Left, 0 }},
|
|
||||||
{str8_lit_comp("move_right"), {OS_Key_Right, 0 }},
|
|
||||||
{str8_lit_comp("move_up"), {OS_Key_Up, 0 }},
|
|
||||||
{str8_lit_comp("move_down"), {OS_Key_Down, 0 }},
|
|
||||||
{str8_lit_comp("move_left_select"), {OS_Key_Left, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_right_select"), {OS_Key_Right, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_up_select"), {OS_Key_Up, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_down_select"), {OS_Key_Down, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_left_chunk"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("move_right_chunk"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("move_up_chunk"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("move_down_chunk"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("move_up_page"), {OS_Key_PageUp, 0 }},
|
|
||||||
{str8_lit_comp("move_down_page"), {OS_Key_PageDown, 0 }},
|
|
||||||
{str8_lit_comp("move_up_whole"), {OS_Key_Home, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("move_down_whole"), {OS_Key_End, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("move_left_chunk_select"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_right_chunk_select"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_up_chunk_select"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_down_chunk_select"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_up_page_select"), {OS_Key_PageUp, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_down_page_select"), {OS_Key_PageDown, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_up_whole_select"), {OS_Key_Home, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_down_whole_select"), {OS_Key_End, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_home"), {OS_Key_Home, 0 }},
|
|
||||||
{str8_lit_comp("move_end"), {OS_Key_End, 0 }},
|
|
||||||
{str8_lit_comp("move_home_select"), {OS_Key_Home, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("move_end_select"), {OS_Key_End, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("select_all"), {OS_Key_A, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("delete_single"), {OS_Key_Delete, 0 }},
|
|
||||||
{str8_lit_comp("delete_chunk"), {OS_Key_Delete, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("backspace_single"), {OS_Key_Backspace, 0 }},
|
|
||||||
{str8_lit_comp("backspace_chunk"), {OS_Key_Backspace, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("copy"), {OS_Key_C, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("cut"), {OS_Key_X, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("paste"), {OS_Key_V, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("insert_text"), {OS_Key_Null, 0 }},
|
|
||||||
{str8_lit_comp("goto_line"), {OS_Key_G, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("goto_address"), {OS_Key_G, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("find_text_forward"), {OS_Key_F, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("find_text_backward"), {OS_Key_R, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("find_next"), {OS_Key_F3, 0 }},
|
|
||||||
{str8_lit_comp("find_prev"), {OS_Key_F3, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("find_selected_thread"), {OS_Key_F4, 0 }},
|
|
||||||
{str8_lit_comp("goto_name"), {OS_Key_J, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("goto_name_at_cursor"), {OS_Key_F12, 0 }},
|
|
||||||
{str8_lit_comp("toggle_watch_expr_at_cursor"), {OS_Key_W, 0 |OS_EventFlag_Alt}},
|
|
||||||
{str8_lit_comp("toggle_watch_pin_at_cursor"), {OS_Key_F9, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("toggle_breakpoint_cursor"), {OS_Key_F9, 0 }},
|
|
||||||
{str8_lit_comp("add_target"), {OS_Key_T, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("attach"), {OS_Key_F6, 0 |OS_EventFlag_Shift }},
|
|
||||||
{str8_lit_comp("filter"), {OS_Key_Slash, 0 |OS_EventFlag_Ctrl }},
|
|
||||||
{str8_lit_comp("run_command"), {OS_Key_F1, 0 }},
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_binding_version_remap_old_name_table[3] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("commands"),
|
|
||||||
str8_lit_comp("load_user"),
|
|
||||||
str8_lit_comp("load_profile"),
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_binding_version_remap_new_name_table[3] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("run_command"),
|
|
||||||
str8_lit_comp("open_user"),
|
|
||||||
str8_lit_comp("open_profile"),
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_GfxViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[14] =
|
|
||||||
{
|
|
||||||
{ str8_lit_comp("array"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, 0, 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("list"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(list) , 0, 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("dec"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(dec) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("bin"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(bin) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("oct"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(oct) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("hex"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(hex) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("only"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(only) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(only) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("omit"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(omit) , DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(omit) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("no_addr"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(no_addr) , 0, 0, 0 },
|
|
||||||
{ str8_lit_comp("rgba"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(rgba) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(rgba) , 0 },
|
|
||||||
{ str8_lit_comp("text"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(text) , 0 },
|
|
||||||
{ str8_lit_comp("disasm"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(disasm) , 0 },
|
|
||||||
{ str8_lit_comp("bitmap"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(bitmap) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(bitmap) , DF_GFX_VIEW_RULE_WHOLE_UI_FUNCTION_NAME(bitmap) },
|
|
||||||
{ str8_lit_comp("geo"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(geo) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(geo) , 0 },
|
|
||||||
};
|
|
||||||
|
|
||||||
DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[30] =
|
|
||||||
{
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("null"), str8_lit_comp(""), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(Null), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Null), DF_VIEW_CMD_FUNCTION_NAME(Null), DF_VIEW_UI_FUNCTION_NAME(Null)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("empty"), str8_lit_comp(""), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(Empty), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Empty), DF_VIEW_CMD_FUNCTION_NAME(Empty), DF_VIEW_UI_FUNCTION_NAME(Empty)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), DF_NameKind_Null, DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Commands), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Commands), DF_VIEW_CMD_FUNCTION_NAME(Commands), DF_VIEW_UI_FUNCTION_NAME(Commands)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), DF_NameKind_Null, DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(FileSystem), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(FileSystem), DF_VIEW_CMD_FUNCTION_NAME(FileSystem), DF_VIEW_UI_FUNCTION_NAME(FileSystem)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(SystemProcesses), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(SystemProcesses), DF_VIEW_CMD_FUNCTION_NAME(SystemProcesses), DF_VIEW_UI_FUNCTION_NAME(SystemProcesses)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), DF_NameKind_EntityKindName, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(EntityLister), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(EntityLister), DF_VIEW_CMD_FUNCTION_NAME(EntityLister), DF_VIEW_UI_FUNCTION_NAME(EntityLister)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), DF_NameKind_Null, DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(SymbolLister), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(SymbolLister), DF_VIEW_CMD_FUNCTION_NAME(SymbolLister), DF_VIEW_UI_FUNCTION_NAME(SymbolLister)},
|
|
||||||
{(0|1*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), DF_NameKind_EntityName, DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(Target), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Target), DF_VIEW_CMD_FUNCTION_NAME(Target), DF_VIEW_UI_FUNCTION_NAME(Target)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), DF_NameKind_Null, DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(Targets), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Targets), DF_VIEW_CMD_FUNCTION_NAME(Targets), DF_VIEW_UI_FUNCTION_NAME(Targets)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), DF_NameKind_Null, DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(FilePathMap), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(FilePathMap), DF_VIEW_CMD_FUNCTION_NAME(FilePathMap), DF_VIEW_UI_FUNCTION_NAME(FilePathMap)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), DF_NameKind_Null, DF_IconKind_Scheduler, DF_VIEW_SETUP_FUNCTION_NAME(Scheduler), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Scheduler), DF_VIEW_CMD_FUNCTION_NAME(Scheduler), DF_VIEW_UI_FUNCTION_NAME(Scheduler)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), DF_NameKind_Null, DF_IconKind_Thread, DF_VIEW_SETUP_FUNCTION_NAME(CallStack), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(CallStack), DF_VIEW_CMD_FUNCTION_NAME(CallStack), DF_VIEW_UI_FUNCTION_NAME(CallStack)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("modules"), str8_lit_comp("Modules"), DF_NameKind_Null, DF_IconKind_Module, DF_VIEW_SETUP_FUNCTION_NAME(Modules), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Modules), DF_VIEW_CMD_FUNCTION_NAME(Modules), DF_VIEW_UI_FUNCTION_NAME(Modules)},
|
|
||||||
{(0|1*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("pending_entity"), str8_lit_comp("Pending Entity"), DF_NameKind_EntityName, DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(PendingEntity), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(PendingEntity), DF_VIEW_CMD_FUNCTION_NAME(PendingEntity), DF_VIEW_UI_FUNCTION_NAME(PendingEntity)},
|
|
||||||
{(0|1*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("code"), str8_lit_comp("Code"), DF_NameKind_EntityName, DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(Code), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Code), DF_VIEW_CMD_FUNCTION_NAME(Code), DF_VIEW_UI_FUNCTION_NAME(Code)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("disassembly"), str8_lit_comp("Disassembly"), DF_NameKind_Null, DF_IconKind_Glasses, DF_VIEW_SETUP_FUNCTION_NAME(Disassembly), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Disassembly), DF_VIEW_CMD_FUNCTION_NAME(Disassembly), DF_VIEW_UI_FUNCTION_NAME(Disassembly)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("eval_viewer"), str8_lit_comp("Evaluation Viewer"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(EvalViewer), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(EvalViewer), DF_VIEW_CMD_FUNCTION_NAME(EvalViewer), DF_VIEW_UI_FUNCTION_NAME(EvalViewer)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch"), str8_lit_comp("Watch"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Watch), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Watch), DF_VIEW_CMD_FUNCTION_NAME(Watch), DF_VIEW_UI_FUNCTION_NAME(Watch)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("locals"), str8_lit_comp("Locals"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Locals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Locals), DF_VIEW_CMD_FUNCTION_NAME(Locals), DF_VIEW_UI_FUNCTION_NAME(Locals)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("registers"), str8_lit_comp("Registers"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Registers), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Registers), DF_VIEW_CMD_FUNCTION_NAME(Registers), DF_VIEW_UI_FUNCTION_NAME(Registers)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("globals"), str8_lit_comp("Globals"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Globals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Globals), DF_VIEW_CMD_FUNCTION_NAME(Globals), DF_VIEW_UI_FUNCTION_NAME(Globals)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(ThreadLocals), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ThreadLocals), DF_VIEW_CMD_FUNCTION_NAME(ThreadLocals), DF_VIEW_UI_FUNCTION_NAME(ThreadLocals)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("types"), str8_lit_comp("Types"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Types), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Types), DF_VIEW_CMD_FUNCTION_NAME(Types), DF_VIEW_UI_FUNCTION_NAME(Types)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(Procedures), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Procedures), DF_VIEW_CMD_FUNCTION_NAME(Procedures), DF_VIEW_UI_FUNCTION_NAME(Procedures)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("output"), str8_lit_comp("Output"), DF_NameKind_Null, DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(Output), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Output), DF_VIEW_CMD_FUNCTION_NAME(Output), DF_VIEW_UI_FUNCTION_NAME(Output)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("memory"), str8_lit_comp("Memory"), DF_NameKind_Null, DF_IconKind_Grid, DF_VIEW_SETUP_FUNCTION_NAME(Memory), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Memory), DF_VIEW_CMD_FUNCTION_NAME(Memory), DF_VIEW_UI_FUNCTION_NAME(Memory)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), DF_NameKind_Null, DF_IconKind_CircleFilled, DF_VIEW_SETUP_FUNCTION_NAME(Breakpoints), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Breakpoints), DF_VIEW_CMD_FUNCTION_NAME(Breakpoints), DF_VIEW_UI_FUNCTION_NAME(Breakpoints)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), DF_NameKind_Null, DF_IconKind_Pin, DF_VIEW_SETUP_FUNCTION_NAME(WatchPins), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(WatchPins), DF_VIEW_CMD_FUNCTION_NAME(WatchPins), DF_VIEW_UI_FUNCTION_NAME(WatchPins)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), DF_NameKind_Null, DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(ExceptionFilters), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(ExceptionFilters), DF_VIEW_CMD_FUNCTION_NAME(ExceptionFilters), DF_VIEW_UI_FUNCTION_NAME(ExceptionFilters)},
|
|
||||||
{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanSerializeEntityPath|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("theme"), str8_lit_comp("Theme"), DF_NameKind_Null, DF_IconKind_Palette, DF_VIEW_SETUP_FUNCTION_NAME(Theme), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(Theme), DF_VIEW_CMD_FUNCTION_NAME(Theme), DF_VIEW_UI_FUNCTION_NAME(Theme)},
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_theme_color_display_string_table[54] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("Null"),
|
|
||||||
str8_lit_comp("Plain Text"),
|
|
||||||
str8_lit_comp("Plain Background"),
|
|
||||||
str8_lit_comp("Plain Border"),
|
|
||||||
str8_lit_comp("Plain Overlay"),
|
|
||||||
str8_lit_comp("Code (Default)"),
|
|
||||||
str8_lit_comp("Code (Function)"),
|
|
||||||
str8_lit_comp("Code (Type)"),
|
|
||||||
str8_lit_comp("Code (Local)"),
|
|
||||||
str8_lit_comp("Code (Register)"),
|
|
||||||
str8_lit_comp("Code (Keyword)"),
|
|
||||||
str8_lit_comp("Code (Symbol)"),
|
|
||||||
str8_lit_comp("Code (Numeric)"),
|
|
||||||
str8_lit_comp("Code (String)"),
|
|
||||||
str8_lit_comp("Code (Meta)"),
|
|
||||||
str8_lit_comp("Code (Comment)"),
|
|
||||||
str8_lit_comp("Line Info (0)"),
|
|
||||||
str8_lit_comp("Line Info (1)"),
|
|
||||||
str8_lit_comp("Line Info (2)"),
|
|
||||||
str8_lit_comp("Line Info (3)"),
|
|
||||||
str8_lit_comp("Alt Text"),
|
|
||||||
str8_lit_comp("Alt Background"),
|
|
||||||
str8_lit_comp("Alt Border"),
|
|
||||||
str8_lit_comp("Alt Overlay"),
|
|
||||||
str8_lit_comp("Inactive Tab"),
|
|
||||||
str8_lit_comp("Active Tab"),
|
|
||||||
str8_lit_comp("Entity Background"),
|
|
||||||
str8_lit_comp("Query Bar"),
|
|
||||||
str8_lit_comp("Weak Text"),
|
|
||||||
str8_lit_comp("Text Selection"),
|
|
||||||
str8_lit_comp("Cursor"),
|
|
||||||
str8_lit_comp("Highlight (0)"),
|
|
||||||
str8_lit_comp("Highlight (1)"),
|
|
||||||
str8_lit_comp("Success Text"),
|
|
||||||
str8_lit_comp("Success Background"),
|
|
||||||
str8_lit_comp("Success Border"),
|
|
||||||
str8_lit_comp("Failure Text"),
|
|
||||||
str8_lit_comp("Failure Background"),
|
|
||||||
str8_lit_comp("Failure Border"),
|
|
||||||
str8_lit_comp("Action Text"),
|
|
||||||
str8_lit_comp("Action Background"),
|
|
||||||
str8_lit_comp("Action Border"),
|
|
||||||
str8_lit_comp("Drop Site Overlay"),
|
|
||||||
str8_lit_comp("Thread (0)"),
|
|
||||||
str8_lit_comp("Thread (1)"),
|
|
||||||
str8_lit_comp("Thread (2)"),
|
|
||||||
str8_lit_comp("Thread (3)"),
|
|
||||||
str8_lit_comp("Thread (4)"),
|
|
||||||
str8_lit_comp("Thread (5)"),
|
|
||||||
str8_lit_comp("Thread (6)"),
|
|
||||||
str8_lit_comp("Thread (7)"),
|
|
||||||
str8_lit_comp("Thread (Unwound)"),
|
|
||||||
str8_lit_comp("Inactive Panel Overlay"),
|
|
||||||
str8_lit_comp("Drop Shadow"),
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 df_g_theme_color_cfg_string_table[54] =
|
|
||||||
{
|
|
||||||
str8_lit_comp("null"),
|
|
||||||
str8_lit_comp("plain_text"),
|
|
||||||
str8_lit_comp("plain_background"),
|
|
||||||
str8_lit_comp("plain_border"),
|
|
||||||
str8_lit_comp("plain_overlay"),
|
|
||||||
str8_lit_comp("code_default"),
|
|
||||||
str8_lit_comp("code_function"),
|
|
||||||
str8_lit_comp("code_type"),
|
|
||||||
str8_lit_comp("code_local"),
|
|
||||||
str8_lit_comp("code_register"),
|
|
||||||
str8_lit_comp("code_keyword"),
|
|
||||||
str8_lit_comp("code_symbol"),
|
|
||||||
str8_lit_comp("code_numeric"),
|
|
||||||
str8_lit_comp("code_string"),
|
|
||||||
str8_lit_comp("code_meta"),
|
|
||||||
str8_lit_comp("code_comment"),
|
|
||||||
str8_lit_comp("line_info_0"),
|
|
||||||
str8_lit_comp("line_info_1"),
|
|
||||||
str8_lit_comp("line_info_2"),
|
|
||||||
str8_lit_comp("line_info_3"),
|
|
||||||
str8_lit_comp("alt_text"),
|
|
||||||
str8_lit_comp("alt_background"),
|
|
||||||
str8_lit_comp("alt_border"),
|
|
||||||
str8_lit_comp("alt_overlay"),
|
|
||||||
str8_lit_comp("tab_inactive"),
|
|
||||||
str8_lit_comp("tab_active"),
|
|
||||||
str8_lit_comp("entity_background"),
|
|
||||||
str8_lit_comp("query_bar"),
|
|
||||||
str8_lit_comp("weak_text"),
|
|
||||||
str8_lit_comp("text_selection"),
|
|
||||||
str8_lit_comp("cursor"),
|
|
||||||
str8_lit_comp("highlight_0"),
|
|
||||||
str8_lit_comp("highlight_1"),
|
|
||||||
str8_lit_comp("success_text"),
|
|
||||||
str8_lit_comp("success_background"),
|
|
||||||
str8_lit_comp("success_border"),
|
|
||||||
str8_lit_comp("failure_text"),
|
|
||||||
str8_lit_comp("failure_background"),
|
|
||||||
str8_lit_comp("failure_border"),
|
|
||||||
str8_lit_comp("action_text"),
|
|
||||||
str8_lit_comp("action_background"),
|
|
||||||
str8_lit_comp("action_border"),
|
|
||||||
str8_lit_comp("drop_site_overlay"),
|
|
||||||
str8_lit_comp("thread_0"),
|
|
||||||
str8_lit_comp("thread_1"),
|
|
||||||
str8_lit_comp("thread_2"),
|
|
||||||
str8_lit_comp("thread_3"),
|
|
||||||
str8_lit_comp("thread_4"),
|
|
||||||
str8_lit_comp("thread_5"),
|
|
||||||
str8_lit_comp("thread_6"),
|
|
||||||
str8_lit_comp("thread_7"),
|
|
||||||
str8_lit_comp("thread_unwound"),
|
|
||||||
str8_lit_comp("inactive_panel_overlay"),
|
|
||||||
str8_lit_comp("drop_shadow"),
|
|
||||||
};
|
|
||||||
|
|
||||||
C_LINKAGE_END
|
|
||||||
|
|
||||||
+641
-746
File diff suppressed because it is too large
Load Diff
+192
-194
@@ -1,194 +1,192 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef DRAW_H
|
#ifndef DRAW_H
|
||||||
#define DRAW_H
|
#define DRAW_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Fancy String Types
|
//~ rjf: Fancy String Types
|
||||||
|
|
||||||
typedef struct D_FancyString D_FancyString;
|
typedef struct DR_FancyString DR_FancyString;
|
||||||
struct D_FancyString
|
struct DR_FancyString
|
||||||
{
|
{
|
||||||
F_Tag font;
|
FNT_Tag font;
|
||||||
String8 string;
|
String8 string;
|
||||||
Vec4F32 color;
|
Vec4F32 color;
|
||||||
F32 size;
|
F32 size;
|
||||||
F32 underline_thickness;
|
F32 underline_thickness;
|
||||||
F32 strikethrough_thickness;
|
F32 strikethrough_thickness;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct D_FancyStringNode D_FancyStringNode;
|
typedef struct DR_FancyStringNode DR_FancyStringNode;
|
||||||
struct D_FancyStringNode
|
struct DR_FancyStringNode
|
||||||
{
|
{
|
||||||
D_FancyStringNode *next;
|
DR_FancyStringNode *next;
|
||||||
D_FancyString v;
|
DR_FancyString v;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct D_FancyStringList D_FancyStringList;
|
typedef struct DR_FancyStringList DR_FancyStringList;
|
||||||
struct D_FancyStringList
|
struct DR_FancyStringList
|
||||||
{
|
{
|
||||||
D_FancyStringNode *first;
|
DR_FancyStringNode *first;
|
||||||
D_FancyStringNode *last;
|
DR_FancyStringNode *last;
|
||||||
U64 node_count;
|
U64 node_count;
|
||||||
U64 total_size;
|
U64 total_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct D_FancyRun D_FancyRun;
|
typedef struct DR_FancyRun DR_FancyRun;
|
||||||
struct D_FancyRun
|
struct DR_FancyRun
|
||||||
{
|
{
|
||||||
F_Run run;
|
FNT_Run run;
|
||||||
Vec4F32 color;
|
Vec4F32 color;
|
||||||
F32 underline_thickness;
|
F32 underline_thickness;
|
||||||
F32 strikethrough_thickness;
|
F32 strikethrough_thickness;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct D_FancyRunNode D_FancyRunNode;
|
typedef struct DR_FancyRunNode DR_FancyRunNode;
|
||||||
struct D_FancyRunNode
|
struct DR_FancyRunNode
|
||||||
{
|
{
|
||||||
D_FancyRunNode *next;
|
DR_FancyRunNode *next;
|
||||||
D_FancyRun v;
|
DR_FancyRun v;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct D_FancyRunList D_FancyRunList;
|
typedef struct DR_FancyRunList DR_FancyRunList;
|
||||||
struct D_FancyRunList
|
struct DR_FancyRunList
|
||||||
{
|
{
|
||||||
D_FancyRunNode *first;
|
DR_FancyRunNode *first;
|
||||||
D_FancyRunNode *last;
|
DR_FancyRunNode *last;
|
||||||
U64 node_count;
|
U64 node_count;
|
||||||
Vec2F32 dim;
|
Vec2F32 dim;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Generated Code
|
//~ rjf: Generated Code
|
||||||
|
|
||||||
#include "generated/draw.meta.h"
|
#include "generated/draw.meta.h"
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Draw Bucket Types
|
//~ rjf: Draw Bucket Types
|
||||||
|
|
||||||
typedef struct D_Bucket D_Bucket;
|
typedef struct DR_Bucket DR_Bucket;
|
||||||
struct D_Bucket
|
struct DR_Bucket
|
||||||
{
|
{
|
||||||
R_PassList passes;
|
R_PassList passes;
|
||||||
U64 stack_gen;
|
U64 stack_gen;
|
||||||
U64 last_cmd_stack_gen;
|
U64 last_cmd_stack_gen;
|
||||||
D_BucketStackDecls;
|
DR_BucketStackDecls;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Thread Context
|
//~ rjf: Thread Context
|
||||||
|
|
||||||
typedef struct D_BucketSelectionNode D_BucketSelectionNode;
|
typedef struct DR_BucketSelectionNode DR_BucketSelectionNode;
|
||||||
struct D_BucketSelectionNode
|
struct DR_BucketSelectionNode
|
||||||
{
|
{
|
||||||
D_BucketSelectionNode *next;
|
DR_BucketSelectionNode *next;
|
||||||
D_Bucket *bucket;
|
DR_Bucket *bucket;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct D_ThreadCtx D_ThreadCtx;
|
typedef struct DR_ThreadCtx DR_ThreadCtx;
|
||||||
struct D_ThreadCtx
|
struct DR_ThreadCtx
|
||||||
{
|
{
|
||||||
Arena *arena;
|
Arena *arena;
|
||||||
U64 arena_frame_start_pos;
|
U64 arena_frame_start_pos;
|
||||||
D_BucketSelectionNode *top_bucket;
|
DR_BucketSelectionNode *top_bucket;
|
||||||
D_BucketSelectionNode *free_bucket_selection;
|
DR_BucketSelectionNode *free_bucket_selection;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Globals
|
//~ rjf: Globals
|
||||||
|
|
||||||
thread_static D_ThreadCtx *d_thread_ctx = 0;
|
thread_static DR_ThreadCtx *dr_thread_ctx = 0;
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Basic Helpers
|
//~ rjf: Basic Helpers
|
||||||
|
|
||||||
internal U64 d_hash_from_string(String8 string);
|
internal U64 dr_hash_from_string(String8 string);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Fancy String Type Functions
|
//~ rjf: Fancy String Type Functions
|
||||||
|
|
||||||
internal void d_fancy_string_list_push(Arena *arena, D_FancyStringList *list, D_FancyString *str);
|
internal void dr_fancy_string_list_push(Arena *arena, DR_FancyStringList *list, DR_FancyString *str);
|
||||||
internal String8 d_string_from_fancy_string_list(Arena *arena, D_FancyStringList *list);
|
#define dr_fancy_string_list_push_new(arena, list, font_, size_, color_, string_, ...) dr_fancy_string_list_push((arena), (list), &(DR_FancyString){.font = (font_), .string = (string_), .color = (color_), .size = (size_), __VA_ARGS__})
|
||||||
internal D_FancyRunList d_fancy_run_list_from_fancy_string_list(Arena *arena, D_FancyStringList *strs);
|
internal void dr_fancy_string_list_concat_in_place(DR_FancyStringList *dst, DR_FancyStringList *to_push);
|
||||||
internal D_FancyRunList d_fancy_run_list_copy(Arena *arena, D_FancyRunList *src);
|
internal String8 dr_string_from_fancy_string_list(Arena *arena, DR_FancyStringList *list);
|
||||||
|
internal DR_FancyRunList dr_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, FNT_RasterFlags flags, DR_FancyStringList *strs);
|
||||||
////////////////////////////////
|
internal DR_FancyRunList dr_fancy_run_list_copy(Arena *arena, DR_FancyRunList *src);
|
||||||
//~ rjf: Top-Level API
|
|
||||||
//
|
////////////////////////////////
|
||||||
// (Frame boundaries & bucket submission)
|
//~ rjf: Top-Level API
|
||||||
|
//
|
||||||
internal void d_begin_frame(void);
|
// (Frame boundaries & bucket submission)
|
||||||
internal void d_submit_bucket(OS_Handle os_window, R_Handle r_window, D_Bucket *bucket);
|
|
||||||
|
internal void dr_begin_frame(void);
|
||||||
////////////////////////////////
|
internal void dr_submit_bucket(OS_Handle os_window, R_Handle r_window, DR_Bucket *bucket);
|
||||||
//~ rjf: Bucket Construction & Selection API
|
|
||||||
//
|
////////////////////////////////
|
||||||
// (Bucket: Handle to sequence of many render passes, constructed by this layer)
|
//~ rjf: Bucket Construction & Selection API
|
||||||
|
//
|
||||||
internal D_Bucket *d_bucket_make(void);
|
// (Bucket: Handle to sequence of many render passes, constructed by this layer)
|
||||||
internal void d_push_bucket(D_Bucket *bucket);
|
|
||||||
internal void d_pop_bucket(void);
|
internal DR_Bucket *dr_bucket_make(void);
|
||||||
internal D_Bucket *d_top_bucket(void);
|
internal void dr_push_bucket(DR_Bucket *bucket);
|
||||||
#define D_BucketScope(b) DeferLoop(d_push_bucket(b), d_pop_bucket())
|
internal void dr_pop_bucket(void);
|
||||||
|
internal DR_Bucket *dr_top_bucket(void);
|
||||||
////////////////////////////////
|
#define D_BucketScope(b) DeferLoop(dr_push_bucket(b), dr_pop_bucket())
|
||||||
//~ rjf: Bucket Stacks
|
|
||||||
//
|
////////////////////////////////
|
||||||
// (Pushing/popping implicit draw parameters)
|
//~ rjf: Bucket Stacks
|
||||||
|
//
|
||||||
internal R_Tex2DSampleKind d_push_tex2d_sample_kind(R_Tex2DSampleKind v);
|
// (Pushing/popping implicit draw parameters)
|
||||||
internal Mat3x3F32 d_push_xform2d(Mat3x3F32 v);
|
|
||||||
internal Rng2F32 d_push_clip(Rng2F32 v);
|
internal R_Tex2DSampleKind dr_push_tex2d_sample_kind(R_Tex2DSampleKind v);
|
||||||
internal F32 d_push_transparency(F32 v);
|
internal Mat3x3F32 dr_push_xform2d(Mat3x3F32 v);
|
||||||
internal R_Tex2DSampleKind d_pop_tex2d_sample_kind(void);
|
internal Rng2F32 dr_push_clip(Rng2F32 v);
|
||||||
internal Mat3x3F32 d_pop_xform2d(void);
|
internal F32 dr_push_transparency(F32 v);
|
||||||
internal Rng2F32 d_pop_clip(void);
|
internal R_Tex2DSampleKind dr_pop_tex2d_sample_kind(void);
|
||||||
internal F32 d_pop_transparency(void);
|
internal Mat3x3F32 dr_pop_xform2d(void);
|
||||||
internal R_Tex2DSampleKind d_top_tex2d_sample_kind(void);
|
internal Rng2F32 dr_pop_clip(void);
|
||||||
internal Mat3x3F32 d_top_xform2d(void);
|
internal F32 dr_pop_transparency(void);
|
||||||
internal Rng2F32 d_top_clip(void);
|
internal R_Tex2DSampleKind dr_top_tex2d_sample_kind(void);
|
||||||
internal F32 d_top_transparency(void);
|
internal Mat3x3F32 dr_top_xform2d(void);
|
||||||
|
internal Rng2F32 dr_top_clip(void);
|
||||||
#define D_Tex2DSampleKindScope(v) DeferLoop(d_push_tex2d_sample_kind(v), d_pop_tex2d_sample_kind())
|
internal F32 dr_top_transparency(void);
|
||||||
#define D_XForm2DScope(v) DeferLoop(d_push_xform2d(v), d_pop_xform2d())
|
|
||||||
#define D_ClipScope(v) DeferLoop(d_push_clip(v), d_pop_clip())
|
#define DR_Tex2DSampleKindScope(v) DeferLoop(dr_push_tex2d_sample_kind(v), dr_pop_tex2d_sample_kind())
|
||||||
#define D_TransparencyScope(v) DeferLoop(d_push_transparency(v), d_pop_transparency())
|
#define DR_XForm2DScope(v) DeferLoop(dr_push_xform2d(v), dr_pop_xform2d())
|
||||||
|
#define DR_ClipScope(v) DeferLoop(dr_push_clip(v), dr_pop_clip())
|
||||||
////////////////////////////////
|
#define DR_TransparencyScope(v) DeferLoop(dr_push_transparency(v), dr_pop_transparency())
|
||||||
//~ rjf: Core Draw Calls
|
|
||||||
//
|
////////////////////////////////
|
||||||
// (Apply to the calling thread's currently selected bucket)
|
//~ rjf: Core Draw Calls
|
||||||
|
//
|
||||||
//- rjf: rectangles
|
// (Apply to the calling thread's currently selected bucket)
|
||||||
internal inline R_Rect2DInst *d_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness);
|
|
||||||
|
//- rjf: rectangles
|
||||||
//- rjf: images
|
internal inline R_Rect2DInst *dr_rect(Rng2F32 dst, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness);
|
||||||
internal inline R_Rect2DInst *d_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness);
|
|
||||||
|
//- rjf: images
|
||||||
//- rjf: blurs
|
internal inline R_Rect2DInst *dr_img(Rng2F32 dst, Rng2F32 src, R_Handle texture, Vec4F32 color, F32 corner_radius, F32 border_thickness, F32 edge_softness);
|
||||||
internal R_PassParams_Blur *d_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius);
|
|
||||||
|
//- rjf: blurs
|
||||||
//- rjf: 3d rendering pass params
|
internal R_PassParams_Blur *dr_blur(Rng2F32 rect, F32 blur_size, F32 corner_radius);
|
||||||
internal R_PassParams_Geo3D *d_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection);
|
|
||||||
|
//- rjf: 3d rendering pass params
|
||||||
//- rjf: meshes
|
internal R_PassParams_Geo3D *dr_geo3d_begin(Rng2F32 viewport, Mat4x4F32 view, Mat4x4F32 projection);
|
||||||
internal R_Mesh3DInst *d_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo_topology, R_GeoVertexFlags mesh_geo_vertex_flags, R_Handle albedo_tex, Mat4x4F32 inst_xform);
|
|
||||||
|
//- rjf: meshes
|
||||||
//- rjf: collating one pre-prepped bucket into parent bucket
|
internal R_Mesh3DInst *dr_mesh(R_Handle mesh_vertices, R_Handle mesh_indices, R_GeoTopologyKind mesh_geo_topology, R_GeoVertexFlags mesh_geo_vertex_flags, R_Handle albedo_tex, Mat4x4F32 inst_xform);
|
||||||
internal void d_sub_bucket(D_Bucket *bucket);
|
|
||||||
|
//- rjf: collating one pre-prepped bucket into parent bucket
|
||||||
////////////////////////////////
|
internal void dr_sub_bucket(DR_Bucket *bucket);
|
||||||
//~ rjf: Draw Call Helpers
|
|
||||||
|
////////////////////////////////
|
||||||
//- rjf: text
|
//~ rjf: Draw Call Helpers
|
||||||
internal void d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, F_Run trailer_run);
|
|
||||||
internal void d_truncated_fancy_run_fuzzy_matches(Vec2F32 p, D_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color);
|
//- rjf: text
|
||||||
internal void d_text_run(Vec2F32 p, Vec4F32 color, F_Run run);
|
internal void dr_truncated_fancy_run_list(Vec2F32 p, DR_FancyRunList *list, F32 max_x, FNT_Run trailer_run);
|
||||||
internal void d_truncated_text_run(Vec2F32 p, Vec4F32 color, F32 max_x, F_Run text_run, F_Run trailer_run);
|
internal void dr_truncated_fancy_run_fuzzy_matches(Vec2F32 p, DR_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color);
|
||||||
internal void d_text(F_Tag font, F32 size, Vec2F32 p, Vec4F32 color, String8 string);
|
internal void dr_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run);
|
||||||
internal void d_textf(F_Tag font, F32 size, Vec2F32 p, Vec4F32 color, char *fmt, ...);
|
internal void dr_text(FNT_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, FNT_RasterFlags flags, Vec2F32 p, Vec4F32 color, String8 string);
|
||||||
internal void d_truncated_text(F_Tag font, F32 size, Vec2F32 p, Vec4F32 color, F32 max_x, String8 string);
|
|
||||||
internal void d_truncated_textf(F_Tag font, F32 size, Vec2F32 p, Vec4F32 color, F32 max_x, char *fmt, ...);
|
#endif // DRAW_H
|
||||||
|
|
||||||
#endif // DRAW_H
|
|
||||||
|
|||||||
+58
-58
@@ -1,58 +1,58 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
@table(name, name_lower, type, default_init)
|
@table(name, name_lower, type, default_init)
|
||||||
D_StackTable:
|
DR_StackTable:
|
||||||
{
|
{
|
||||||
{Tex2DSampleKind tex2d_sample_kind R_Tex2DSampleKind `R_Tex2DSampleKind_Nearest` }
|
{Tex2DSampleKind tex2d_sample_kind R_Tex2DSampleKind `R_Tex2DSampleKind_Nearest` }
|
||||||
{XForm2D xform2d Mat3x3F32 `{1, 0, 0, 0, 1, 0, 0, 0, 1}` }
|
{XForm2D xform2d Mat3x3F32 `{1, 0, 0, 0, 1, 0, 0, 0, 1}` }
|
||||||
{Clip clip Rng2F32 `{0}` }
|
{Clip clip Rng2F32 `{0}` }
|
||||||
{Transparency transparency F32 `0` }
|
{Transparency transparency F32 `0` }
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen
|
@gen
|
||||||
{
|
{
|
||||||
@expand(D_StackTable a) `typedef struct D_$(a.name)Node D_$(a.name)Node; struct D_$(a.name)Node {D_$(a.name)Node *next; $(a.type) v;};`;
|
@expand(DR_StackTable a) `typedef struct DR_$(a.name)Node DR_$(a.name)Node; struct DR_$(a.name)Node {DR_$(a.name)Node *next; $(a.type) v;};`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen
|
@gen
|
||||||
{
|
{
|
||||||
`#define D_BucketStackDecls struct{\\`;
|
`#define DR_BucketStackDecls struct{\\`;
|
||||||
@expand(D_StackTable a) `D_$(a.name)Node *top_$(a.name_lower);\\`;
|
@expand(DR_StackTable a) `DR_$(a.name)Node *top_$(a.name_lower);\\`;
|
||||||
`}`;
|
`}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen
|
@gen
|
||||||
{
|
{
|
||||||
@expand(D_StackTable a) `read_only global D_$(a.name)Node d_nil_$(a.name_lower) = {0, $(a.default_init)};`;
|
@expand(DR_StackTable a) `read_only global DR_$(a.name)Node dr_nil_$(a.name_lower) = {0, $(a.default_init)};`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen
|
@gen
|
||||||
{
|
{
|
||||||
`#define D_BucketStackInits(b) do{\\`;
|
`#define DR_BucketStackInits(b) do{\\`;
|
||||||
@expand(D_StackTable a) `(b)->top_$(a.name_lower) = &d_nil_$(a.name_lower);\\`;
|
@expand(DR_StackTable a) `(b)->top_$(a.name_lower) = &dr_nil_$(a.name_lower);\\`;
|
||||||
`}while(0)`;
|
`}while(0)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen
|
@gen
|
||||||
{
|
{
|
||||||
`#if 0`;
|
`#if 0`;
|
||||||
@expand(D_StackTable a) `internal $(a.type) $(=>35) d_push_$(a.name_lower)($(a.type) v);`;
|
@expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_push_$(a.name_lower)($(a.type) v);`;
|
||||||
@expand(D_StackTable a) `internal $(a.type) $(=>35) d_pop_$(a.name_lower)(void);`;
|
@expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_pop_$(a.name_lower)(void);`;
|
||||||
@expand(D_StackTable a) `internal $(a.type) $(=>35) d_top_$(a.name_lower)(void);`;
|
@expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_top_$(a.name_lower)(void);`;
|
||||||
`#endif`;
|
`#endif`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen @c_file
|
@gen @c_file
|
||||||
{
|
{
|
||||||
@expand(D_StackTable a) `internal $(a.type) $(=>35) d_push_$(a.name_lower)($(a.type) v) {D_StackPushImpl($(a.name), $(a.name_lower), $(a.type), v);}`;
|
@expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_push_$(a.name_lower)($(a.type) v) {DR_StackPushImpl($(a.name), $(a.name_lower), $(a.type), v);}`;
|
||||||
@expand(D_StackTable a) `internal $(a.type) $(=>35) d_pop_$(a.name_lower)(void) {D_StackPopImpl($(a.name), $(a.name_lower), $(a.type));}`;
|
@expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_pop_$(a.name_lower)(void) {DR_StackPopImpl($(a.name), $(a.name_lower), $(a.type));}`;
|
||||||
@expand(D_StackTable a) `internal $(a.type) $(=>35) d_top_$(a.name_lower)(void) {D_StackTopImpl($(a.name), $(a.name_lower), $(a.type));}`;
|
@expand(DR_StackTable a) `internal $(a.type) $(=>35) dr_top_$(a.name_lower)(void) {DR_StackTopImpl($(a.name), $(a.name_lower), $(a.type));}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@gen
|
@gen
|
||||||
{
|
{
|
||||||
`#if 0`;
|
`#if 0`;
|
||||||
@expand(D_StackTable a) `#define D_$(a.name)Scope(v) $(=>35) DeferLoop(d_push_$(a.name_lower)(v), d_pop_$(a.name_lower)())`;
|
@expand(DR_StackTable a) `#define DR_$(a.name)Scope(v) $(=>35) DeferLoop(dr_push_$(a.name_lower)(v), dr_pop_$(a.name_lower)())`;
|
||||||
`#endif`;
|
`#endif`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
//- GENERATED CODE
|
//- GENERATED CODE
|
||||||
|
|
||||||
internal R_Tex2DSampleKind d_push_tex2d_sample_kind(R_Tex2DSampleKind v) {D_StackPushImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind, v);}
|
internal R_Tex2DSampleKind dr_push_tex2d_sample_kind(R_Tex2DSampleKind v) {DR_StackPushImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind, v);}
|
||||||
internal Mat3x3F32 d_push_xform2d(Mat3x3F32 v) {D_StackPushImpl(XForm2D, xform2d, Mat3x3F32, v);}
|
internal Mat3x3F32 dr_push_xform2d(Mat3x3F32 v) {DR_StackPushImpl(XForm2D, xform2d, Mat3x3F32, v);}
|
||||||
internal Rng2F32 d_push_clip(Rng2F32 v) {D_StackPushImpl(Clip, clip, Rng2F32, v);}
|
internal Rng2F32 dr_push_clip(Rng2F32 v) {DR_StackPushImpl(Clip, clip, Rng2F32, v);}
|
||||||
internal F32 d_push_transparency(F32 v) {D_StackPushImpl(Transparency, transparency, F32, v);}
|
internal F32 dr_push_transparency(F32 v) {DR_StackPushImpl(Transparency, transparency, F32, v);}
|
||||||
internal R_Tex2DSampleKind d_pop_tex2d_sample_kind(void) {D_StackPopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);}
|
internal R_Tex2DSampleKind dr_pop_tex2d_sample_kind(void) {DR_StackPopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);}
|
||||||
internal Mat3x3F32 d_pop_xform2d(void) {D_StackPopImpl(XForm2D, xform2d, Mat3x3F32);}
|
internal Mat3x3F32 dr_pop_xform2d(void) {DR_StackPopImpl(XForm2D, xform2d, Mat3x3F32);}
|
||||||
internal Rng2F32 d_pop_clip(void) {D_StackPopImpl(Clip, clip, Rng2F32);}
|
internal Rng2F32 dr_pop_clip(void) {DR_StackPopImpl(Clip, clip, Rng2F32);}
|
||||||
internal F32 d_pop_transparency(void) {D_StackPopImpl(Transparency, transparency, F32);}
|
internal F32 dr_pop_transparency(void) {DR_StackPopImpl(Transparency, transparency, F32);}
|
||||||
internal R_Tex2DSampleKind d_top_tex2d_sample_kind(void) {D_StackTopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);}
|
internal R_Tex2DSampleKind dr_top_tex2d_sample_kind(void) {DR_StackTopImpl(Tex2DSampleKind, tex2d_sample_kind, R_Tex2DSampleKind);}
|
||||||
internal Mat3x3F32 d_top_xform2d(void) {D_StackTopImpl(XForm2D, xform2d, Mat3x3F32);}
|
internal Mat3x3F32 dr_top_xform2d(void) {DR_StackTopImpl(XForm2D, xform2d, Mat3x3F32);}
|
||||||
internal Rng2F32 d_top_clip(void) {D_StackTopImpl(Clip, clip, Rng2F32);}
|
internal Rng2F32 dr_top_clip(void) {DR_StackTopImpl(Clip, clip, Rng2F32);}
|
||||||
internal F32 d_top_transparency(void) {D_StackTopImpl(Transparency, transparency, F32);}
|
internal F32 dr_top_transparency(void) {DR_StackTopImpl(Transparency, transparency, F32);}
|
||||||
C_LINKAGE_BEGIN
|
|
||||||
C_LINKAGE_END
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,49 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
//- GENERATED CODE
|
//- GENERATED CODE
|
||||||
|
|
||||||
#ifndef DRAW_META_H
|
#ifndef DRAW_META_H
|
||||||
#define DRAW_META_H
|
#define DRAW_META_H
|
||||||
|
|
||||||
typedef struct D_Tex2DSampleKindNode D_Tex2DSampleKindNode; struct D_Tex2DSampleKindNode {D_Tex2DSampleKindNode *next; R_Tex2DSampleKind v;};
|
typedef struct DR_Tex2DSampleKindNode DR_Tex2DSampleKindNode; struct DR_Tex2DSampleKindNode {DR_Tex2DSampleKindNode *next; R_Tex2DSampleKind v;};
|
||||||
typedef struct D_XForm2DNode D_XForm2DNode; struct D_XForm2DNode {D_XForm2DNode *next; Mat3x3F32 v;};
|
typedef struct DR_XForm2DNode DR_XForm2DNode; struct DR_XForm2DNode {DR_XForm2DNode *next; Mat3x3F32 v;};
|
||||||
typedef struct D_ClipNode D_ClipNode; struct D_ClipNode {D_ClipNode *next; Rng2F32 v;};
|
typedef struct DR_ClipNode DR_ClipNode; struct DR_ClipNode {DR_ClipNode *next; Rng2F32 v;};
|
||||||
typedef struct D_TransparencyNode D_TransparencyNode; struct D_TransparencyNode {D_TransparencyNode *next; F32 v;};
|
typedef struct DR_TransparencyNode DR_TransparencyNode; struct DR_TransparencyNode {DR_TransparencyNode *next; F32 v;};
|
||||||
#define D_BucketStackDecls struct{\
|
#define DR_BucketStackDecls struct{\
|
||||||
D_Tex2DSampleKindNode *top_tex2d_sample_kind;\
|
DR_Tex2DSampleKindNode *top_tex2d_sample_kind;\
|
||||||
D_XForm2DNode *top_xform2d;\
|
DR_XForm2DNode *top_xform2d;\
|
||||||
D_ClipNode *top_clip;\
|
DR_ClipNode *top_clip;\
|
||||||
D_TransparencyNode *top_transparency;\
|
DR_TransparencyNode *top_transparency;\
|
||||||
}
|
}
|
||||||
read_only global D_Tex2DSampleKindNode d_nil_tex2d_sample_kind = {0, R_Tex2DSampleKind_Nearest};
|
read_only global DR_Tex2DSampleKindNode dr_nil_tex2d_sample_kind = {0, R_Tex2DSampleKind_Nearest};
|
||||||
read_only global D_XForm2DNode d_nil_xform2d = {0, {1, 0, 0, 0, 1, 0, 0, 0, 1}};
|
read_only global DR_XForm2DNode dr_nil_xform2d = {0, {1, 0, 0, 0, 1, 0, 0, 0, 1}};
|
||||||
read_only global D_ClipNode d_nil_clip = {0, {0}};
|
read_only global DR_ClipNode dr_nil_clip = {0, {0}};
|
||||||
read_only global D_TransparencyNode d_nil_transparency = {0, 0};
|
read_only global DR_TransparencyNode dr_nil_transparency = {0, 0};
|
||||||
#define D_BucketStackInits(b) do{\
|
#define DR_BucketStackInits(b) do{\
|
||||||
(b)->top_tex2d_sample_kind = &d_nil_tex2d_sample_kind;\
|
(b)->top_tex2d_sample_kind = &dr_nil_tex2d_sample_kind;\
|
||||||
(b)->top_xform2d = &d_nil_xform2d;\
|
(b)->top_xform2d = &dr_nil_xform2d;\
|
||||||
(b)->top_clip = &d_nil_clip;\
|
(b)->top_clip = &dr_nil_clip;\
|
||||||
(b)->top_transparency = &d_nil_transparency;\
|
(b)->top_transparency = &dr_nil_transparency;\
|
||||||
}while(0)
|
}while(0)
|
||||||
#if 0
|
#if 0
|
||||||
internal R_Tex2DSampleKind d_push_tex2d_sample_kind(R_Tex2DSampleKind v);
|
internal R_Tex2DSampleKind dr_push_tex2d_sample_kind(R_Tex2DSampleKind v);
|
||||||
internal Mat3x3F32 d_push_xform2d(Mat3x3F32 v);
|
internal Mat3x3F32 dr_push_xform2d(Mat3x3F32 v);
|
||||||
internal Rng2F32 d_push_clip(Rng2F32 v);
|
internal Rng2F32 dr_push_clip(Rng2F32 v);
|
||||||
internal F32 d_push_transparency(F32 v);
|
internal F32 dr_push_transparency(F32 v);
|
||||||
internal R_Tex2DSampleKind d_pop_tex2d_sample_kind(void);
|
internal R_Tex2DSampleKind dr_pop_tex2d_sample_kind(void);
|
||||||
internal Mat3x3F32 d_pop_xform2d(void);
|
internal Mat3x3F32 dr_pop_xform2d(void);
|
||||||
internal Rng2F32 d_pop_clip(void);
|
internal Rng2F32 dr_pop_clip(void);
|
||||||
internal F32 d_pop_transparency(void);
|
internal F32 dr_pop_transparency(void);
|
||||||
internal R_Tex2DSampleKind d_top_tex2d_sample_kind(void);
|
internal R_Tex2DSampleKind dr_top_tex2d_sample_kind(void);
|
||||||
internal Mat3x3F32 d_top_xform2d(void);
|
internal Mat3x3F32 dr_top_xform2d(void);
|
||||||
internal Rng2F32 d_top_clip(void);
|
internal Rng2F32 dr_top_clip(void);
|
||||||
internal F32 d_top_transparency(void);
|
internal F32 dr_top_transparency(void);
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
#define D_Tex2DSampleKindScope(v) DeferLoop(d_push_tex2d_sample_kind(v), d_pop_tex2d_sample_kind())
|
#define DR_Tex2DSampleKindScope(v) DeferLoop(dr_push_tex2d_sample_kind(v), dr_pop_tex2d_sample_kind())
|
||||||
#define D_XForm2DScope(v) DeferLoop(d_push_xform2d(v), d_pop_xform2d())
|
#define DR_XForm2DScope(v) DeferLoop(dr_push_xform2d(v), dr_pop_xform2d())
|
||||||
#define D_ClipScope(v) DeferLoop(d_push_clip(v), d_pop_clip())
|
#define DR_ClipScope(v) DeferLoop(dr_push_clip(v), dr_pop_clip())
|
||||||
#define D_TransparencyScope(v) DeferLoop(d_push_transparency(v), d_pop_transparency())
|
#define DR_TransparencyScope(v) DeferLoop(dr_push_transparency(v), dr_pop_transparency())
|
||||||
#endif
|
#endif
|
||||||
C_LINKAGE_BEGIN
|
#endif // DRAW_META_H
|
||||||
C_LINKAGE_END
|
|
||||||
|
|
||||||
#endif // DRAW_META_H
|
|
||||||
|
|||||||
+168
-57
@@ -1,63 +1,141 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
@table(name num_children op_string)
|
@table(name)
|
||||||
// num_children - # of children packed after this node kind
|
E_TokenKindTable:
|
||||||
// op_string - string for quick display of the operator
|
|
||||||
EVAL_ExprKindTable:
|
|
||||||
{
|
{
|
||||||
{ Nil 0 "" }
|
{Null}
|
||||||
|
{Identifier}
|
||||||
|
{Numeric}
|
||||||
|
{StringLiteral}
|
||||||
|
{CharLiteral}
|
||||||
|
{Symbol}
|
||||||
|
}
|
||||||
|
|
||||||
|
@table(name basic_string basic_byte_size)
|
||||||
|
// NOTE(rjf): basic_byte_size == 0xFF? => address sized
|
||||||
|
E_TypeKindTable:
|
||||||
|
{
|
||||||
|
{Null "" 0 }
|
||||||
|
{Void "void" 0 }
|
||||||
|
{Handle "HANDLE" 0xFF }
|
||||||
|
{HResult "HRESULT" 4 }
|
||||||
|
{Char8 "char8" 1 }
|
||||||
|
{Char16 "char16" 2 }
|
||||||
|
{Char32 "char32" 4 }
|
||||||
|
{UChar8 "uchar8" 1 }
|
||||||
|
{UChar16 "uchar16" 2 }
|
||||||
|
{UChar32 "uchar32" 4 }
|
||||||
|
{U8 "U8" 1 }
|
||||||
|
{U16 "U16" 2 }
|
||||||
|
{U32 "U32" 4 }
|
||||||
|
{U64 "U64" 8 }
|
||||||
|
{U128 "U128" 16 }
|
||||||
|
{U256 "U256" 32 }
|
||||||
|
{U512 "U512" 64 }
|
||||||
|
{S8 "S8" 1 }
|
||||||
|
{S16 "S16" 2 }
|
||||||
|
{S32 "S32" 4 }
|
||||||
|
{S64 "S64" 8 }
|
||||||
|
{S128 "S128" 16 }
|
||||||
|
{S256 "S256" 32 }
|
||||||
|
{S512 "S512" 64 }
|
||||||
|
{Bool "bool" 1 }
|
||||||
|
{F16 "F16" 2 }
|
||||||
|
{F32 "F32" 4 }
|
||||||
|
{F32PP "F32PP" 4 }
|
||||||
|
{F48 "F48" 6 }
|
||||||
|
{F64 "F64" 8 }
|
||||||
|
{F80 "F80" 10 }
|
||||||
|
{F128 "F128" 16 }
|
||||||
|
{ComplexF32 "ComplexF32" 8 }
|
||||||
|
{ComplexF64 "ComplexF64" 16 }
|
||||||
|
{ComplexF80 "ComplexF80" 20 }
|
||||||
|
{ComplexF128 "ComplexF128" 32 }
|
||||||
|
{Modifier "modifier" 0 }
|
||||||
|
{Ptr "ptr" 0 }
|
||||||
|
{LRef "lref" 0 }
|
||||||
|
{RRef "rref" 0 }
|
||||||
|
{Array "array" 0 }
|
||||||
|
{Function "function" 0 }
|
||||||
|
{Method "method" 0 }
|
||||||
|
{MemberPtr "member_ptr" 0 }
|
||||||
|
{Struct "struct" 0 }
|
||||||
|
{Class "class" 0 }
|
||||||
|
{Union "union" 0 }
|
||||||
|
{Enum "enum" 0 }
|
||||||
|
{Alias "typedef" 0 }
|
||||||
|
{IncompleteStruct "struct" 0 }
|
||||||
|
{IncompleteUnion "union" 0 }
|
||||||
|
{IncompleteClass "class" 0 }
|
||||||
|
{IncompleteEnum "enum" 0 }
|
||||||
|
{Bitfield "bitfield" 0 }
|
||||||
|
{Variadic "variadic" 0 }
|
||||||
|
{Collection "collection" 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
@table(name op_kind precedence string op_pre op_sep op_pos)
|
||||||
|
E_ExprKindTable:
|
||||||
|
{
|
||||||
|
{ Nil Null 0 "" "" "" "" }
|
||||||
|
{ Ref Null 0 "" "" "" "" }
|
||||||
|
|
||||||
{ ArrayIndex 2 "[]" }
|
{ ArrayIndex Null 0 "[]" "" "[" "]"}
|
||||||
{ MemberAccess 2 "." }
|
{ MemberAccess Null 0 "." "" "." "" }
|
||||||
{ Deref 1 "*" }
|
{ Deref UnaryPrefix 2 "*" "*" "" "" }
|
||||||
{ Address 1 "&" }
|
{ Address UnaryPrefix 2 "&" "&" "" "" }
|
||||||
|
|
||||||
{ Cast 2 "cast" }
|
{ Cast Null 1 "cast" "(" ")" "" }
|
||||||
{ Sizeof 1 "sizeof" }
|
{ Sizeof UnaryPrefix 1 "sizeof" "sizeof" "(" ")"}
|
||||||
|
{ Typeof UnaryPrefix 1 "typeof" "typeof" "(" ")"}
|
||||||
|
{ ByteSwap UnaryPrefix 1 "bswap" "bswap" "(" ")"}
|
||||||
|
|
||||||
{ Neg 1 "-" }
|
{ Neg UnaryPrefix 2 "-" "-" "" "" }
|
||||||
{ LogNot 1 "!" }
|
{ LogNot UnaryPrefix 2 "!" "!" "" "" }
|
||||||
{ BitNot 1 "~" }
|
{ BitNot UnaryPrefix 2 "~" "~" "" "" }
|
||||||
{ Mul 2 "*" }
|
{ Mul Binary 3 "*" "" "*" "" }
|
||||||
{ Div 2 "/" }
|
{ Div Binary 3 "/" "" "/" "" }
|
||||||
{ Mod 2 "%" }
|
{ Mod Binary 3 "%" "" "%" "" }
|
||||||
{ Add 2 "+" }
|
{ Add Binary 4 "+" "" "+" "" }
|
||||||
{ Sub 2 "-" }
|
{ Sub Binary 4 "-" "" "-" "" }
|
||||||
{ LShift 2 "<<" }
|
{ LShift Binary 5 "<<" "" "<<" "" }
|
||||||
{ RShift 2 ">>" }
|
{ RShift Binary 5 ">>" "" ">>" "" }
|
||||||
{ Less 2 "<" }
|
{ Less Binary 6 "<" "" "<" "" }
|
||||||
{ LsEq 2 "<=" }
|
{ LsEq Binary 6 "<=" "" "<=" "" }
|
||||||
{ Grtr 2 ">" }
|
{ Grtr Binary 6 ">" "" ">" "" }
|
||||||
{ GrEq 2 ">=" }
|
{ GrEq Binary 6 ">=" "" ">=" "" }
|
||||||
{ EqEq 2 "==" }
|
{ EqEq Binary 7 "==" "" "==" "" }
|
||||||
{ NtEq 2 "!=" }
|
{ NtEq Binary 7 "!=" "" "!=" "" }
|
||||||
|
|
||||||
{ BitAnd 2 "&" }
|
{ BitAnd Binary 8 "&" "" "&" "" }
|
||||||
{ BitXor 2 "^" }
|
{ BitXor Binary 9 "^" "" "^" "" }
|
||||||
{ BitOr 2 "|" }
|
{ BitOr Binary 10 "|" "" "|" "" }
|
||||||
{ LogAnd 2 "&&" }
|
{ LogAnd Binary 11 "&&" "" "&&" "" }
|
||||||
{ LogOr 2 "||" }
|
{ LogOr Binary 12 "||" "" "||" "" }
|
||||||
|
|
||||||
{ Ternary 3 "? " }
|
{ Ternary Null 0 "? " "" "?" ":"}
|
||||||
|
|
||||||
{ LeafBytecode 0 "bytecode" }
|
{ LeafBytecode Null 0 "bytecode" "" "" "" }
|
||||||
{ LeafMember 0 "member" }
|
{ LeafMember Null 0 "member" "" "" "" }
|
||||||
{ LeafU64 0 "U64" }
|
{ LeafStringLiteral Null 0 "string_literal" "" "" "" }
|
||||||
{ LeafF64 0 "F64" }
|
{ LeafBool Null 0 "B32" "" "" "" }
|
||||||
{ LeafF32 0 "F32" }
|
{ LeafU64 Null 0 "U64" "" "" "" }
|
||||||
|
{ LeafF64 Null 0 "F64" "" "" "" }
|
||||||
|
{ LeafF32 Null 0 "F32" "" "" "" }
|
||||||
|
{ LeafIdent Null 0 "leaf_ident" "" "" "" }
|
||||||
|
{ LeafOffset Null 0 "leaf_offset" "" "" "" }
|
||||||
|
{ LeafFilePath Null 0 "leaf_filepath" "" "" "" }
|
||||||
|
|
||||||
{ TypeIdent 0 "type_ident" }
|
{ TypeIdent Null 0 "type_ident" "" "" "" }
|
||||||
{ Ptr 1 "ptr" }
|
{ Ptr Null 0 "ptr" "" "" "" }
|
||||||
{ Array 2 "array" }
|
{ Array Null 0 "array" "" "" "" }
|
||||||
{ Func 1 "function" }
|
{ Func Null 0 "function" "" "" "" }
|
||||||
|
|
||||||
{ Define 2 "=" }
|
{ Define Binary 13 "=" "" "=" "" }
|
||||||
{ LeafIdent 0 "leaf_ident" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@table(name display_string)
|
@table(name display_string)
|
||||||
EVAL_ResultCodeTable:
|
E_InterpretationCodeTable:
|
||||||
{
|
{
|
||||||
{ Good "" }
|
{ Good "" }
|
||||||
{ DivideByZero "Cannot divide by zero." }
|
{ DivideByZero "Cannot divide by zero." }
|
||||||
@@ -72,35 +150,68 @@ EVAL_ResultCodeTable:
|
|||||||
{ MalformedBytecode "Malformed bytecode." }
|
{ MalformedBytecode "Malformed bytecode." }
|
||||||
}
|
}
|
||||||
|
|
||||||
@enum(U32) EVAL_ExprKind:
|
@enum E_TokenKind:
|
||||||
{
|
{
|
||||||
@expand(EVAL_ExprKindTable a) `$(a.name)`,
|
@expand(E_TokenKindTable a) `$(a.name)`,
|
||||||
COUNT,
|
COUNT,
|
||||||
}
|
}
|
||||||
|
|
||||||
@enum EVAL_ResultCode:
|
@enum E_TypeKind:
|
||||||
{
|
{
|
||||||
@expand(EVAL_ResultCodeTable a) `$(a.name)`,
|
@expand(E_TypeKindTable a) `$(a.name)`,
|
||||||
|
COUNT,
|
||||||
|
`FirstBasic = E_TypeKind_Void`,
|
||||||
|
`LastBasic = E_TypeKind_ComplexF128`,
|
||||||
|
`FirstInteger = E_TypeKind_Char8`,
|
||||||
|
`LastInteger = E_TypeKind_S512`,
|
||||||
|
`FirstSigned1 = E_TypeKind_Char8`,
|
||||||
|
`LastSigned1 = E_TypeKind_Char32`,
|
||||||
|
`FirstSigned2 = E_TypeKind_S8`,
|
||||||
|
`LastSigned2 = E_TypeKind_S512`,
|
||||||
|
`FirstIncomplete = E_TypeKind_IncompleteStruct`,
|
||||||
|
`LastIncomplete = E_TypeKind_IncompleteEnum`,
|
||||||
|
}
|
||||||
|
|
||||||
|
@enum(U32) E_ExprKind:
|
||||||
|
{
|
||||||
|
@expand(E_ExprKindTable a) `$(a.name)`,
|
||||||
COUNT,
|
COUNT,
|
||||||
}
|
}
|
||||||
|
|
||||||
@data(U8) eval_expr_kind_child_counts:
|
@enum E_InterpretationCode:
|
||||||
{
|
{
|
||||||
@expand(EVAL_ExprKindTable a) `$(a.num_children)`
|
@expand(E_InterpretationCodeTable a) `$(a.name)`,
|
||||||
|
COUNT,
|
||||||
}
|
}
|
||||||
|
|
||||||
@data(String8)
|
@data(String8)
|
||||||
eval_expr_kind_strings:
|
e_token_kind_strings:
|
||||||
{
|
{
|
||||||
@expand(EVAL_ExprKindTable a) `str8_lit_comp("$(a.name)")`
|
@expand(E_TokenKindTable a) `str8_lit_comp("$(a.name)")`
|
||||||
}
|
}
|
||||||
|
|
||||||
@data(String8) eval_result_code_display_strings:
|
@data(String8)
|
||||||
|
e_expr_kind_strings:
|
||||||
{
|
{
|
||||||
@expand(EVAL_ResultCodeTable a) `str8_lit_comp("$(a.display_string)")`
|
@expand(E_ExprKindTable a) `str8_lit_comp("$(a.name)")`
|
||||||
}
|
}
|
||||||
|
|
||||||
@data(String8) eval_expr_op_strings:
|
@data(String8) e_interpretation_code_display_strings:
|
||||||
{
|
{
|
||||||
@expand(EVAL_ExprKindTable a) `str8_lit_comp("$(a.op_string)")`
|
@expand(E_InterpretationCodeTable a) `str8_lit_comp("$(a.display_string)")`
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(E_OpInfo) e_expr_kind_op_info_table:
|
||||||
|
{
|
||||||
|
@expand(E_ExprKindTable a) `{ E_OpKind_$(a.op_kind), $(a.precedence), str8_lit_comp("$(a.op_pre)"), str8_lit_comp("$(a.op_sep)"), str8_lit_comp("$(a.op_pos)") }`
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(U8) e_kind_basic_byte_size_table:
|
||||||
|
{
|
||||||
|
@expand(E_TypeKindTable a) `$(a.basic_byte_size)`;
|
||||||
|
}
|
||||||
|
|
||||||
|
@data(String8) e_kind_basic_string_table:
|
||||||
|
{
|
||||||
|
@expand(E_TypeKindTable a) `str8_lit_comp("$(a.basic_string)")`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,260 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Bundled Evaluation Functions
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_eval_from_expr(Arena *arena, E_Expr *expr)
|
||||||
|
{
|
||||||
|
E_IRTreeAndType irtree = e_irtree_and_type_from_expr(arena, expr);
|
||||||
|
E_OpList oplist = e_oplist_from_irtree(arena, irtree.root);
|
||||||
|
String8 bytecode = e_bytecode_from_oplist(arena, &oplist);
|
||||||
|
E_Interpretation interp = e_interpret(bytecode);
|
||||||
|
E_Eval eval =
|
||||||
|
{
|
||||||
|
.value = interp.value,
|
||||||
|
.mode = irtree.mode,
|
||||||
|
.space = irtree.space,
|
||||||
|
.expr = expr,
|
||||||
|
.type_key = irtree.type_key,
|
||||||
|
.code = interp.code,
|
||||||
|
};
|
||||||
|
e_msg_list_concat_in_place(&eval.msgs, &irtree.msgs);
|
||||||
|
if(E_InterpretationCode_Good < eval.code && eval.code < E_InterpretationCode_COUNT)
|
||||||
|
{
|
||||||
|
e_msg(arena, &eval.msgs, E_MsgKind_InterpretationError, 0, e_interpretation_code_display_strings[eval.code]);
|
||||||
|
}
|
||||||
|
return eval;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_eval_from_string(Arena *arena, String8 string)
|
||||||
|
{
|
||||||
|
E_TokenArray tokens = e_token_array_from_text(arena, string);
|
||||||
|
E_Parse parse = e_parse_expr_from_text_tokens(arena, string, &tokens);
|
||||||
|
E_Eval eval = e_eval_from_expr(arena, parse.expr);
|
||||||
|
e_msg_list_concat_in_place(&eval.msgs, &parse.msgs);
|
||||||
|
return eval;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_autoresolved_eval_from_eval(E_Eval eval)
|
||||||
|
{
|
||||||
|
if(e_parse_ctx &&
|
||||||
|
e_interpret_ctx &&
|
||||||
|
e_parse_ctx->modules_count > 0 &&
|
||||||
|
e_interpret_ctx->module_base != 0 &&
|
||||||
|
(e_type_key_match(eval.type_key, e_type_key_basic(E_TypeKind_S64)) ||
|
||||||
|
e_type_key_match(eval.type_key, e_type_key_basic(E_TypeKind_U64)) ||
|
||||||
|
e_type_key_match(eval.type_key, e_type_key_basic(E_TypeKind_S32)) ||
|
||||||
|
e_type_key_match(eval.type_key, e_type_key_basic(E_TypeKind_U32))))
|
||||||
|
{
|
||||||
|
U64 vaddr = eval.value.u64;
|
||||||
|
U64 voff = vaddr - e_interpret_ctx->module_base[0];
|
||||||
|
RDI_Parsed *rdi = e_parse_ctx->primary_module->rdi;
|
||||||
|
RDI_Scope *scope = rdi_scope_from_voff(rdi, voff);
|
||||||
|
RDI_Procedure *procedure = rdi_procedure_from_voff(rdi, voff);
|
||||||
|
RDI_GlobalVariable *gvar = rdi_global_variable_from_voff(rdi, voff);
|
||||||
|
U32 string_idx = 0;
|
||||||
|
if(string_idx == 0) { string_idx = procedure->name_string_idx; }
|
||||||
|
if(string_idx == 0) { string_idx = gvar->name_string_idx; }
|
||||||
|
if(string_idx != 0)
|
||||||
|
{
|
||||||
|
eval.type_key = e_type_key_cons_ptr(e_type_state->ctx->primary_module->arch, e_type_key_basic(E_TypeKind_Void), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return eval;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_dynamically_typed_eval_from_eval(E_Eval eval)
|
||||||
|
{
|
||||||
|
E_TypeKey type_key = eval.type_key;
|
||||||
|
E_TypeKind type_kind = e_type_kind_from_key(type_key);
|
||||||
|
if(e_type_state != 0 &&
|
||||||
|
e_interpret_ctx != 0 &&
|
||||||
|
e_interpret_ctx->space_read != 0 &&
|
||||||
|
e_interpret_ctx->module_base != 0 &&
|
||||||
|
type_kind == E_TypeKind_Ptr)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(0, 0);
|
||||||
|
E_TypeKey ptee_type_key = e_type_unwrap(e_type_direct_from_key(e_type_unwrap(type_key)));
|
||||||
|
E_TypeKind ptee_type_kind = e_type_kind_from_key(ptee_type_key);
|
||||||
|
if(ptee_type_kind == E_TypeKind_Struct || ptee_type_kind == E_TypeKind_Class)
|
||||||
|
{
|
||||||
|
E_Type *ptee_type = e_type_from_key(scratch.arena, ptee_type_key);
|
||||||
|
B32 has_vtable = 0;
|
||||||
|
for(U64 idx = 0; idx < ptee_type->count; idx += 1)
|
||||||
|
{
|
||||||
|
if(ptee_type->members[idx].kind == E_MemberKind_VirtualMethod)
|
||||||
|
{
|
||||||
|
has_vtable = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(has_vtable)
|
||||||
|
{
|
||||||
|
U64 ptr_vaddr = eval.value.u64;
|
||||||
|
U64 addr_size = e_type_byte_size_from_key(e_type_unwrap(type_key));
|
||||||
|
U64 class_base_vaddr = 0;
|
||||||
|
U64 vtable_vaddr = 0;
|
||||||
|
if(e_space_read(eval.space, &class_base_vaddr, r1u64(ptr_vaddr, ptr_vaddr+addr_size)) &&
|
||||||
|
e_space_read(eval.space, &vtable_vaddr, r1u64(class_base_vaddr, class_base_vaddr+addr_size)))
|
||||||
|
{
|
||||||
|
Arch arch = e_type_state->ctx->primary_module->arch;
|
||||||
|
U32 rdi_idx = 0;
|
||||||
|
RDI_Parsed *rdi = 0;
|
||||||
|
U64 module_base = 0;
|
||||||
|
for(U64 idx = 0; idx < e_type_state->ctx->modules_count; idx += 1)
|
||||||
|
{
|
||||||
|
if(contains_1u64(e_type_state->ctx->modules[idx].vaddr_range, vtable_vaddr))
|
||||||
|
{
|
||||||
|
arch = e_type_state->ctx->modules[idx].arch;
|
||||||
|
rdi_idx = (U32)idx;
|
||||||
|
rdi = e_type_state->ctx->modules[idx].rdi;
|
||||||
|
module_base = e_type_state->ctx->modules[idx].vaddr_range.min;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(rdi != 0)
|
||||||
|
{
|
||||||
|
U64 vtable_voff = vtable_vaddr - module_base;
|
||||||
|
U64 global_idx = rdi_vmap_idx_from_section_kind_voff(rdi, RDI_SectionKind_GlobalVMap, vtable_voff);
|
||||||
|
RDI_GlobalVariable *global_var = rdi_element_from_name_idx(rdi, GlobalVariables, global_idx);
|
||||||
|
if(global_var->link_flags & RDI_LinkFlag_TypeScoped)
|
||||||
|
{
|
||||||
|
RDI_UDT *udt = rdi_element_from_name_idx(rdi, UDTs, global_var->container_idx);
|
||||||
|
RDI_TypeNode *type = rdi_element_from_name_idx(rdi, TypeNodes, udt->self_type_idx);
|
||||||
|
E_TypeKey derived_type_key = e_type_key_ext(e_type_kind_from_rdi(type->kind), udt->self_type_idx, rdi_idx);
|
||||||
|
E_TypeKey ptr_to_derived_type_key = e_type_key_cons_ptr(arch, derived_type_key, 0);
|
||||||
|
eval.type_key = ptr_to_derived_type_key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
return eval;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_value_eval_from_eval(E_Eval eval)
|
||||||
|
{
|
||||||
|
ProfBeginFunction();
|
||||||
|
if(eval.mode == E_Mode_Offset)
|
||||||
|
{
|
||||||
|
E_TypeKey type_key = e_type_unwrap(eval.type_key);
|
||||||
|
E_TypeKind type_kind = e_type_kind_from_key(type_key);
|
||||||
|
if(type_kind == E_TypeKind_Array)
|
||||||
|
{
|
||||||
|
eval.mode = E_Mode_Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
U64 type_byte_size = e_type_byte_size_from_key(type_key);
|
||||||
|
Rng1U64 value_vaddr_range = r1u64(eval.value.u64, eval.value.u64 + type_byte_size);
|
||||||
|
MemoryZeroStruct(&eval.value);
|
||||||
|
if(!e_type_key_match(type_key, e_type_key_zero()) &&
|
||||||
|
type_byte_size <= sizeof(E_Value) &&
|
||||||
|
e_space_read(eval.space, &eval.value, value_vaddr_range))
|
||||||
|
{
|
||||||
|
eval.mode = E_Mode_Value;
|
||||||
|
|
||||||
|
// rjf: mask&shift, for bitfields
|
||||||
|
if(type_kind == E_TypeKind_Bitfield && type_byte_size <= sizeof(U64))
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(0, 0);
|
||||||
|
E_Type *type = e_type_from_key(scratch.arena, type_key);
|
||||||
|
U64 valid_bits_mask = 0;
|
||||||
|
for(U64 idx = 0; idx < type->count; idx += 1)
|
||||||
|
{
|
||||||
|
valid_bits_mask |= (1<<idx);
|
||||||
|
}
|
||||||
|
eval.value.u64 = eval.value.u64 >> type->off;
|
||||||
|
eval.value.u64 = eval.value.u64 & valid_bits_mask;
|
||||||
|
eval.type_key = type->direct_type_key;
|
||||||
|
scratch_end(scratch);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rjf: manually sign-extend
|
||||||
|
switch(type_kind)
|
||||||
|
{
|
||||||
|
default: break;
|
||||||
|
case E_TypeKind_Char8:
|
||||||
|
case E_TypeKind_S8: {eval.value.s64 = (S64)*((S8 *)&eval.value.u64);}break;
|
||||||
|
case E_TypeKind_Char16:
|
||||||
|
case E_TypeKind_S16: {eval.value.s64 = (S64)*((S16 *)&eval.value.u64);}break;
|
||||||
|
case E_TypeKind_Char32:
|
||||||
|
case E_TypeKind_S32: {eval.value.s64 = (S64)*((S32 *)&eval.value.u64);}break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ProfEnd();
|
||||||
|
return eval;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_element_eval_from_array_eval_index(E_Eval eval, U64 index)
|
||||||
|
{
|
||||||
|
E_Eval result = {0};
|
||||||
|
result.mode = eval.mode;
|
||||||
|
result.space = eval.space;
|
||||||
|
result.type_key = e_type_direct_from_key(eval.type_key);
|
||||||
|
result.code = eval.code;
|
||||||
|
result.msgs = eval.msgs;
|
||||||
|
U64 element_size = e_type_byte_size_from_key(result.type_key);
|
||||||
|
switch(eval.mode)
|
||||||
|
{
|
||||||
|
default:{}break;
|
||||||
|
case E_Mode_Value:
|
||||||
|
if(element_size <= sizeof(E_Value) &&
|
||||||
|
index < sizeof(E_Value)/element_size)
|
||||||
|
{
|
||||||
|
MemoryCopy((U8 *)(&result.value.u512[0]),
|
||||||
|
(U8 *)(&eval.value.u512[0]) + index*element_size,
|
||||||
|
element_size);
|
||||||
|
}break;
|
||||||
|
case E_Mode_Offset:
|
||||||
|
{
|
||||||
|
result.value.u64 = eval.value.u64 + element_size*index;
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal E_Eval
|
||||||
|
e_member_eval_from_eval_member_name(E_Eval eval, String8 member_name)
|
||||||
|
{
|
||||||
|
E_Eval result = {0};
|
||||||
|
{
|
||||||
|
E_Member member = e_type_member_from_key_name__cached(eval.type_key, member_name);
|
||||||
|
if(member.kind != E_MemberKind_Null)
|
||||||
|
{
|
||||||
|
result.mode = eval.mode;
|
||||||
|
result.space = eval.space;
|
||||||
|
result.type_key = member.type_key;
|
||||||
|
result.code = eval.code;
|
||||||
|
result.msgs = eval.msgs;
|
||||||
|
switch(eval.mode)
|
||||||
|
{
|
||||||
|
default:{}break;
|
||||||
|
case E_Mode_Value:
|
||||||
|
if(member.off < sizeof(eval.value))
|
||||||
|
{
|
||||||
|
U64 member_size = e_type_byte_size_from_key(member.type_key);
|
||||||
|
MemoryCopy((U8 *)(&result.value.u512[0]),
|
||||||
|
(U8 *)(&eval.value.u512[0]) + member.off,
|
||||||
|
Min(member_size, sizeof(eval.value) - member.off));
|
||||||
|
}break;
|
||||||
|
case E_Mode_Offset:
|
||||||
|
{
|
||||||
|
result.value.u64 = eval.value.u64 + member.off;
|
||||||
|
}break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
|
#ifndef EVAL_BUNDLES_H
|
||||||
|
#define EVAL_BUNDLES_H
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Bundled Evaluation Path Types
|
||||||
|
|
||||||
|
typedef struct E_Eval E_Eval;
|
||||||
|
struct E_Eval
|
||||||
|
{
|
||||||
|
E_Value value;
|
||||||
|
E_Mode mode;
|
||||||
|
E_Space space;
|
||||||
|
E_Expr *expr;
|
||||||
|
E_TypeKey type_key;
|
||||||
|
E_InterpretationCode code;
|
||||||
|
E_MsgList msgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: Bundled Evaluation Functions
|
||||||
|
|
||||||
|
internal E_Eval e_eval_from_expr(Arena *arena, E_Expr *expr);
|
||||||
|
internal E_Eval e_eval_from_string(Arena *arena, String8 string);
|
||||||
|
internal E_Eval e_autoresolved_eval_from_eval(E_Eval eval);
|
||||||
|
internal E_Eval e_dynamically_typed_eval_from_eval(E_Eval eval);
|
||||||
|
internal E_Eval e_value_eval_from_eval(E_Eval eval);
|
||||||
|
internal E_Eval e_element_eval_from_array_eval_index(E_Eval eval, U64 index);
|
||||||
|
internal E_Eval e_member_eval_from_eval_member_name(E_Eval eval, String8 member_name);
|
||||||
|
|
||||||
|
#endif // EVAL_BUNDLES_H
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,82 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
#ifndef EVAL_COMPILER_H
|
|
||||||
#define EVAL_COMPILER_H
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL Bytecode Helpers
|
|
||||||
|
|
||||||
internal String8 eval_bytecode_from_oplist(Arena *arena, EVAL_OpList *list);
|
|
||||||
|
|
||||||
internal void eval_oplist_push_op(Arena *arena, EVAL_OpList *list, RDI_EvalOp op, U64 p);
|
|
||||||
internal void eval_oplist_push_uconst(Arena *arena, EVAL_OpList *list, U64 x);
|
|
||||||
internal void eval_oplist_push_sconst(Arena *arena, EVAL_OpList *list, S64 x);
|
|
||||||
|
|
||||||
internal void eval_oplist_push_bytecode(Arena *arena, EVAL_OpList *list, String8 bytecode);
|
|
||||||
|
|
||||||
internal void eval_oplist_concat_in_place(EVAL_OpList *left_dst, EVAL_OpList *right_destroyed);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL Expression Info Functions
|
|
||||||
|
|
||||||
internal RDI_EvalOp eval_opcode_from_expr_kind(EVAL_ExprKind kind);
|
|
||||||
internal B32 eval_expr_kind_is_comparison(EVAL_ExprKind kind);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL Expression Constructors
|
|
||||||
|
|
||||||
internal EVAL_Expr* eval_expr(Arena *arena, EVAL_ExprKind kind, void *location, EVAL_Expr *c0, EVAL_Expr *c1, EVAL_Expr *c2);
|
|
||||||
internal EVAL_Expr* eval_expr_u64(Arena *arena, void *location, U64 u64);
|
|
||||||
internal EVAL_Expr* eval_expr_f64(Arena *arena, void *location, F64 f64);
|
|
||||||
internal EVAL_Expr* eval_expr_f32(Arena *arena, void *location, F32 f32);
|
|
||||||
internal EVAL_Expr* eval_expr_child_and_u64(Arena *arena, EVAL_ExprKind kind, void *location, EVAL_Expr *child, U64 u64);
|
|
||||||
internal EVAL_Expr* eval_expr_leaf_member(Arena *arena, void *location, String8 name);
|
|
||||||
internal EVAL_Expr* eval_expr_leaf_ident(Arena *arena, void *location, String8 name);
|
|
||||||
internal EVAL_Expr* eval_expr_leaf_bytecode(Arena *arena, void *location, TG_Key type_key, String8 bytecode, EVAL_EvalMode mode);
|
|
||||||
internal EVAL_Expr* eval_expr_leaf_op_list(Arena *arena, void *location, TG_Key type_key, EVAL_OpList *ops, EVAL_EvalMode mode);
|
|
||||||
internal EVAL_Expr* eval_expr_leaf_type(Arena *arena, void *location, TG_Key type_key);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL Type Information Transformers
|
|
||||||
|
|
||||||
internal RDI_EvalTypeGroup eval_type_group_from_kind(TG_Kind kind);
|
|
||||||
|
|
||||||
internal TG_Key eval_type_unwrap_enum(TG_Graph *graph, RDI_Parsed *rdi, TG_Key key);
|
|
||||||
internal TG_Key eval_type_promote(TG_Graph *graph, RDI_Parsed *rdi, TG_Key key);
|
|
||||||
internal TG_Key eval_type_coerce(TG_Graph *graph, RDI_Parsed *rdi, TG_Key l, TG_Key r);
|
|
||||||
|
|
||||||
internal B32 eval_type_match(TG_Graph *graph, RDI_Parsed *rdi, TG_Key l, TG_Key r);
|
|
||||||
|
|
||||||
internal B32 eval_kind_is_integer(TG_Kind kind);
|
|
||||||
internal B32 eval_kind_is_signed(TG_Kind kind);
|
|
||||||
internal B32 eval_kind_is_basic_or_enum(TG_Kind kind);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL IR-Tree Constructors
|
|
||||||
|
|
||||||
internal EVAL_IRTree* eval_irtree_const_u(Arena *arena, U64 v);
|
|
||||||
internal EVAL_IRTree* eval_irtree_unary_op(Arena *arena, RDI_EvalOp op, RDI_EvalTypeGroup group, EVAL_IRTree *c);
|
|
||||||
internal EVAL_IRTree* eval_irtree_binary_op(Arena *arena, RDI_EvalOp op, RDI_EvalTypeGroup group, EVAL_IRTree *l, EVAL_IRTree *r);
|
|
||||||
internal EVAL_IRTree* eval_irtree_binary_op_u(Arena *arena, RDI_EvalOp op, EVAL_IRTree *l, EVAL_IRTree *r);
|
|
||||||
internal EVAL_IRTree* eval_irtree_conditional(Arena *arena, EVAL_IRTree *c, EVAL_IRTree *l, EVAL_IRTree *r);
|
|
||||||
internal EVAL_IRTree* eval_irtree_bytecode_no_copy(Arena *arena, String8 bytecode);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL IR-Tree High Level Helpers
|
|
||||||
|
|
||||||
internal EVAL_IRTree* eval_irtree_mem_read_type(Arena *arena, TG_Graph *graph, RDI_Parsed *rdi, EVAL_IRTree *c, TG_Key type_key);
|
|
||||||
internal EVAL_IRTree* eval_irtree_convert_lo(Arena *arena, EVAL_IRTree *c, RDI_EvalTypeGroup out, RDI_EvalTypeGroup in);
|
|
||||||
internal EVAL_IRTree* eval_irtree_trunc(Arena *arena, TG_Graph *graph, RDI_Parsed *rdi, EVAL_IRTree *c, TG_Key type_key);
|
|
||||||
internal EVAL_IRTree* eval_irtree_convert_hi(Arena *arena, TG_Graph *graph, RDI_Parsed *rdi, EVAL_IRTree *c, TG_Key out, TG_Key in);
|
|
||||||
internal EVAL_IRTree* eval_irtree_resolve_to_value(Arena *arena, TG_Graph *graph, RDI_Parsed *rdi, EVAL_EvalMode from_mode, EVAL_IRTree *tree, TG_Key type_key);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ allen: EVAL Compiler Phases
|
|
||||||
|
|
||||||
internal void eval_push_leaf_ident_exprs_from_expr__in_place(Arena *arena, EVAL_String2ExprMap *map, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
|
||||||
internal TG_Key eval_type_from_type_expr(Arena *arena, TG_Graph *graph, RDI_Parsed *rdi, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
|
||||||
internal EVAL_IRTreeAndType eval_irtree_and_type_from_expr(Arena *arena, TG_Graph *graph, RDI_Parsed *rdi, EVAL_String2ExprMap *leaf_ident_expr_map, EVAL_Expr *expr, EVAL_ErrorList *eout);
|
|
||||||
internal void eval_oplist_from_irtree(Arena *arena, EVAL_IRTree *tree, EVAL_OpList *out);
|
|
||||||
|
|
||||||
#endif //EVAL_COMPILER_H
|
|
||||||
+74
-218
@@ -1,218 +1,74 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Generated Code
|
//~ rjf: Generated Code
|
||||||
|
|
||||||
#include "generated/eval.meta.c"
|
#include "eval/generated/eval.meta.c"
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Basic Functions
|
//~ rjf: Basic Helper Functions
|
||||||
|
|
||||||
internal U64
|
internal U64
|
||||||
eval_hash_from_string(String8 string)
|
e_hash_from_string(U64 seed, String8 string)
|
||||||
{
|
{
|
||||||
U64 result = 5381;
|
U64 result = seed;
|
||||||
for(U64 i = 0; i < string.size; i += 1)
|
for(U64 i = 0; i < string.size; i += 1)
|
||||||
{
|
{
|
||||||
result = ((result << 5) + result) + string.str[i];
|
result = ((result << 5) + result) + string.str[i];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Error List Building Functions
|
//~ rjf: Message Functions
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
eval_error(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, String8 text){
|
e_msg(Arena *arena, E_MsgList *msgs, E_MsgKind kind, void *location, String8 text)
|
||||||
EVAL_Error *error = push_array_no_zero(arena, EVAL_Error, 1);
|
{
|
||||||
SLLQueuePush(list->first, list->last, error);
|
E_Msg *msg = push_array(arena, E_Msg, 1);
|
||||||
list->count += 1;
|
SLLQueuePush(msgs->first, msgs->last, msg);
|
||||||
list->max_kind = Max(kind, list->max_kind);
|
msgs->count += 1;
|
||||||
error->kind = kind;
|
msgs->max_kind = Max(kind, msgs->max_kind);
|
||||||
error->location = location;
|
msg->kind = kind;
|
||||||
error->text = text;
|
msg->location = location;
|
||||||
}
|
msg->text = text;
|
||||||
|
}
|
||||||
internal void
|
|
||||||
eval_errorf(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, char *fmt, ...){
|
internal void
|
||||||
va_list args;
|
e_msgf(Arena *arena, E_MsgList *msgs, E_MsgKind kind, void *location, char *fmt, ...)
|
||||||
va_start(args, fmt);
|
{
|
||||||
String8 text = push_str8fv(arena, fmt, args);
|
va_list args;
|
||||||
va_end(args);
|
va_start(args, fmt);
|
||||||
eval_error(arena, list, kind, location, text);
|
String8 text = push_str8fv(arena, fmt, args);
|
||||||
}
|
va_end(args);
|
||||||
|
e_msg(arena, msgs, kind, location, text);
|
||||||
internal void
|
}
|
||||||
eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push){
|
|
||||||
if (dst->last != 0){
|
internal void
|
||||||
if (to_push->last != 0){
|
e_msg_list_concat_in_place(E_MsgList *dst, E_MsgList *to_push)
|
||||||
dst->last->next = to_push->first;
|
{
|
||||||
dst->last = to_push->last;
|
if(dst->last != 0 && to_push->first != 0)
|
||||||
dst->count += to_push->count;
|
{
|
||||||
}
|
dst->last->next = to_push->first;
|
||||||
}
|
dst->last = to_push->last;
|
||||||
else{
|
dst->count += to_push->count;
|
||||||
*dst = *to_push;
|
dst->max_kind = Max(dst->max_kind, to_push->max_kind);
|
||||||
}
|
}
|
||||||
MemoryZeroStruct(to_push);
|
else if(to_push->first != 0)
|
||||||
}
|
{
|
||||||
|
MemoryCopyStruct(dst, to_push);
|
||||||
////////////////////////////////
|
}
|
||||||
//~ rjf: Map Functions
|
MemoryZeroStruct(to_push);
|
||||||
|
}
|
||||||
//- rjf: string -> num
|
|
||||||
|
////////////////////////////////
|
||||||
internal EVAL_String2NumMap
|
//~ rjf: Space Functions
|
||||||
eval_string2num_map_make(Arena *arena, U64 slot_count)
|
|
||||||
{
|
internal E_Space
|
||||||
EVAL_String2NumMap map = {0};
|
e_space_make(E_SpaceKind kind)
|
||||||
map.slots_count = slot_count;
|
{
|
||||||
map.slots = push_array(arena, EVAL_String2NumMapSlot, map.slots_count);
|
E_Space space = {0};
|
||||||
return map;
|
space.kind = kind;
|
||||||
}
|
return space;
|
||||||
|
}
|
||||||
internal void
|
|
||||||
eval_string2num_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, U64 num)
|
|
||||||
{
|
|
||||||
U64 hash = eval_hash_from_string(string);
|
|
||||||
U64 slot_idx = hash%map->slots_count;
|
|
||||||
EVAL_String2NumMapNode *existing_node = 0;
|
|
||||||
for(EVAL_String2NumMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
|
||||||
{
|
|
||||||
if(str8_match(node->string, string, 0) && node->num == num)
|
|
||||||
{
|
|
||||||
existing_node = node;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(existing_node == 0)
|
|
||||||
{
|
|
||||||
EVAL_String2NumMapNode *node = push_array(arena, EVAL_String2NumMapNode, 1);
|
|
||||||
SLLQueuePush_N(map->slots[slot_idx].first, map->slots[slot_idx].last, node, hash_next);
|
|
||||||
SLLQueuePush_N(map->first, map->last, node, order_next);
|
|
||||||
node->string = push_str8_copy(arena, string);
|
|
||||||
node->num = num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal U64
|
|
||||||
eval_num_from_string(EVAL_String2NumMap *map, String8 string)
|
|
||||||
{
|
|
||||||
U64 num = 0;
|
|
||||||
if(map->slots_count != 0)
|
|
||||||
{
|
|
||||||
U64 hash = eval_hash_from_string(string);
|
|
||||||
U64 slot_idx = hash%map->slots_count;
|
|
||||||
EVAL_String2NumMapNode *existing_node = 0;
|
|
||||||
for(EVAL_String2NumMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
|
||||||
{
|
|
||||||
if(str8_match(node->string, string, 0))
|
|
||||||
{
|
|
||||||
existing_node = node;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(existing_node != 0)
|
|
||||||
{
|
|
||||||
num = existing_node->num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return num;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: string -> expr
|
|
||||||
|
|
||||||
internal EVAL_String2ExprMap
|
|
||||||
eval_string2expr_map_make(Arena *arena, U64 slot_count)
|
|
||||||
{
|
|
||||||
EVAL_String2ExprMap map = {0};
|
|
||||||
map.slots_count = slot_count;
|
|
||||||
map.slots = push_array(arena, EVAL_String2ExprMapSlot, map.slots_count);
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
eval_string2expr_map_insert(Arena *arena, EVAL_String2ExprMap *map, String8 string, EVAL_Expr *expr)
|
|
||||||
{
|
|
||||||
U64 hash = eval_hash_from_string(string);
|
|
||||||
U64 slot_idx = hash%map->slots_count;
|
|
||||||
EVAL_String2ExprMapNode *existing_node = 0;
|
|
||||||
for(EVAL_String2ExprMapNode *node = map->slots[slot_idx].first;
|
|
||||||
node != 0;
|
|
||||||
node = node->hash_next)
|
|
||||||
{
|
|
||||||
if(str8_match(node->string, string, 0))
|
|
||||||
{
|
|
||||||
existing_node = node;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(existing_node == 0)
|
|
||||||
{
|
|
||||||
EVAL_String2ExprMapNode *node = push_array(arena, EVAL_String2ExprMapNode, 1);
|
|
||||||
SLLQueuePush_N(map->slots[slot_idx].first, map->slots[slot_idx].last, node, hash_next);
|
|
||||||
node->string = push_str8_copy(arena, string);
|
|
||||||
existing_node = node;
|
|
||||||
}
|
|
||||||
existing_node->expr = expr;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
eval_string2expr_map_inc_poison(EVAL_String2ExprMap *map, String8 string)
|
|
||||||
{
|
|
||||||
U64 hash = eval_hash_from_string(string);
|
|
||||||
U64 slot_idx = hash%map->slots_count;
|
|
||||||
for(EVAL_String2ExprMapNode *node = map->slots[slot_idx].first;
|
|
||||||
node != 0;
|
|
||||||
node = node->hash_next)
|
|
||||||
{
|
|
||||||
if(str8_match(node->string, string, 0))
|
|
||||||
{
|
|
||||||
node->poison_count += 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
eval_string2expr_map_dec_poison(EVAL_String2ExprMap *map, String8 string)
|
|
||||||
{
|
|
||||||
U64 hash = eval_hash_from_string(string);
|
|
||||||
U64 slot_idx = hash%map->slots_count;
|
|
||||||
for(EVAL_String2ExprMapNode *node = map->slots[slot_idx].first;
|
|
||||||
node != 0;
|
|
||||||
node = node->hash_next)
|
|
||||||
{
|
|
||||||
if(str8_match(node->string, string, 0) && node->poison_count > 0)
|
|
||||||
{
|
|
||||||
node->poison_count -= 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal EVAL_Expr *
|
|
||||||
eval_expr_from_string(EVAL_String2ExprMap *map, String8 string)
|
|
||||||
{
|
|
||||||
EVAL_Expr *expr = &eval_expr_nil;
|
|
||||||
if(map->slots_count != 0)
|
|
||||||
{
|
|
||||||
U64 hash = eval_hash_from_string(string);
|
|
||||||
U64 slot_idx = hash%map->slots_count;
|
|
||||||
EVAL_String2ExprMapNode *existing_node = 0;
|
|
||||||
for(EVAL_String2ExprMapNode *node = map->slots[slot_idx].first; node != 0; node = node->hash_next)
|
|
||||||
{
|
|
||||||
if(str8_match(node->string, string, 0) && node->poison_count == 0)
|
|
||||||
{
|
|
||||||
existing_node = node;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(existing_node != 0)
|
|
||||||
{
|
|
||||||
expr = existing_node->expr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return expr;
|
|
||||||
}
|
|
||||||
|
|||||||
+161
-221
@@ -1,221 +1,161 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
#ifndef EVAL_CORE_H
|
#ifndef EVAL_CORE_H
|
||||||
#define EVAL_CORE_H
|
#define EVAL_CORE_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Errors
|
//~ rjf: Messages
|
||||||
|
|
||||||
typedef enum EVAL_ErrorKind
|
typedef enum E_MsgKind
|
||||||
{
|
{
|
||||||
EVAL_ErrorKind_Null,
|
E_MsgKind_Null,
|
||||||
EVAL_ErrorKind_MalformedInput,
|
E_MsgKind_MalformedInput,
|
||||||
EVAL_ErrorKind_MissingInfo,
|
E_MsgKind_MissingInfo,
|
||||||
EVAL_ErrorKind_ResolutionFailure,
|
E_MsgKind_ResolutionFailure,
|
||||||
EVAL_ErrorKind_InterpretationError,
|
E_MsgKind_InterpretationError,
|
||||||
EVAL_ErrorKind_COUNT
|
E_MsgKind_COUNT
|
||||||
}
|
}
|
||||||
EVAL_ErrorKind;
|
E_MsgKind;
|
||||||
|
|
||||||
typedef struct EVAL_Error EVAL_Error;
|
typedef struct E_Msg E_Msg;
|
||||||
struct EVAL_Error
|
struct E_Msg
|
||||||
{
|
{
|
||||||
EVAL_Error *next;
|
E_Msg *next;
|
||||||
EVAL_ErrorKind kind;
|
E_MsgKind kind;
|
||||||
void *location;
|
void *location;
|
||||||
String8 text;
|
String8 text;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct EVAL_ErrorList EVAL_ErrorList;
|
typedef struct E_MsgList E_MsgList;
|
||||||
struct EVAL_ErrorList
|
struct E_MsgList
|
||||||
{
|
{
|
||||||
EVAL_Error *first;
|
E_Msg *first;
|
||||||
EVAL_Error *last;
|
E_Msg *last;
|
||||||
EVAL_ErrorKind max_kind;
|
E_MsgKind max_kind;
|
||||||
U64 count;
|
U64 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Operation Types
|
//~ rjf: Register-Sized Value Type
|
||||||
|
|
||||||
enum
|
typedef union E_Value E_Value;
|
||||||
{
|
union E_Value
|
||||||
EVAL_IRExtKind_Bytecode = RDI_EvalOp_COUNT,
|
{
|
||||||
EVAL_IRExtKind_COUNT
|
U64 u512[8];
|
||||||
};
|
U64 u256[4];
|
||||||
|
U128 u128;
|
||||||
typedef struct EVAL_Op EVAL_Op;
|
U64 u64;
|
||||||
struct EVAL_Op
|
U32 u32;
|
||||||
{
|
U16 u16;
|
||||||
EVAL_Op *next;
|
S64 s64;
|
||||||
RDI_EvalOp opcode;
|
S32 s32;
|
||||||
union
|
S32 s16;
|
||||||
{
|
F64 f64;
|
||||||
U64 p;
|
F32 f32;
|
||||||
String8 bytecode;
|
};
|
||||||
};
|
|
||||||
};
|
////////////////////////////////
|
||||||
|
//~ rjf: Operator Info
|
||||||
typedef struct EVAL_OpList EVAL_OpList;
|
|
||||||
struct EVAL_OpList
|
typedef enum E_OpKind
|
||||||
{
|
{
|
||||||
EVAL_Op *first_op;
|
E_OpKind_Null,
|
||||||
EVAL_Op *last_op;
|
E_OpKind_UnaryPrefix,
|
||||||
U32 op_count;
|
E_OpKind_Binary,
|
||||||
U32 encoded_size;
|
}
|
||||||
};
|
E_OpKind;
|
||||||
|
|
||||||
////////////////////////////////
|
typedef struct E_OpInfo E_OpInfo;
|
||||||
//~ rjf: Generated Code
|
struct E_OpInfo
|
||||||
|
{
|
||||||
#include "eval/generated/eval.meta.h"
|
E_OpKind kind;
|
||||||
|
S64 precedence;
|
||||||
////////////////////////////////
|
String8 pre;
|
||||||
//~ rjf: Expression Tree Types
|
String8 sep;
|
||||||
|
String8 post;
|
||||||
typedef enum EVAL_EvalMode
|
};
|
||||||
{
|
|
||||||
EVAL_EvalMode_NULL,
|
////////////////////////////////
|
||||||
EVAL_EvalMode_Value,
|
//~ rjf: Evaluation Spaces
|
||||||
EVAL_EvalMode_Addr,
|
//
|
||||||
EVAL_EvalMode_Reg
|
// NOTE(rjf): Evaluations occur within the context of a "space". Each "space"
|
||||||
}
|
// refers to a different offset/address-space, but it's a bit looser of a
|
||||||
EVAL_EvalMode;
|
// concept than just address space, since it can also refer to offsets into
|
||||||
|
// a register block, and it is also used to refer to spaces of unique IDs for
|
||||||
typedef struct EVAL_Expr EVAL_Expr;
|
// key-value stores, e.g. for information in the debugger.
|
||||||
struct EVAL_Expr
|
//
|
||||||
{
|
// Effectively, when considering the result of an evaluation, you use the
|
||||||
EVAL_ExprKind kind;
|
// value for understanding a key *into* a space, e.g. 1+2 -> 3, in a null
|
||||||
void *location;
|
// space, or &foo, in the space of PID: 1234.
|
||||||
union
|
|
||||||
{
|
typedef U64 E_SpaceKind;
|
||||||
EVAL_Expr *children[3];
|
enum
|
||||||
U32 u32;
|
{
|
||||||
U64 u64;
|
E_SpaceKind_Null,
|
||||||
F32 f32;
|
E_SpaceKind_FileSystem,
|
||||||
F64 f64;
|
E_SpaceKind_FirstUserDefined,
|
||||||
struct
|
};
|
||||||
{
|
|
||||||
EVAL_Expr *child;
|
typedef struct E_Space E_Space;
|
||||||
U64 u64;
|
struct E_Space
|
||||||
} child_and_constant;
|
{
|
||||||
String8 name;
|
E_SpaceKind kind;
|
||||||
struct
|
union
|
||||||
{
|
{
|
||||||
TG_Key type_key;
|
U64 u64s[3];
|
||||||
String8 bytecode;
|
struct
|
||||||
EVAL_EvalMode mode;
|
{
|
||||||
};
|
U64 u64_0;
|
||||||
};
|
U128 u128;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
////////////////////////////////
|
};
|
||||||
//~ rjf: IR Tree Types
|
|
||||||
|
////////////////////////////////
|
||||||
typedef struct EVAL_IRTree EVAL_IRTree;
|
//~ rjf: Evaluation Modes
|
||||||
struct EVAL_IRTree{
|
|
||||||
RDI_EvalOp op;
|
typedef enum E_Mode
|
||||||
EVAL_IRTree *children[3];
|
{
|
||||||
union{
|
E_Mode_Null,
|
||||||
U64 p;
|
E_Mode_Value,
|
||||||
String8 bytecode;
|
E_Mode_Offset,
|
||||||
};
|
}
|
||||||
};
|
E_Mode;
|
||||||
|
|
||||||
typedef struct EVAL_IRTreeAndType EVAL_IRTreeAndType;
|
////////////////////////////////
|
||||||
struct EVAL_IRTreeAndType{
|
//~ rjf: Modules
|
||||||
EVAL_IRTree *tree;
|
|
||||||
TG_Key type_key;
|
typedef struct E_Module E_Module;
|
||||||
EVAL_EvalMode mode;
|
struct E_Module
|
||||||
};
|
{
|
||||||
|
RDI_Parsed *rdi;
|
||||||
////////////////////////////////
|
Rng1U64 vaddr_range;
|
||||||
//~ rjf: Map Types
|
Arch arch;
|
||||||
|
E_Space space;
|
||||||
//- rjf: string -> num
|
};
|
||||||
|
|
||||||
typedef struct EVAL_String2NumMapNode EVAL_String2NumMapNode;
|
////////////////////////////////
|
||||||
struct EVAL_String2NumMapNode
|
//~ rjf: Generated Code
|
||||||
{
|
|
||||||
EVAL_String2NumMapNode *order_next;
|
#include "eval/generated/eval.meta.h"
|
||||||
EVAL_String2NumMapNode *hash_next;
|
|
||||||
String8 string;
|
////////////////////////////////
|
||||||
U64 num;
|
//~ rjf: Basic Helper Functions
|
||||||
};
|
|
||||||
|
internal U64 e_hash_from_string(U64 seed, String8 string);
|
||||||
typedef struct EVAL_String2NumMapSlot EVAL_String2NumMapSlot;
|
#define e_value_u64(v) (E_Value){.u64 = (v)}
|
||||||
struct EVAL_String2NumMapSlot
|
|
||||||
{
|
////////////////////////////////
|
||||||
EVAL_String2NumMapNode *first;
|
//~ rjf: Message Functions
|
||||||
EVAL_String2NumMapNode *last;
|
|
||||||
};
|
internal void e_msg(Arena *arena, E_MsgList *msgs, E_MsgKind kind, void *location, String8 text);
|
||||||
|
internal void e_msgf(Arena *arena, E_MsgList *msgs, E_MsgKind kind, void *location, char *fmt, ...);
|
||||||
typedef struct EVAL_String2NumMap EVAL_String2NumMap;
|
internal void e_msg_list_concat_in_place(E_MsgList *dst, E_MsgList *to_push);
|
||||||
struct EVAL_String2NumMap
|
|
||||||
{
|
////////////////////////////////
|
||||||
U64 slots_count;
|
//~ rjf: Space Functions
|
||||||
EVAL_String2NumMapSlot *slots;
|
|
||||||
EVAL_String2NumMapNode *first;
|
internal E_Space e_space_make(E_SpaceKind kind);
|
||||||
EVAL_String2NumMapNode *last;
|
|
||||||
};
|
#endif // EVAL_CORE_H
|
||||||
|
|
||||||
//- rjf: string -> expr
|
|
||||||
|
|
||||||
typedef struct EVAL_String2ExprMapNode EVAL_String2ExprMapNode;
|
|
||||||
struct EVAL_String2ExprMapNode
|
|
||||||
{
|
|
||||||
EVAL_String2ExprMapNode *hash_next;
|
|
||||||
String8 string;
|
|
||||||
EVAL_Expr *expr;
|
|
||||||
U64 poison_count;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct EVAL_String2ExprMapSlot EVAL_String2ExprMapSlot;
|
|
||||||
struct EVAL_String2ExprMapSlot
|
|
||||||
{
|
|
||||||
EVAL_String2ExprMapNode *first;
|
|
||||||
EVAL_String2ExprMapNode *last;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct EVAL_String2ExprMap EVAL_String2ExprMap;
|
|
||||||
struct EVAL_String2ExprMap
|
|
||||||
{
|
|
||||||
U64 slots_count;
|
|
||||||
EVAL_String2ExprMapSlot *slots;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Globals
|
|
||||||
|
|
||||||
global read_only EVAL_Expr eval_expr_nil = {0};
|
|
||||||
global read_only EVAL_IRTree eval_irtree_nil = {0};
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Basic Functions
|
|
||||||
|
|
||||||
internal U64 eval_hash_from_string(String8 string);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Error List Building Functions
|
|
||||||
|
|
||||||
internal void eval_error(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, String8 text);
|
|
||||||
internal void eval_errorf(Arena *arena, EVAL_ErrorList *list, EVAL_ErrorKind kind, void *location, char *fmt, ...);
|
|
||||||
internal void eval_error_list_concat_in_place(EVAL_ErrorList *dst, EVAL_ErrorList *to_push);
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ rjf: Map Functions
|
|
||||||
|
|
||||||
//- rjf: string -> num
|
|
||||||
internal EVAL_String2NumMap eval_string2num_map_make(Arena *arena, U64 slot_count);
|
|
||||||
internal void eval_string2num_map_insert(Arena *arena, EVAL_String2NumMap *map, String8 string, U64 num);
|
|
||||||
internal U64 eval_num_from_string(EVAL_String2NumMap *map, String8 string);
|
|
||||||
|
|
||||||
//- rjf: string -> expr
|
|
||||||
internal EVAL_String2ExprMap eval_string2expr_map_make(Arena *arena, U64 slot_count);
|
|
||||||
internal void eval_string2expr_map_insert(Arena *arena, EVAL_String2ExprMap *map, String8 string, EVAL_Expr *expr);
|
|
||||||
internal void eval_string2expr_map_inc_poison(EVAL_String2ExprMap *map, String8 string);
|
|
||||||
internal void eval_string2expr_map_dec_poison(EVAL_String2ExprMap *map, String8 string);
|
|
||||||
internal EVAL_Expr *eval_expr_from_string(EVAL_String2ExprMap *map, String8 string);
|
|
||||||
|
|
||||||
#endif // EVAL_CORE_H
|
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
// NOTE(allen): Eval Decode Function
|
|
||||||
|
|
||||||
internal void
|
|
||||||
eval_print_decode_from_bytecode(FILE *out, String8 bytecode){
|
|
||||||
U8 *ptr = bytecode.str;
|
|
||||||
U8 *opl = bytecode.str + bytecode.size;
|
|
||||||
|
|
||||||
for (;ptr < opl;){
|
|
||||||
// consume opcode
|
|
||||||
SYMS_EvalOp op = (SYMS_EvalOp)*ptr;
|
|
||||||
if (op >= SYMS_EvalOp_COUNT){
|
|
||||||
fprintf(out, "decode error: undefined op code\n");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
U8 ctrlbits = syms_eval_opcode_ctrlbits[op];
|
|
||||||
ptr += 1;
|
|
||||||
|
|
||||||
// decode
|
|
||||||
U64 imm = 0;
|
|
||||||
U32 decode_size = (ctrlbits >> SYMS_EvalOpCtrlBits_DecodeShft)&SYMS_EvalOpCtrlBits_DecodeMask;
|
|
||||||
{
|
|
||||||
U8 *next_ptr = ptr + decode_size;
|
|
||||||
if (next_ptr > opl){
|
|
||||||
fprintf(out, "decode error: expected constant goes past the end of bytecode\n");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
// TODO(allen): to improve this:
|
|
||||||
// gaurantee 8 bytes padding after the end of serialized bytecode
|
|
||||||
// read 8 bytes and mask
|
|
||||||
switch (decode_size){
|
|
||||||
case 1: imm = *ptr; break;
|
|
||||||
case 2: imm = *(U16*)ptr; break;
|
|
||||||
case 4: imm = *(U32*)ptr; break;
|
|
||||||
case 8: imm = *(U64*)ptr; break;
|
|
||||||
}
|
|
||||||
ptr = next_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// op string & control bits
|
|
||||||
SYMS_String8 op_string = syms_eval_opcode_strings[op];
|
|
||||||
|
|
||||||
// print
|
|
||||||
fprintf(out, "%.*s 0x%llx\n", str8_varg(op_string), imm);
|
|
||||||
}
|
|
||||||
done:;
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user