old-cross-binutils/gdb/testsuite/gdb.threads
Pedro Alves 7759842763 PR gdb/18717: internal error if non-leader thread exits process
If a non-leader thread exits the process while all other threads are
ptrace-stopped, native gdb fails an assertion.  The test added by this
commit catches it:

 /home/pedro/gdb/mygit/build/../src/gdb/linux-nat.c:3198: internal-error: linux_nat_filter_event: Assertion `lp->resumed' failed.
 A problem internal to GDB has been detected,
 further debugging may prove unreliable.
 Quit this debugging session? (y or n)
 FAIL: gdb.threads/non-leader-exit-process.exp: program exits normally (GDB internal error)

The fix is just to remove the assertion.

With that out of the way, neither GDB not GDBserver handle this
perfectly though, so I'm adding a KFAIL:

 (gdb) continue
 Continuing.
 [Thread 0x7ffff7fc0700 (LWP 15350) exited]
 No unwaited-for children left.
 Couldn't get registers: No such process.
 (gdb) KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally (PRMS: gdb/18717)

gdb/ChangeLog:
2015-07-24  Pedro Alves  <palves@redhat.com>

	PR gdb/18717
	* linux-nat.c (linux_nat_filter_event): Don't assert that the lwp
	is resumed, and extend the debug log.

gdb/testsuite/ChangeLog:
2015-07-24  Pedro Alves  <palves@redhat.com>

	PR gdb/18717
	* gdb.threads/non-ldr-exit.c: New file.
	* gdb.threads/non-ldr-exit.exp: New file.
2015-07-24 17:49:17 +01:00
..
attach-into-signal.c
attach-into-signal.exp
attach-many-short-lived-threads.c Improve gdb.threads/attach-many-short-lived-threads.exp timeout handling 2015-02-06 13:24:32 +01:00
attach-many-short-lived-threads.exp Improve gdb.threads/attach-many-short-lived-threads.exp timeout handling 2015-02-06 13:24:32 +01:00
attach-stopped.c
attach-stopped.exp
bp_in_thread.c
bp_in_thread.exp
break-while-running.c
break-while-running.exp
clone-new-thread-event.c
clone-new-thread-event.exp
clone-thread_db.c gdb.threads/clone-thread_db.c: Add missing includes and fix pthread_join call 2015-03-04 09:13:49 +00:00
clone-thread_db.exp PR18006: internal error if threaded program calls clone(CLONE_VM) 2015-02-20 19:00:21 +00:00
continue-pending-after-query.c Linux: make target_is_async_p return false when async is off 2015-01-23 11:12:39 +00:00
continue-pending-after-query.exp Linux: make target_is_async_p return false when async is off 2015-01-23 11:12:39 +00:00
continue-pending-status.c native/Linux: internal error if resume is short-circuited 2015-03-19 12:26:49 +00:00
continue-pending-status.exp gdbserver/Linux: unbreak thread event randomization 2015-03-19 12:38:05 +00:00
corethreads.c
corethreads.exp
create-fail.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
create-fail.exp
current-lwp-dead.c
current-lwp-dead.exp
dlopen-libpthread-lib.c
dlopen-libpthread.c
dlopen-libpthread.exp
execl.c
execl.exp
execl1.c
fork-child-threads.c
fork-child-threads.exp
fork-thread-pending.c
fork-thread-pending.exp Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
gcore-stale-thread.c
gcore-stale-thread.exp
gcore-thread.exp
hand-call-in-threads.c
hand-call-in-threads.exp
hand-call-new-thread.c PR threads/18127 - threads spawned by infcall end up stuck in "running" state 2015-06-29 16:07:57 +01:00
hand-call-new-thread.exp PR threads/18127 - threads spawned by infcall end up stuck in "running" state 2015-06-29 16:07:57 +01:00
ia64-sigill.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
ia64-sigill.exp
info-threads-cur-sal-2.c
info-threads-cur-sal.c
info-threads-cur-sal.exp
interrupted-hand-call.c
interrupted-hand-call.exp
kill.c
kill.exp
killed.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
killed.exp
leader-exit.c
leader-exit.exp
linux-dp.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
linux-dp.exp
local-watch-wrong-thread.c
local-watch-wrong-thread.exp
Makefile.in
manythreads.c
manythreads.exp gdb.threads/manythreads.exp: can't read "test": no such variable 2015-04-01 15:30:13 +01:00
multi-create-ns-info-thr.exp gdb.threads/multi-create-ns-info-thr.exp and native-extended-remote board 2015-02-21 12:03:23 +00:00
multi-create.c
multi-create.exp
multiple-step-overs.c Add test for PR18214 and PR18216 - multiple step-overs with queued signals 2015-04-08 19:59:03 +01:00
multiple-step-overs.exp gdb/18216: displaced step+deliver signal, a thread needs step-over, crash 2015-04-10 10:36:23 +01:00
next-bp-other-thread.c
next-bp-other-thread.exp
no-unwaited-for-left.c
no-unwaited-for-left.exp kfail two tests in no-unwaited-for-left.exp for remote target 2015-04-02 13:51:31 +01:00
non-ldr-exc-1.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-1.exp
non-ldr-exc-2.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-2.exp
non-ldr-exc-3.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-3.exp
non-ldr-exc-4.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
non-ldr-exc-4.exp
non-ldr-exit.c PR gdb/18717: internal error if non-leader thread exits process 2015-07-24 17:49:17 +01:00
non-ldr-exit.exp PR gdb/18717: internal error if non-leader thread exits process 2015-07-24 17:49:17 +01:00
non-stop-fair-events.c Properly set alarm value in gdb.threads/non-stop-fair-events.exp 2015-04-07 11:30:07 +01:00
non-stop-fair-events.exp Properly set alarm value in gdb.threads/non-stop-fair-events.exp 2015-04-07 11:30:07 +01:00
pending-step.c
pending-step.exp
print-threads.c
print-threads.exp
pthread_cond_wait.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
pthread_cond_wait.exp
pthreads.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
pthreads.exp
queue-signal.c
queue-signal.exp
reconnect-signal.c
reconnect-signal.exp
schedlock.c
schedlock.exp Make "set scheduler-locking step" depend on user intention, only 2015-03-24 17:50:31 +00:00
siginfo-threads.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
siginfo-threads.exp
signal-command-handle-nopass.c
signal-command-handle-nopass.exp
signal-command-multiple-signals-pending.c Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
signal-command-multiple-signals-pending.exp Linux: Skip thread_db thread event reporting if PTRACE_EVENT_CLONE is supported 2015-01-09 11:42:57 +00:00
signal-delivered-right-thread.c
signal-delivered-right-thread.exp
signal-sigtrap.c Add "signal SIGTRAP" test 2015-02-10 19:30:55 +00:00
signal-sigtrap.exp Add "signal SIGTRAP" test 2015-02-10 19:30:55 +00:00
signal-while-stepping-over-bp-other-thread.c
signal-while-stepping-over-bp-other-thread.exp Cleanup signal-while-stepping-over-bp-other-thread.exp 2015-04-10 19:49:00 +01:00
sigstep-threads.c
sigstep-threads.exp
sigthread.c
sigthread.exp
staticthreads.c
staticthreads.exp
step-bg-decr-pc-switch-thread.c Fix adjust_pc_after_break, remove still current thread check 2015-02-11 09:45:41 +00:00
step-bg-decr-pc-switch-thread.exp Fix adjust_pc_after_break, remove still current thread check 2015-02-11 09:45:41 +00:00
step-over-lands-on-breakpoint.c
step-over-lands-on-breakpoint.exp Test step-over-{lands-on-breakpoint|trips-on-watchpoint}.exp with displaced stepping 2015-04-10 13:31:59 +01:00
step-over-trips-on-watchpoint.c Make gdb.threads/step-over-trips-on-watchpoint.exp effective on !x86 2015-04-10 13:11:32 +01:00
step-over-trips-on-watchpoint.exp step-over-trips-on-watchpoint.exp: Don't put addresses in test messages 2015-04-10 19:23:24 +01:00
stepi-random-signal.c
stepi-random-signal.exp
switch-threads.c
switch-threads.exp
thread-execl.c
thread-execl.exp follow-exec: delete all non-execing threads 2015-03-03 01:25:17 +00:00
thread-find.exp
thread-specific-bp.c
thread-specific-bp.exp Fix gdb.threads/thread-specific-bp.exp race 2015-03-04 17:23:55 +00:00
thread-specific.c
thread-specific.exp
thread-unwindonsignal.exp
thread_check.c
thread_check.exp
thread_events.c
thread_events.exp
threadapply.c
threadapply.exp
threxit-hop-specific.c
threxit-hop-specific.exp
tid-reuse.c Crash on thread id wrap around 2015-04-01 13:38:06 +01:00
tid-reuse.exp Crash on thread id wrap around 2015-04-01 13:38:06 +01:00
tls-main.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
tls-nodebug.c
tls-nodebug.exp
tls-shared.c
tls-shared.exp
tls-var-main.c
tls-var.c
tls-var.exp
tls.c
tls.exp
tls2.c
watchpoint-fork-child.c
watchpoint-fork-mt.c Remove testsuite compile errors with GCC5. 2015-01-25 18:50:56 +01:00
watchpoint-fork-parent.c
watchpoint-fork-st.c
watchpoint-fork.exp
watchpoint-fork.h
watchthreads-reorder.c gdb.threads/{siginfo-thread.c,watchthreads-reorder.c,ia64-sigill.c} races with GDB 2015-01-09 13:58:29 +00:00
watchthreads-reorder.exp
watchthreads.c
watchthreads.exp
watchthreads2.c
watchthreads2.exp
wp-replication.c
wp-replication.exp