mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Implement --debugger option to improve UX when debugging crashes (#13157)
This commit is contained in:
parent
6f5703baf1
commit
87d509e462
7 changed files with 193 additions and 17 deletions
|
@ -19,10 +19,6 @@ waitfor () {
|
|||
exit 1
|
||||
}
|
||||
|
||||
gdbrun () {
|
||||
gdb -q -batch -ex 'set confirm off' -ex 'r' -ex 'bt' --args "$@"
|
||||
}
|
||||
|
||||
[ -e "$minetest" ] || { echo "executable $minetest missing"; exit 1; }
|
||||
|
||||
rm -rf "$worldpath"
|
||||
|
@ -39,11 +35,11 @@ printf '%s\n' >"$testspath/server.conf" \
|
|||
ln -s "$dir/helper_mod" "$worldpath/worldmods/"
|
||||
|
||||
echo "Starting server"
|
||||
gdbrun "$minetest" --server --config "$conf_server" --world "$worldpath" --gameid $gameid 2>&1 | sed -u 's/^/(server) /' &
|
||||
"$minetest" --debugger --server --config "$conf_server" --world "$worldpath" --gameid $gameid 2>&1 | sed -u 's/^/(server) /' &
|
||||
waitfor "$worldpath/startup"
|
||||
|
||||
echo "Starting client"
|
||||
gdbrun "$minetest" --config "$conf_client1" --go --address 127.0.0.1 2>&1 | sed -u 's/^/(client) /' &
|
||||
"$minetest" --debugger --config "$conf_client1" --go --address 127.0.0.1 2>&1 | sed -u 's/^/(client) /' &
|
||||
waitfor "$worldpath/done"
|
||||
|
||||
echo "Waiting for client and server to exit"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue