How to run program in gdb via bashscript with backtrace?

293 Views Asked by At

I'm trying to run my program TestApc via gdb and get useful data when my program crash with back trace command ("bt" command).

I wrote a bash script , which look like:

#!/bin/bash
gdb -ex=r --args ./TestApc

When the program crash, I can't type the "bt" command (because I get out from the gdb console) Is there a way to stay on gdb after the crash ?

0

There are 0 best solutions below