From f0720ce7cbd5b714f4654535b8dc647cfd1f3ffd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 31 Aug 2004 10:47:27 +0000 Subject: [PATCH] * sysv_shm.cc (kern_shmat): Add debug_printf's. --- winsup/cygserver/ChangeLog | 4 ++++ winsup/cygserver/sysv_shm.cc | 2 ++ 2 files changed, 6 insertions(+) diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog index 6de3a94ba..8f373e0d6 100644 --- a/winsup/cygserver/ChangeLog +++ b/winsup/cygserver/ChangeLog @@ -1,3 +1,7 @@ +2004-08-31 Corinna Vinschen + + * sysv_shm.cc (kern_shmat): Add debug_printf's. + 2004-08-24 Corinna Vinschen * bsd_mutex.cc (_msleep): Release process object while waiting. diff --git a/winsup/cygserver/sysv_shm.cc b/winsup/cygserver/sysv_shm.cc index 803e4395d..5daeb5cf3 100644 --- a/winsup/cygserver/sysv_shm.cc +++ b/winsup/cygserver/sysv_shm.cc @@ -382,6 +382,7 @@ kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg) if ((shmflg & SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; flags = MAP_ANON | MAP_SHARED; + debug_printf ("shmaddr: %x, shmflg: %x", shmaddr, shmflg); if (shmaddr) { flags |= MAP_FIXED; if (shmflg & SHM_RND) { @@ -389,6 +390,7 @@ kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg) } else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) { attach_va = (vm_offset_t)shmaddr; } else { + debug_printf ("Odd shmaddr: EINVAL"); error = EINVAL; goto done2; }