Don't rely on inferior_ptid in record_full_wait
authorPedro Alves <palves@redhat.com>
Fri, 10 Jan 2020 20:05:41 +0000 (20:05 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 10 Jan 2020 20:05:41 +0000 (20:05 +0000)
commitec506636cc0c56d4229b00d5e439c0610970f84d
tree3d01f04f7b4fb3ed19797d16503b07d80c094f2a
parent873657b9e824943ae44c12966c29cbbcd21c986f
Don't rely on inferior_ptid in record_full_wait

The multi-target patch sets inferior_ptid to null_ptid before handling
a target event, and thus before calling target_wait, in order to catch
places in target_ops::wait implementations that are incorrectly
relying on inferior_ptid (which could otherwise be a ptid of a
different target, for example).  That caught this instance in
record-full.c.

Fix it by saving the last resumed ptid, and then using it in
record_full_wait_1, just like how the last "step" argument passed to
record_full_target::resume is handled too.

gdb/ChangeLog:
2020-01-10  Pedro Alves  <palves@redhat.com>

* record-full.c (record_full_resume_ptid): New global.
(record_full_target::resume): Set it.
(record_full_wait_1): Use record_full_resume_ptid instead of
inferior_ptid.
gdb/ChangeLog
gdb/record-full.c
gdb/target.h
This page took 0.024103 seconds and 4 git commands to generate.