autotest: fixed using GNU screen for opening gdb

screen doesn't start the process in the current working directory
This commit is contained in:
Andrew Tridgell 2023-08-05 13:11:52 +10:00
parent 2d68e1f40d
commit 1cc83223af
2 changed files with 2 additions and 2 deletions

View File

@ -506,7 +506,7 @@ def start_SITL(binary,
'-d',
'-m',
'-S', 'ardupilot-gdb',
'gdb', '-x', '/tmp/x.gdb', binary, '--args'])
'gdb', '--cd', os.getcwd(), '-x', '/tmp/x.gdb', binary, '--args'])
elif lldb:
f = open("/tmp/x.lldb", "w")
for breakingpoint in breakpoints:

View File

@ -43,7 +43,7 @@ elif [ -n "$DISPLAY" -a -n "$(which gnome-terminal)" ]; then
gnome-terminal -e "$*"
elif [ -n "$STY" ]; then
# We are running inside of screen, try to start it there
screen -X screen -t "$name" $*
screen -X screen -t "$name" bash -c "cd $PWD; $*"
else
filename="/tmp/$name.log"
echo "RiTW: Window access not found, logging to $filename"