projects
/
platform
/
upstream
/
gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 7.8.1
[platform/upstream/gdb.git]
/
gdb
/
linux-tdep.c
diff --git
a/gdb/linux-tdep.c
b/gdb/linux-tdep.c
index
c10b8ee
..
f6d4ef9
100644
(file)
--- a/
gdb/linux-tdep.c
+++ b/
gdb/linux-tdep.c
@@
-1189,6
+1189,11
@@
linux_corefile_thread_callback (struct thread_info *info, void *data)
{
struct linux_corefile_thread_data *args = data;
{
struct linux_corefile_thread_data *args = data;
+ /* It can be current thread
+ which cannot be removed by update_thread_list. */
+ if (info->state == THREAD_EXITED)
+ return 0;
+
if (ptid_get_pid (info->ptid) == args->pid)
{
struct cleanup *old_chain;
if (ptid_get_pid (info->ptid) == args->pid)
{
struct cleanup *old_chain;
@@
-1440,6
+1445,7
@@
linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size,
char *note_data = NULL;
gdb_byte *auxv;
int auxv_len;
char *note_data = NULL;
gdb_byte *auxv;
int auxv_len;
+ volatile struct gdb_exception e;
if (linux_fill_prpsinfo (&prpsinfo))
{
if (linux_fill_prpsinfo (&prpsinfo))
{
@@
-1463,6
+1469,12
@@
linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size,
}
/* Thread register information. */
}
/* Thread register information. */
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ update_thread_list ();
+ }
+ if (e.reason < 0)
+ exception_print (gdb_stderr, e);
thread_args.gdbarch = gdbarch;
thread_args.pid = ptid_get_pid (inferior_ptid);
thread_args.obfd = obfd;
thread_args.gdbarch = gdbarch;
thread_args.pid = ptid_get_pid (inferior_ptid);
thread_args.obfd = obfd;