[binutils-gdb] gdb: Avoid using W_STOPCODE(0) as this is ambiguous on MIPS

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Mon Aug 6 08:09:00 GMT 2018


*** TEST RESULTS FOR COMMIT 953473375500a809fbb3eca3efa4dbb670c3a32f ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: 953473375500a809fbb3eca3efa4dbb670c3a32f

gdb: Avoid using W_STOPCODE(0) as this is ambiguous on MIPS

The MIPS target supports 127 signals, and this can create an ambiguity
in process wait statuses.  A status value of 0x007f could potentially
indicate a process that has exited with signal 127, or a process that
has stopped with signal 0.

In uClibc-ng the interpretation of 0x007f is that the process has
exited with signal 127 rather than stopped with signal 0, and so,
WIFSTOPPED (W_STOPCODE (0)) will be false rather than true as it would
be on most other platforms.

Given that it's pretty easy to avoid using W_STOPCODE (0), lets do that.

gdb/ChangeLog:

	* linux-nat.c (linux_nat_target::follow_fork): Avoid using
	'W_STOPCODE (0)' as this could be ambiguous.



More information about the Gdb-testers mailing list