Subject: PT_MEMMAP
To: None <tech-kern@netbsd.org>
From: Love <lha@stacken.kth.se>
List: tech-kern
Date: 07/20/2002 01:27:39
Hi

I want to add PT_MEMMAP to ptrace so gdb can get the memory mapping of a
process. A implemation are available in [1]. Patches for current gdb are in
[2].

My questions are:

- Do I export too much (its the same as the (linux) procfs interface
- are the locking in vm_map_lock_read()/vm_map_unlock_read() done right wrt
  uiomove() (since uiomove can sleep). I did the same way as procfs does,
  but is it right ?
- not all mapping are readable with the ptrace interface how come, they
  have the read bit set (see warnings in the example file in [2])

I will clear this with <bsd-api-discuss@wasabisystems.com> later, but first
I want to check if its ok with you.

Love

[1] http://www.e.kth.se/~lha/patches/netbsd/gdb-core/ptrace-patch
[2] http://www.e.kth.se/~lha/patches/netbsd/gdb-core/