aboutsummaryrefslogtreecommitdiff
path: root/gdb/nds32-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2020-07-04 19:26:59 +0100
committerPedro Alves <palves@redhat.com>2020-07-10 23:50:11 +0100
commit7d3badc6a88b510f96c9aa0bab8f3375292d23bf (patch)
tree2bbeaa4b4c51763ef1139c841f08a9467b7355b3 /gdb/nds32-tdep.c
parent42bd97a6b1e5fa845af116ce52af1a8a3a58be7c (diff)
downloadgdb-7d3badc6a88b510f96c9aa0bab8f3375292d23bf.zip
gdb-7d3badc6a88b510f96c9aa0bab8f3375292d23bf.tar.gz
gdb-7d3badc6a88b510f96c9aa0bab8f3375292d23bf.tar.bz2
Fix handle_no_resumed w/ multiple targets
handle_no_resumed is currently not considering multiple targets. Say you have two inferiors 1 and 2, each connected to a different target, A and B. Now say you set inferior 2 running, with "continue &". Now you select a thread of inferior 1, say thread 1.2, and continue in the foreground. All other threads of inferior 1 are left stopped. Thread 1.2 exits, and thus target A has no other resumed thread, so it reports TARGET_WAITKIND_NO_RESUMED. At this point, if both inferiors were running in the same target, handle_no_resumed would realize that threads of inferior 2 are still executing, so the TARGET_WAITKIND_NO_RESUMED event should be ignored. But because handle_no_resumed only walks the threads of the current target, it misses noticing that threads of inferior 2 are still executing. The fix is just to walk over all threads of all targets. A testcase covering the use case above will be added in a following patch. It can't be added yet because it depends on yet another fix to handle_no_resumed not included here. gdb/ChangeLog: PR gdb/26199 * infrun.c (handle_no_resumed): Handle multiple targets.
Diffstat (limited to 'gdb/nds32-tdep.c')
0 files changed, 0 insertions, 0 deletions