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: [RFA 2/2][master only] gdb/windows-nat.c: Get rid of main_thread_id global


> >   - patch #3 (master only): Tag the main thread, and silence
> >     the thread-exit notification of the thread that got tagged.
> >     Depending on the implementation, this patch would potentially
> >     be acceptable for 8.3, but might need extra work to apply.
> >     I think we've had enough problems with 8.3 as it is, I don't
> >     want to add more things to do, so I vote OUT for 8.3.
> 
> This doesn't seem right to me, given that the main thread may
> legitimately exit before other threads.  If this approach is taken,
> maybe tweak it a bit:
> 
> silence the thread-exit notification of the thread that got tagged
> _iff there are no other threads in the process_.

Wouldn't that be confusing? What would happen in that case is that
we end up getting a a thread-exit notification with a thread ID
for which there hasn't been a new-thread notification. Without
knowing the implementation details of how GDB decides to silence
or not thread notifications, people are going to ask themselves
where the thread that exited came from, and why we didn't see
a new-thread notification for it before.

To decide which approach we want to take - what would be the issue
if we decided to silence the main thread's exit notification while
some other threads might still be alive? Assuming Pedro is making
a valid point, I think we should go back to pre-8.3 behavior, and
show all thread create/exit notifications, including for the main
thread.


-- 
Joel


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