[Bug testsuite/31633] [gdb/testsuite] FAIL: gdb.server/server-kill-python.exp: ensure inferior is running
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Wed Apr 17 09:44:57 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31633
--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=75d277b1f506dcfbedfee3bef078dfe2b484958b
commit 75d277b1f506dcfbedfee3bef078dfe2b484958b
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Apr 17 11:45:02 2024 +0200
[gdb/testsuite] Fix gdbserver pid in gdb.server/server-kill-python.exp
The commit ed32754a8c7 ("[gdb/testsuite] Fix gdb.server/multi-ui-errors.exp
for
remote target") intended to addresss the problem that this command:
...
set gdbserver_pid [exp_pid -i $server_spawn_id]
...
does not return the pid of the gdbserver for remote target, but rather the
one
of the ssh client session.
To fix this, it added another way of getting the gdbserver_pid.
For the trivial case of non-remote target, the PID found by either method
should be identical, but if we compare those by adding
"puts [exec ps -p $gdbserver_pid]" we get:
...
PID TTY TIME CMD
31711 pts/8 00:00:00 gdbserver
PID TTY TIME CMD
31718 pts/8 00:00:00 server-kill-pyt
...
The problem is that while the gdbserver PID is supposed to be read from the
result of "gdb.execute ('p server_pid')" in the python script, instead it's
taken from:
...
Process server-kill-python created; pid = 31718^M
...
Fix this by moving the printing of the gdbserver PID out of the python
script.
Also double-check the two methods against each other, in the cases that
they
should match.
Tested on x86_64-linux.
PR testsuite/31633
https://sourceware.org/bugzilla/show_bug.cgi?id=31633
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list