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 gdb/27338] Stepping over a breakpoint on an instruction that makes the thread exit is not correctly handled
Date: Mon, 13 Nov 2023 14:26:25 +0000	[thread overview]
Message-ID: <bug-27338-4717-a3ZCgvObqy@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27338-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27338

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pedro Alves <palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d8d96409c83f84f5c15d2e846a7c0a59ceed187c

commit d8d96409c83f84f5c15d2e846a7c0a59ceed187c
Author: Pedro Alves <pedro@palves.net>
Date:   Thu Mar 17 19:25:03 2022 +0000

    Introduce GDB_THREAD_OPTION_EXIT thread option, fix step-over-thread-exit

    When stepping over a breakpoint with displaced stepping, GDB needs to
    be informed if the stepped thread exits, otherwise the displaced
    stepping buffer that was allocated to that thread leaks, and this can
    result in deadlock, with other threads waiting for their turn to
    displaced step, but their turn never comes.

    Similarly, when stepping over a breakpoint in line, GDB also needs to
    be informed if the stepped thread exits, so that is can clear the step
    over state and re-resume threads.

    This commit makes it possible for GDB to ask the target to report
    thread exit events for a given thread, using the new "thread options"
    mechanism introduced by a previous patch.

    This only adds the core bits.  Following patches in the series will
    teach the Linux backends (native & gdbserver) to handle the
    GDB_THREAD_OPTION_EXIT option, and then a later patch will make use of
    these thread exit events to clean up displaced stepping and inline
    stepping state properly.

    Reviewed-By: Andrew Burgess <aburgess@redhat.com>
    Change-Id: I96b719fdf7fee94709e98bb3a90751d8134f3a38
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27338

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-11-13 14:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 20:00 [Bug gdb/27338] New: " simark at simark dot ca
2021-02-03 20:00 ` [Bug gdb/27338] " simark at simark dot ca
2021-02-03 21:37 ` simark at simark dot ca
2022-06-21 11:24 ` pedro at palves dot net
2023-03-27 16:20 ` cvs-commit at gcc dot gnu.org
2023-11-13 14:26 ` cvs-commit at gcc dot gnu.org [this message]
2023-11-13 14:26 ` cvs-commit at gcc dot gnu.org
2023-11-13 14:26 ` cvs-commit at gcc dot gnu.org
2023-11-13 14:26 ` cvs-commit at gcc dot gnu.org
2023-11-13 14:27 ` cvs-commit at gcc dot gnu.org
2023-11-13 15:03 ` pedro at palves dot net

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-27338-4717-a3ZCgvObqy@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: link
Be 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).