This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH] Readline: Cleanup some warnings


> Date: Tue, 19 Mar 2019 22:14:36 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> CC: tom@tromey.com, gdb-patches@sourceware.org
> 
> > Cc: gdb-patches@sourceware.org
> > From: Pedro Alves <palves@redhat.com>
> > Date: Tue, 19 Mar 2019 19:02:43 +0000
> > 
> > > https://sourceware.org/ml/gdb-patches/2008-02/msg00423.html
> 
> Caveat: I didn't yet read that thread myself.

I have now.

So yes, this is about SIGINT handler being run on Windows in a
separate thread.  Since the Readline SIGINT handler executes
non-trivial Readline code, it should first stop the main thread in its
tracks.

But the question in the case of GDB is: could GDB run Readline code in
more than one thread simultaneously?  And also, when the Readline
handler invokes the GDB handler, can the code run by the GDB SIGINT
handler get in the way of some other GDB code which runs concurrently?
This latter consideration might become more relevant with Tom's work
on multi-threading the symtab reading.  I'm not familiar with the
current GDB architecture (specifically of the Windows port) well
enough to answer my own questions on this matter.

These questions are relevant because if threads other than the main
one could be involved in this, we will have to stop them as well for
as long as the SIGINT handler runs, and doing that from Readline's own
code might prove tricky.  By contrast, stopping just the main thread
could be done entirely in the Readline sources.

Comments?


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