Re: [PATCH] Improved ^c support for gdb/guile

Ludovic Courtès
2014-02-17T16:06:30Z

Mark Kettenis <mark.kettenis@xs4all.nl> skribis:

> Didn't realize Guile used threads. I guess that's safe if the
> interpreter makes sure it never calls into GDB code concurrently.

Actually :-), Guile comes with a REPL server, which clients (such as
Geiser, an Emacs mode for Scheme) can connect to. But the server runs
in a separate thread.

My reaction as a Guiler was to spawn that server, and connect Emacs to
it so I could do live development “the usual way”. But sometimes,
starting a new thread crashes GDB. When it does not, accessing the
inferior’s memory from the server thread always fails (“Cannot access
memory”), even though accessing the same memory region from GDB’s main
thread does work.

Anyway, I gather that this is not supported.

(Note that by default, Guile 2.0 has one signal-handling thread in
addition to its main thread. The BDW GC can also be configured to use a
separate marking thread. I don’t think these are a concern for GDB
though.)

Thanks,
Ludo’.