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] infrun: don't resume the inferior when we notice a new thread (new_thread_event).


On Mon, 28 May 2012 22:46:23 +0200, Pedro Alves wrote:
> If anyone as any idea why things are done in the current way, please
> speak up.

Not much, just that linux-nat.c linux_handle_extended_wait has this code by
you:
          if (non_stop)
            {
              /* Add the new thread to GDB's lists as soon as possible
                 so that:
              if (!thread_db_attach_lwp (new_lp->ptid))
                {
                  /* We're not using thread_db.  Add it to GDB's
                     list.  */
                  target_post_attach (GET_LWP (new_lp->ptid));
                  add_thread (new_lp->ptid);
                }

And for !non_stop mode add_thread gets delayed till handle_inferior_event;
which should not hurt.  If this add would be done unconditionally in
linux-nat.c then this handle_inferior_event would never be reached.
But I do not see why to make that change, handle_inferior_event works.


Thanks,
Jan


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