Gdb fix for run with scripts
Merge branch 'gdb-fix-new'