1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
Garrys Mod Linux AMD64 - Symbol Not Found
Hello when I am trying to start up Garrys Mod i get the following error
```
brax_ton@penguin:~/GarrysMod$ ./start.sh
Box86 with Dynarec v0.3.1 5cdc1b9f built on Jun 17 2023 18:36:53
Error: reading elf header of /home/brax_ton/GarrysMod/game/bin/linux64/gmod, try to launch using box64 instead
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL PageSize:4096 Running on Cortex-A53 with 8 Cores
Params database has 24 entries
Box64 with Dynarec v0.2.3 7e282c90 built on Jun 15 2023 06:36:07
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 45 Env var
Looking for /home/brax_ton/GarrysMod/game/bin/linux64/gmod
argv[1]="-game"
argv[2]="garrysmod"
Rename process to "gmod"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libtier0_client.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libvstdlib_client.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libsteam_api.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libtogl_client.so
Using native(wrapped) libSDL2-2.0.so.0
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Warning: Weak Symbol _ITM_memcpyRtWn not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68078 (0x990f6)
Warning: Weak Symbol _ITM_RU1 not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68688 (0x99d16)
Warning: Weak Symbol _ZGTtdlPv not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68b08 (0x9a616)
Warning: Weak Symbol _ITM_RU8 not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68ff0 (0x9afe6)
Warning: Weak Symbol _ITM_memcpyRnWt not found, cannot apply R_X86_64_JUMP_SLOT @0x101e69480 (0x9b906)
Warning: Weak Symbol _ZGTtnam not found, cannot apply R_X86_64_JUMP_SLOT @0x101e69c80 (0x9c906)
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0x10151a268 (0x111c06)
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4db60 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dcd0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dd00 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dde0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4deb0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4df20 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4df40 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4df60 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e3f0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e410 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e4d0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e4f0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e580 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e5a0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e720 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e740 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e760 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e860 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e890 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dcc0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dcf0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4ddd0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4de80 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4de90 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dea0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e3a0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e3e0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e4c0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e570 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e710 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e850 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e880 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv121__vmi_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dee0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: relocating symbols in elf launcher_client.so
Error initializing needed lib launcher_client.so
Warning: Cannot dlopen("launcher_client.so"/0x400ead, 2)
Failed to load the launcher (Cannot dlopen("launcher_client.so"/0x400ead, 2)
)
Warning, resizing of TLS occurred! size: 0->65536 / n_elfs: 1->1
/home/brax_ton/GarrysMod/game/hl2.sh: line 52: 21694 Segmentation fault (core dumped) box86 ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
brax_ton@penguin:~/GarrysMod$ ^C
brax_ton@penguin:~/GarrysMod$ ^C
brax_ton@penguin:~/GarrysMod$ ^C
brax_ton@penguin:~/GarrysMod$ nano /home/brax_ton/GarrysMod/game/hl2.sh
brax_ton@penguin:~/GarrysMod$ ./start.sh
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL PageSize:4096 Running on Cortex-A53 with 8 Cores
Params database has 24 entries
Box64 with Dynarec v0.2.3 7e282c90 built on Jun 15 2023 06:36:07
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 45 Env var
Looking for /home/brax_ton/GarrysMod/game/bin/linux64/gmod
argv[1]="-game"
argv[2]="garrysmod"
Rename process to "gmod"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libtier0_client.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libvstdlib_client.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libsteam_api.so
Using emulated /home/brax_ton/GarrysMod/game/bin/linux64/libtogl_client.so
Using native(wrapped) libSDL2-2.0.so.0
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Warning: Weak Symbol _ITM_memcpyRtWn not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68078 (0x990f6)
Warning: Weak Symbol _ITM_RU1 not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68688 (0x99d16)
Warning: Weak Symbol _ZGTtdlPv not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68b08 (0x9a616)
Warning: Weak Symbol _ITM_RU8 not found, cannot apply R_X86_64_JUMP_SLOT @0x101e68ff0 (0x9afe6)
Warning: Weak Symbol _ITM_memcpyRnWt not found, cannot apply R_X86_64_JUMP_SLOT @0x101e69480 (0x9b906)
Warning: Weak Symbol _ZGTtnam not found, cannot apply R_X86_64_JUMP_SLOT @0x101e69c80 (0x9c906)
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0x10151a268 (0x111c06)
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4db60 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dcd0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dd00 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dde0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4deb0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4df20 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4df40 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4df60 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e3f0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e410 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e4d0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e4f0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e580 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e5a0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e720 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e740 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e760 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e860 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv120__si_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e890 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dcc0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dcf0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4ddd0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4de80 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4de90 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dea0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e3a0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e3e0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e4c0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e570 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e710 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e850 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv117__class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4e880 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: Symbol _ZTVN10__cxxabiv121__vmi_class_type_infoE not found, cannot apply R_X86_64_64 @0x100a4dee0 ((nil)) in /home/brax_ton/GarrysMod/game/bin/linux64/launcher_client.so
Error: relocating symbols in elf launcher_client.so
Error initializing needed lib launcher_client.so
Warning: Cannot dlopen("launcher_client.so"/0x400ead, 2)
Failed to load the launcher (Cannot dlopen("launcher_client.so"/0x400ead, 2)
)
Warning, resizing of TLS occurred! size: 0->65536 / n_elfs: 1->1
/home/brax_ton/GarrysMod/game/hl2.sh: line 52: 21743 Segmentation fault (core dumped) box64 ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
brax_ton@penguin:~/GarrysMod$
```
Inside of Start.sh:
```
#!/bin/bash
# figure out the absolute path to the script being run a bit
# non-obvious, the ${0%/*} pulls the path out of $0, cd's into the
# specified directory, then uses $PWD to figure out where that
# directory lives - and all this in a subshell, so we don't affect
# $PWD
GAMEROOT=$(cd "${0%/*}" && echo $PWD)/bin/linux64
export LD_LIBRARY_PATH="${GAMEROOT}":$LD_LIBRARY_PATH
unset LD_PRELOAD
GAMEEXE=gmod
ulimit -n 2048
# enable nVidia threaded optimizations
export __GL_THREADED_OPTIMIZATIONS=1
# and launch the game
cd "$GAMEROOT"
# Enable path match if we are running with loose files
if [ -f pathmatch.inf ]; then
export ENABLE_PATHMATCH=1
fi
# Do the following for strace:
# GAME_DEBUGGER="strace -f -o strace.log"
# Do the following for tcmalloc
# LD_PRELOAD=../src/thirdparty/gperftools-2.0/.libs/libtcmalloc_debug.so:$LD_PRELOAD
STATUS=42
while [ $STATUS -eq 42 ]; do
if [ "${GAME_DEBUGGER}" == "gdb" ] || [ "${GAME_DEBUGGER}" == "cgdb" ]; then
ARGSFILE=$(mktemp $USER.hl2.gdb.XXXX)
echo b main > "$ARGSFILE"
# Set the LD_PRELOAD varname in the debugger, and unset the global version. This makes it so that
# gameoverlayrenderer.so and the other preload objects aren't loaded in our debugger's process.
echo set env LD_PRELOAD=$LD_PRELOAD >> "$ARGSFILE"
echo show env LD_PRELOAD >> "$ARGSFILE"
unset LD_PRELOAD
echo run $@ >> "$ARGSFILE"
echo show args >> "$ARGSFILE"
${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -x "$ARGSFILE"
rm "$ARGSFILE"
else
box64 ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
fi
STATUS=$?
done
exit $STATUS
```
CHROOT OS: Debian
Host OS: Chrome OS
Memory: 4GB
Thanks!
|