Skip to content

Commit

Permalink
Show patches applied in loop gdb log
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Mar 5, 2024
1 parent 4a8b35b commit 6d7cd2a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/include/gdb_loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,18 @@ $CFG_ENV_RUNTIME gdb -ex='set confirm off' \
-ex=quit --args \
./$CFG_BIN "exec autoexec.cfg;logfile $logfile;#sid:$SERVER_UUID:loop_script"
EOF
git_patches="$(get_applied_git_patches)"
start_ts=$(date '+%Y-%m-%d %H:%M:%S')
{
echo "/============= server start $start_ts =============\\"
echo "build commit: $(get_commit)"
echo "gdb ./bin/backup/$(get_commit) $gdb_corefile"
echo "objdump -dCS -M intel bin/backup/$(get_commit) > ./lib/tmp/debug.asm && vim ./lib/tmp/debug.asm"
echo "python -c 'print(hex(0xbabe + 10))'"
echo "/============= server start $start_ts =============\\"
echo "build commit: $(get_commit)"
if [ "$git_patches" != "" ]
then
echo "applied patches: $git_patches"
fi
echo "gdb ./bin/backup/$(get_commit) $gdb_corefile"
echo "objdump -dCS -M intel bin/backup/$(get_commit) > ./lib/tmp/debug.asm && vim ./lib/tmp/debug.asm"
echo "python -c 'print(hex(0xbabe + 10))'"
} >> "$p/full_gdb.txt"
echo ""
eval "$GDB_CMD"
Expand Down

0 comments on commit 6d7cd2a

Please sign in to comment.