Subject: Re: ptrace
To: None <tech-kern@netbsd.org>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: tech-kern
Date: 02/16/1999 22:38:16
I noticed two things:
- gdb reads using PT_READ_I, but writes using PT_WRITE_D. This is
inconsistent. It should either write using PT_WRITE_I, or read using
PT_READ_D, and have a seperate call to use for installing and removing
breakpoints that uses the _I calls (either is fine with NetBSD).
- even if the above is fixed, we need to do something about our ptrace()
call. It occurs to me that a working and not-too-wrong solution would be to:
* make PT_WRITE_I call the PT_WRITE_D function, then call a macro like this:
#include <machine/pmap.h>
#ifndef PMAP_SYNC_PROC_CACHES
#define PMAP_SYNC_PROC_CACHES(p, addr, len)
#endif
...
case PT_WRITE_I:
/* PT_WRITE_D code, then */
PMAP_SYNC_PROC_CACHES(p, addr, len);
break;
PMAP_SYNC_PROC_CACHES would call appropriate functions where necessary.
The potential VAC machine performance problem Charles that mentioned is not
handled by this.
Regards,
Ignatios