so i have my training code saved in trainer.py file and for gdb backtracking i am planning to execute this command from terminal :
gdb -batch --ex “run” -ex “bt” --args python trainer.py 2>&1 | grep -v ^“No stack.” > log.txt
it should train my model using trainer.py file and save log in log.txt file,am i on track? or i am making mistake? is the command right for saving backtracking log?