running gdb on a child executable -


i have bash script calls bash script calls (very fast) executable. know if there's way of attaching gdb executable without modifying second script or without attaching pid (given quick execution).

the way can imagine rename executable (or change path same result if can not modify exe name) , wrap script has executable former name (or first in path order) call gdb. bash script should :

#!/bin/bash gdb -q -x gdbcommandsfile --args "$@" 

with @ least 'run' in gdbcommandsfile, depending on want ...

my2c


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -