]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/breakpoint.c
Make sure momentary breakpoints are always thread-specific
authorPedro Alves <pedro@palves.net>
Thu, 12 May 2022 19:20:03 +0000 (20:20 +0100)
committerPedro Alves <pedro@palves.net>
Fri, 20 May 2022 19:41:02 +0000 (20:41 +0100)
commit7ab979957c6dd6fddd86b396e9e885ec09002e8e
treeccbbd6ee022099242dd180c3c98ed8f993fe1ccc
parentf9703051465a03bace3cc17b80fcd12c19a60821
Make sure momentary breakpoints are always thread-specific

This adds a new ctor to momentary_breakpoints with a few parameters
that are always necessary for momentary breakpoints.

In particular, I noticed that set_std_terminate_breakpoint doesn't
make the breakpoint be thread specific, which looks like a bug to me.

The point of that breakpoint is to intercept std::terminate calls that
happen as result of the called thread throwing an exception that won't
be caught by the dummy frame.  If some other thread calls
std::terminate, IMO, it's no different from some other thread calling
exit/_exit, for example.

Change-Id: Ifc5ff4a6d6e58b8c4854d00b86725382d38a1a02
gdb/breakpoint.c