]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb] Fix assertion failure for checkpoint delete 0
authorTom de Vries <tdevries@suse.de>
Wed, 10 Jan 2024 10:27:34 +0000 (11:27 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 10 Jan 2024 10:27:34 +0000 (11:27 +0100)
commit83094d3de44846071cc2e3e42366ea782b3e4027
treed10feb9093dbd48a21980dbcde833db2a3b42b93
parentcdf2a0febd8a20ef74e782bdf4493536535d33a8
[gdb] Fix assertion failure for checkpoint delete 0

When doing "checkpoint delete 0" we run into an assertion failure:
...
+delete checkpoint 0
inferior.c:406: internal-error: find_inferior_pid: Assertion `pid != 0' failed.
...

Fix this by handling the "pptid == null_ptid" case in
delete_checkpoint_command.

Tested on x86_64-linux.

Approved-By: Kevin Buettner <kevinb@redhat.com>
PR gdb/31209
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31209
gdb/linux-fork.c
gdb/testsuite/gdb.base/checkpoint.exp