gdb: restore displaced step buffer bytes when another thread forks
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 4 Dec 2020 21:43:52 +0000 (16:43 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 4 Dec 2020 21:43:52 +0000 (16:43 -0500)
commitc0aba012edb6068e2433cbac855715a349a8555f
treefedba3cb6c177579da48a67e672024247be123a6
parent3b7a962dec0d5d852ad5f1338add07781adef7b4
gdb: restore displaced step buffer bytes when another thread forks

In handle_inferior_event, where we handle forks, we make sure to restore
the bytes of the displaced stepping buffer in the child's address
space.  However, we only do it when the forking thread was the one
doing a displaced step.  It could happen that a thread forks while
another one is doing a displaced step.  In this case, we also need to
restore the bytes in the child.

Move the byte-restoring code outside of the condition that checks
whether the event thread was displaced stepping.

gdb/ChangeLog:

* infrun.c (handle_inferior_event): Restore displaced step
buffer bytes in child process when handling fork, even if fork
happened in another thread than the displaced-stepping one.

Change-Id: Ibb0daaeb123aba03f4fb4b4d820754eb2436bc69
gdb/ChangeLog
gdb/infrun.c
This page took 0.025432 seconds and 4 git commands to generate.