]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/arm-linux-nat.c
[ARM] perror_with_name when failed to fetch/store registers
authorYao Qi <yao.qi@linaro.org>
Fri, 22 Jan 2016 09:01:09 +0000 (09:01 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 22 Jan 2016 09:01:09 +0000 (09:01 +0000)
commitd86feca31bd9b814fd5317a0ebdbe86fb812a1bd
tree978d36411bc4fc0d2842367f6485b8f334162e39
parentb35a8b2f1f44c6ea48aeb6f7a74de01f6f5016fb
[ARM] perror_with_name when failed to fetch/store registers

I see the following test fail on native arm-linux gdb testing...

(gdb) PASS: gdb.base/killed-outside.exp: registers: get pid of inferior
Executing on target: kill -9 2346    (timeout = 300)
spawn kill -9 2346^M
flushregs^M
Register cache flushed.^M
warning: Unable to fetch general registers.^M
PC not available^M
(gdb) PASS: gdb.base/killed-outside.exp: registers: flushregs
info threads^M
  Id   Target Id         Frame ^M
* 1    process 2346 "killed-outside" (gdb) FAIL: gdb.base/killed-outside.exp: registers: info threads (timeout)

since the inferior disappeared, ptrace will fail.  In that case, the
exception should be thrown, so that the caller can handle that.

gdb:

2016-01-22  Yao Qi  <yao.qi@linaro.org>

* arm-linux-nat.c (fetch_fpregs): Call perror_with_name
instead of warning.
(store_fpregs, fetch_regs, store_regs): Likewise.
(fetch_wmmx_regs, store_wmmx_regs): Likewise.
(fetch_vfp_regs, store_vfp_regs): Likewise.
gdb/ChangeLog
gdb/arm-linux-nat.c