Subject: Re: bin/30143: gdb does not work with threaded programs
To: None <nathanw@netbsd.org, gnats-admin@netbsd.org,>
From: Chuck Silvers <chuq@chuq.com>
List: netbsd-bugs
Date: 05/06/2005 16:09:01
The following reply was made to PR kern/30143; it has been noted by GNATS.
From: Chuck Silvers <chuq@chuq.com>
To: "Nathan J. Williams" <nathanw@wasabisystems.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: bin/30143: gdb does not work with threaded programs
Date: Fri, 6 May 2005 09:08:23 -0700
On Thu, May 05, 2005 at 09:41:05PM -0400, Nathan J. Williams wrote:
>
> This is a problem in the core-dumping code. Specifically, a region
> without read permission but otherwise dumpable will generate EFAULT
> when coredump_writesegs() tries to write it out. The following program
> will demonstrate this, without libpthread linked in:
...
> The following patch to uvm_glue.c seems to fix this by adding read
> permission if it's not there already. There might be a better way to
> do this, or it might be better to mark unreadable regions as
> undumpable.
I'd rather skip the unreadable regions. if a chunk of address space
isn't readable by the process it shouldn't be readable by the
coredump code either.
-Chuck