Re: [PATCH v3 4/5] gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses

Simon Marchi via Gdb-patches
2021-01-15T19:17:20Z

I think I found another issue. "run" while threads are running gives:

/home/simark/src/binutils-gdb/gdb/target.c:2001: internal-error: ptid_t target_wait(ptid_t, target_waitstatus*, target_wait_flags): Assertion `!proc_target->commit_resumed_state' failed.

This is because run_command_1 kills the existing inferior and then uses
scoped_disable_commit_resumed. When scoped_disable_commit_resumed runs,
the Linux target is no longer pushed, so its commit_resumed_state doesn't
get turned back to false.

The same probably happens if you "attach" while the current inferior is
running.

So, adding this to my to-fix for this patch.

Simon