On Thu, 27 Jun 2024 11:47:25 +0100,
Claudio Jeker <clau...@openbsd.org> wrote:
> 
> The ptrace code is somewhat borken. We are inside sleep_finish() but
> cursig() calls single_thread_set() without SINGLE_DEEP. Because of this
> exit1() is called in a place it is not allowed to.
> 
> ptrace and SIGSTOP handling is not quite right. It is on my list of things
> to fix.
> 

I'd like to add that right now both gdb and egdb can't be used with emacs,
and lead to a state when gdb, egdb and emacs can't be killed.

See:

~ $ doas pkill -KILL egdb 
~ $ ps auxf | grep emacs  
catap    47464  0.0  0.0  1240   816 ??  Ip     Wed10PM    0:00.01       |-- 
/bin/sh -c emacs
catap    66347  0.0  0.9 123848 154240 ??  S      Wed10PM    4:37.08       | 
`-- emacs (emacs-29.4)
catap    12114  0.0  0.0  1240   840 ??  Ip     Wed10PM    0:00.01       |-- 
/bin/sh -c env EMACS_RUN_WL=1 emacs
catap    96172  3.1  1.4 228948 238060 ??  S      Wed10PM    8:02.84       | 
`-- emacs (emacs-29.4)
catap    59801  0.0  0.0   796  1388 p4  S+p    12:35PM    0:00.00             
`-- grep emacs
root     45111  0.0  0.8 108100 131308 p4- D      12:33PM    0:00.90 - egdb 
/usr/local/bin/emacs
catap    65871  0.0  1.1 138984 174340 p2  TX+    12:32PM    0:09.39 `-- emacs 
(emacs-29.4)
catap    57261  0.0  0.7 102848 122276 p4- D      12:34PM    0:00.73 - egdb 
/usr/local/bin/emacs-29.4
catap    35085  0.7  0.3 39336 51416 p4- TX     12:34PM    0:04.48 `-- 
/usr/local/bin/emacs-29.4
~ $ doas kill -KILL 65871 
~ $ ps auxf | grep emacs  
catap    47464  0.0  0.0  1240   816 ??  Ip     Wed10PM    0:00.01       |-- 
/bin/sh -c emacs
catap    66347  0.0  0.9 123848 154240 ??  S      Wed10PM    4:37.08       | 
`-- emacs (emacs-29.4)
catap    12114  0.0  0.0  1240   840 ??  Ip     Wed10PM    0:00.01       |-- 
/bin/sh -c env EMACS_RUN_WL=1 emacs
catap    96172  0.7  1.4 228948 238060 ??  S      Wed10PM    8:02.85       | 
`-- emacs (emacs-29.4)
catap    17192  0.0  0.0   796  1372 p4  S+p    12:35PM    0:00.00             
`-- grep emacs
root     45111  0.0  0.8 108100 131308 p4- D      12:33PM    0:00.90 - egdb 
/usr/local/bin/emacs
catap    65871  0.0  1.1 138984 174340 p2  TX+    12:32PM    0:09.39 `-- emacs 
(emacs-29.4)
catap    57261  0.0  0.7 102848 122276 p4- D      12:34PM    0:00.73 - egdb 
/usr/local/bin/emacs-29.4
catap    35085  0.0  0.3 39336 51416 p4- TX     12:34PM    0:04.48 `-- 
/usr/local/bin/emacs-29.4
~ $ doas gdb /usr/local/bin/emacs                                               
                                                          
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd7.5"...(no debugging symbols 
found)

(gdb) attach 65871
Attaching to program: /usr/local/bin/emacs, process 65871
ptrace: Device busy.
~ $

Here egdb with pid 57261 was used to attach to emacs with pid 65871

-- 
wbr, Kirill

Reply via email to