From 46f67f80ddfeea11d4a8134b347c74581faff8f6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 6 Nov 2017 15:36:47 +0000 Subject: Test attaching to a process that isn't a process group leader The patch at was proposing to add an assertion to child_terminal_init that turns out would fail if you tried to attach to a process that isn't a process group leader. Since the testsuite failed to catch the problem, this commit adds a new testcase that would catch it, like: (gdb) attach 12415 Attaching to program: build/gdb/testsuite/outputs/gdb.base/attach-non-pgrp-leader/attach-non-pgrp-leader, process 12415 src/gdb/inflow.c:180: internal-error: void child_terminal_init(target_ops*): Assertion `getpgid (inf->pid) == inf->pid' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) FAIL: gdb.base/attach-non-pgrp-leader.exp: child: attach to child (GDB internal error) gdb/testsuite/ChangeLog: 2017-11-06 Pedro Alves * gdb.base/attach-non-pgrp-leader.c: New. * gdb.base/attach-non-pgrp-leader.exp: New. --- gdb/testsuite/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/testsuite/ChangeLog') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fce9deb..371e98b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-11-06 Pedro Alves + * gdb.base/attach-non-pgrp-leader.c: New. + * gdb.base/attach-non-pgrp-leader.exp: New. + +2017-11-06 Pedro Alves + * configure.ac: No longer check for termio.h and sgtty.h. * configure: Regenerate. * remote-utils.c: Include termios.h instead of gdb_termios.h. -- cgit v1.1