file coreFile
set logging on fullPathToLogFile thread apply all bt full
gdb -batch-silent -x commands.txt program coreFile