This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Quiet ptrace error ESRCH in regsets_fetch_inferior_registers
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 04 Aug 2016 05:50:19 -0400
- Subject: [binutils-gdb] Quiet ptrace error ESRCH in regsets_fetch_inferior_registers
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT fcd4a73d7dc3505662b4d58489f4c1b8b003b8f3 ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: fcd4a73d7dc3505662b4d58489f4c1b8b003b8f3
Quiet ptrace error ESRCH in regsets_fetch_inferior_registers
When I run process-dies-while-detaching.exp with GDBserver, I see many
warnings printed by GDBserver,
ptrace(regsets_fetch_inferior_registers) PID=26183: No such process
ptrace(regsets_fetch_inferior_registers) PID=26183: No such process
ptrace(regsets_fetch_inferior_registers) PID=26184: No such process
ptrace(regsets_fetch_inferior_registers) PID=26184: No such process
regsets_fetch_inferior_registers is called when GDBserver resumes each
lwp.
#2 0x0000000000428260 in regsets_fetch_inferior_registers (regsets_info=0x4690d0 <aarch64_regsets_info>, regcache=0x31832020)
at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:5412
#3 0x00000000004070e8 in get_thread_regcache (thread=0x31832940, fetch=fetch@entry=1) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/regcache.c:58
#4 0x0000000000429c40 in linux_resume_one_lwp_throw (info=<optimized out>, signal=0, step=0, lwp=0x31832830)
at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:4463
#5 linux_resume_one_lwp (lwp=0x31832830, step=<optimized out>, signal=<optimized out>, info=<optimized out>)
at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:4573
The is the case that threads are disappeared when GDB/GDBserver resumes
them. We check errno for ESRCH, and don't print error messages, like
what we are doing in regsets_store_inferior_registers.
gdb/gdbserver:
2016-08-04 Yao Qi <yao.qi@linaro.org>
* linux-low.c (regsets_fetch_inferior_registers): Check
errno is ESRCH or not.
- Follow-Ups:
- *** COMPILATION FAILED *** Failures on Debian-s390x-native-gdbserver-m64, branch master *** BREAKAGE ***
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Debian-i686, branch master
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master