This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Test attaching to a process that isn't a process group leader


*** TEST RESULTS FOR COMMIT 46f67f80ddfeea11d4a8134b347c74581faff8f6 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 46f67f80ddfeea11d4a8134b347c74581faff8f6

Test attaching to a process that isn't a process group leader

The patch at
<https://sourceware.org/ml/gdb-patches/2017-11/msg00039.html> 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  <palves@redhat.com>

	* gdb.base/attach-non-pgrp-leader.c: New.
	* gdb.base/attach-non-pgrp-leader.exp: New.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]