diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index f4523f70416..a0722c1f7d7 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2016-08-04 Yao Qi + + * linux-low.c (regsets_fetch_inferior_registers): Check + errno is ESRCH or not. + 2016-08-02 Yao Qi * thread-db.c (struct thread_db) : Remove. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index e251ac453da..1839f998aff 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -5405,6 +5405,12 @@ regsets_fetch_inferior_registers (struct regsets_info *regsets_info, not "active". This can happen in normal operation, so suppress the warning in this case. */ } + else if (errno == ESRCH) + { + /* At this point, ESRCH should mean the process is + already gone, in which case we simply ignore attempts + to read its registers. */ + } else { char s[256];