diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-08-21 20:36:20 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-08-21 20:42:38 +0200 |
commit | 14adc931130880d75eccc023cbaec68790960235 (patch) | |
tree | cb7a1236f64f00f35745669895405e4207afd532 /gdb/ChangeLog | |
parent | b75a5f0e444508bb375a7b389b1f8014ee682884 (diff) | |
download | fsf-binutils-gdb-14adc931130880d75eccc023cbaec68790960235.zip fsf-binutils-gdb-14adc931130880d75eccc023cbaec68790960235.tar.gz fsf-binutils-gdb-14adc931130880d75eccc023cbaec68790960235.tar.bz2 |
Fix 'gcore' with exited threads
Program received signal SIGABRT, Aborted.
[...]
(gdb) gcore foobar
Couldn't get registers: No such process.
(gdb) info threads
[...]
(gdb) gcore foobar
Saved corefile foobar
(gdb)
gcore tries to access the exited thread:
[Thread 0x7ffff7fce700 (LWP 6895) exited]
ptrace(PTRACE_GETREGS, 6895, 0, 0x7fff18167dd0) = -1 ESRCH (No such process)
Without the TRY_CATCH protection testsuite FAILs for:
gcore .../gdb/testsuite/gdb.threads/gcore-thread0.test
Cannot find new threads: debugger service failed
(gdb) FAIL: gdb.threads/gcore-thread.exp: save a zeroed-threads corefile
+
core .../gdb/testsuite/gdb.threads/gcore-thread0.test
".../gdb/testsuite/gdb.threads/gcore-thread0.test" is not a core dump: File format not recognized
(gdb) FAIL: gdb.threads/gcore-thread.exp: core0file: re-load generated corefile (bad file format)
Maybe the TRY_CATCH could be more inside update_thread_list().
Similar update_thread_list() call is IMO missing in procfs_make_note_section()
but I do not have where to verify that change.
gdb/ChangeLog
2014-08-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-tdep.c (linux_corefile_thread_callback): Ignore THREAD_EXITED.
(linux_make_corefile_notes): call update_thread_list, protected against
exceptions.
gdb/testsuite/ChangeLog
2014-08-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.threads/gcore-stale-thread.c: New file.
* gdb.threads/gcore-stale-thread.exp: New file.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bf9edbb..8cf8a0a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2014-08-21 Jan Kratochvil <jan.kratochvil@redhat.com> + + * linux-tdep.c (linux_corefile_thread_callback): Ignore THREAD_EXITED. + (linux_make_corefile_notes): call update_thread_list, protected against + exceptions. + 2014-08-15 Eli Zaretskii <eliz@gnu.org> * dcache.h: Include target.h, to avoid compile time warnings. |