gdbserver/libthread_db: Don't ignore memory reading failures
authorPedro Alves <palves@redhat.com>
Fri, 29 Sep 2017 11:33:41 +0000 (12:33 +0100)
committerPedro Alves <palves@redhat.com>
Fri, 29 Sep 2017 12:10:39 +0000 (13:10 +0100)
commit5b9ca4d43ba0313612e8ad6e50221e8f20ebd129
treec291d2d9d5e2ebef31ef0a37367e629006dbc8bd
parent94c207e097a3a30ce71fc8f700325113968c276b
gdbserver/libthread_db: Don't ignore memory reading failures

If we had this in place before, then the regression fixed by the
previous commit would have been been visible is all test runs.  E.g.:

  Running src/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp ...
  FAIL: gdb.threads/multi-create-ns-info-thr.exp: continue to breakpoint 6

Debugging manually we'd see this:
  gdbserver: Cannot get thread handle for LWP 1467: generic error

Instead of:
  gdbserver: PID mismatch!  Expected 27472, got 27471

which is misleading - gdbserver didn't 27471, that was stale stack
data from previous function invocations.

gdb/gdbserver/ChangeLog:
2017-09-29  Pedro Alves  <palves@redhat.com>

* proc-service.c (ps_pdread): Return PS_ERR if reading memory
fails.
gdb/gdbserver/ChangeLog
gdb/gdbserver/proc-service.c