I found, in the FreeBSD ports collection (where I became maintainer of
the Wine port which I'm plan to ``minimize''), the following patch which
is superflous as far as can see.
Am I missing something obvious here, or is this just a historic relict?
(Originally that patch was much larger, but I changes in Wine essentially
made those parts obsolete, so I removed them with my first update for the
port.)
Gerald
*** server/ptrace.c.orig Tue Apr 4 21:55:28 2000
--- server/ptrace.c Thu May 18 09:40:09 2000
***************
*** 36,41 ****
--- 36,46 ----
#ifndef PTRACE_POKEDATA
#define PTRACE_POKEDATA PT_WRITE_D
#endif
+ #ifdef __FreeBSD__
+ #define PTRACE_KEEPIP 1
+ #else
+ #define PTRACE_KEEPIP 0
+ #endif
static const int use_ptrace = 1; /* set to 0 to disable ptrace */
*************** void wait4_thread( struct thread *thread
*** 109,115 ****
static int attach_thread( struct thread *thread )
{
/* this may fail if the client is already being debugged */
! if (!use_ptrace || (ptrace( PTRACE_ATTACH, thread->unix_pid, 0, 0) == -1))
return 0;
if (debug_level) fprintf( stderr, "%08x: *attached*\n", (unsigned int)thread );
thread->attached = 1;
wait4_thread( thread, SIGSTOP );
--- 114,120 ----
static int attach_thread( struct thread *thread )
{
/* this may fail if the client is already being debugged */
! if (!use_ptrace || (ptrace( PTRACE_ATTACH, thread->unix_pid, PTRACE_KEEPIP, 0 )
== -1)) return 0;
if (debug_level) fprintf( stderr, "%08x: *attached*\n", (unsigned int)thread );
thread->attached = 1;