This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Special-case wildcard requests in ravenscar-thread.c
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Fri, 15 Feb 2019 17:54:54 -0500
- Subject: [binutils-gdb] Special-case wildcard requests in ravenscar-thread.c
*** TEST RESULTS FOR COMMIT 485b851b68ea035e3c49234dafcddb97c4f54a30 ***
Author: Tom Tromey <tromey@adacore.com>
Branch: master
Commit: 485b851b68ea035e3c49234dafcddb97c4f54a30
Special-case wildcard requests in ravenscar-thread.c
ravenscar-thread.c intercepts resume and wait target requests and
replaces the requested ptid with the ptid of the underlying CPU.
However, this is incorrect when a request is made with a wildcard
ptid.
This patch adds a special case to ravenscar-thread.c for
minus_one_ptid. I don't believe a special case for process wildcards
is necessary, so I have not added that.
Joel's description explains the bug well:
At the user level, we noticed the issue because we had a test were
we insert a breakpoint one some code which is only run from, say,
CPU #2, whereas we unfortunately resumed the execution after having
stopped somewhere in CPU #1. As a result, we sent an order to resume
CPU #1, which starves CPU #2 forever, because the code in CPU #1
waits for some of the Ada tasks allocated to CPU #2 (and we never
reach our breakpoint either).
gdb/ChangeLog
2019-02-15 Tom Tromey <tromey@adacore.com>
* ravenscar-thread.c (ravenscar_thread_target::resume)
(ravenscar_thread_target::wait): Special case wildcard requests.