all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 65837@debbugs.gnu.org
Subject: bug#65837: 30.0.50; Debugger in non-main threads
Date: Sat, 09 Sep 2023 20:37:46 +0300	[thread overview]
Message-ID: <83cyyrtfh1.fsf@gnu.org> (raw)
In-Reply-To: <m28r9f2rao.fsf@gmail.com> (message from Helmut Eller on Sat, 09 Sep 2023 19:24:31 +0200)

> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: 65837@debbugs.gnu.org
> Date: Sat, 09 Sep 2023 19:24:31 +0200
> 
> On Sat, Sep 09 2023, Eli Zaretskii wrote:
> 
> > So I think the only reasonably practical way to make this particular
> > use case stable is to disable thread switching for as long as the
> > debugger is active.  WDYT?
> 
> Having to disable thread switching for so long would be quite
> unfortunate.

But not unheard of.  When you debug a program, you almost always want
the other threads stopped (unless the bug you are investigating
happens because of the other threads).

> I think that is safe for the debuggee to call condition-wait or
> accept-process-output on a specific pipe process.  That should be enough
> to implement some form of channel/mailbox to communicate between the
> debuggee and the main thread.  The debuggee would then read commands
> from that channel and the main thread would send messages to that
> channel instead of executing the commands.  Something like the patch in
> the attachment.

I don't see how you could implement that in a portable way.  I also
don't understand how you will support all the different input event
types using this "channel".  And finally, you prevent the main thread
from running "normally", because it is now busy serving the debuggee
thread -- which seems to contradict your desire not to interfere with
other threads.

Preventing thread switch is definitely orders of magnitude simpler,
IMO.





  reply	other threads:[~2023-09-09 17:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09  9:15 bug#65837: 30.0.50; Debugger in non-main threads Helmut Eller
2023-09-09 11:14 ` Eli Zaretskii
2023-09-09 15:35   ` Helmut Eller
2023-09-09 15:57     ` Eli Zaretskii
2023-09-09 16:23       ` Helmut Eller
2023-09-09 16:46         ` Eli Zaretskii
2023-09-09 17:24           ` Helmut Eller
2023-09-09 17:37             ` Eli Zaretskii [this message]
2023-09-09 18:29               ` Helmut Eller
2023-09-09 18:34                 ` Eli Zaretskii
2023-09-09 18:50                   ` Helmut Eller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83cyyrtfh1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65837@debbugs.gnu.org \
    --cc=eller.helmut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.