public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug mi/28077] -exec-interrupt in non-stop mode causes internal-error / assertion in target_stop Date: Tue, 13 Jul 2021 13:27:10 +0000 [thread overview] Message-ID: <bug-28077-4717-3HdmMhGp7S@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28077-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28077 --- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The gdb-11-branch branch has been updated by Simon Marchi <simark@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1bdfa2b1a8ab4b40372552e3f6ceb3d2c7e621e4 commit 1bdfa2b1a8ab4b40372552e3f6ceb3d2c7e621e4 Author: Simon Marchi <simon.marchi@polymtl.ca> Date: Tue Jul 13 09:26:50 2021 -0400 gdb: disable commit-resumed on -exec-interrupt --thread-group As reported in PR gdb/28077, we hit an internal error when using -exec-interrupt with --thread-group: info threads &"info threads\n" ~" Id Target Id Frame \n" ~"* 1 process 403312 \"loop\" (running)\n" ^done (gdb) -exec-interrupt --thread-group i1 ~"/home/simark/src/binutils-gdb/gdb/target.c:3768: internal-error: void target_stop(ptid_t): Assertion `!proc_target->commit_resumed_state' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? (y or n) " This is because this code path never disables commit-resumed (a requirement for calling target_stop, as documented in process_stratum_target::»commit_resumed_state) before calling target_stop. The other 3 code paths in mi_cmd_exec_interrupt use interrupt_target_1, which does it. But the --thread-group code path uses its own thing which doesn't do it. Fix this by adding a scoped_disable_commit_resumed in this code path. Calling -exec-interrupt with --thread-group is apparently not tested at the moment (which is why this bug could creep in). Add a new test for that. The test runs two inferiors and tries to interrupt them with "-exec-interrupt --thread-group X". This will need to be merged in the gdb-11-branch, so here are ChangeLog entries: gdb/ChangeLog: * mi/mi-main.c (mi_cmd_exec_interrupt): Use scoped_disable_commit_resumed in the --thread-group case. gdb/testsuite/ChangeLog: * gdb.mi/interrupt-thread-group.c: New. * gdb.mi/interrupt-thread-group.exp: New. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28077 Change-Id: I615efefcbcaf2c15d47caf5e4b9d82854b2a2fcb -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-07-13 13:27 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-11 19:05 [Bug mi/28077] New: " jonah at kichwacoders dot com 2021-07-11 19:42 ` [Bug mi/28077] " jonah at kichwacoders dot com 2021-07-12 0:22 ` simark at simark dot ca 2021-07-12 0:39 ` simark at simark dot ca 2021-07-12 1:04 ` jonah at kichwacoders dot com 2021-07-12 2:10 ` jonah at kichwacoders dot com 2021-07-12 2:17 ` simark at simark dot ca 2021-07-12 2:17 ` simark at simark dot ca 2021-07-12 2:17 ` simark at simark dot ca 2021-07-12 2:17 ` simark at simark dot ca 2021-07-13 13:26 ` cvs-commit at gcc dot gnu.org 2021-07-13 13:27 ` cvs-commit at gcc dot gnu.org [this message] 2021-07-13 13:37 ` simark at simark dot ca
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28077-4717-3HdmMhGp7S@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).