From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25794 invoked by alias); 5 Oct 2005 18:26:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25778 invoked by uid 22791); 5 Oct 2005 18:26:18 -0000 Received: from webmail.streamline-computing.com (HELO webmail.streamline-computing.com) (82.133.39.164) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 05 Oct 2005 18:26:18 +0000 Received: from [82.133.39.162] (helo=delmo.priv.wark.uk.streamline-computing.com) by webmail.streamline-computing.com with esmtpa (Exim 4.52) id 1ENDsm-00046F-0l; Wed, 05 Oct 2005 19:20:48 +0100 Subject: Re: ptrace PEEKTEXT IO error?! From: David Lecomber To: Daniel Jacobowitz , gdb In-Reply-To: <20051005171106.GA7835@nevyn.them.org> References: <1128531841.21837.96.camel@delmo.priv.wark.uk.streamline-computing.com> <20051005171106.GA7835@nevyn.them.org> Content-Type: text/plain Date: Wed, 05 Oct 2005 18:26:00 -0000 Message-Id: <1128536411.21837.123.camel@delmo.priv.wark.uk.streamline-computing.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-10/txt/msg00012.txt.bz2 On Wed, 2005-10-05 at 13:11 -0400, Daniel Jacobowitz wrote: > On Wed, Oct 05, 2005 at 06:04:00PM +0100, David Lecomber wrote: > > Dear all, > > > > I have a multithreaded code which is misbehaving in GDB (verified on > > latest CVS). After threads are created, the target suddenly seems to > > become unwriteable, and even unreadable in some bits. > > This usually means the thread is not stopped. Failing that, check with > your kernel. 'ps' says the processes is stopped - so I guess that makes it a kernel woe. I've knocked up a ptrace test code, and it also shows the same behaviour independently of GDB. It seems ok at reading memory from addresses on the heap and stack -- but it barfs at reading memory from the text segment. Is there something that the user code (one of the libraries called by my program) could do to prevent access to memory by a ptracing program? Cheers David