This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Block all async signals used by gdb when initializing Guile

On Sat, Aug 29, 2015 at 7:37 PM, Eli Zaretskii <> wrote:
>> Date: Sat, 29 Aug 2015 23:04:02 +0200 (CEST)
>> From: Mark Kettenis <>
>> CC:,,
>> I suppose blocking these in the threads that guile starts is necessary
>> because that is the only way to guarantee that those signals will be
>> delivered to the main gdb thread on POSIX systems.
>> On Windows you probably need to do something completely different.
> I might be missing something, because I don't see why.

The goal here is to block these signals from being sent to the threads
that Guile (or more specifically libgc) creates.
Posix threads inherit the current value of the process's sigmask,
so as long as the threads are started during Guile initialization,
we can achieve this by blocking the signals before calling Guile's init
routine and then restoring them after Guile's init routine returns.
Note that we don't want to prevent gdb from getting the signals,
we just want them to be sent to gdb's main thread.

Not sure how to do that on windows.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]