From: Daniel Jacobowitz <drow@false.org>
To: David Lecomber <david@allinea.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: ptrace PEEKTEXT IO error?!
Date: Wed, 05 Oct 2005 18:41:00 -0000 [thread overview]
Message-ID: <20051005184121.GA10564@nevyn.them.org> (raw)
In-Reply-To: <1128536411.21837.123.camel@delmo.priv.wark.uk.streamline-computing.com>
On Wed, Oct 05, 2005 at 07:20:11PM +0100, David Lecomber wrote:
> 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?
No, this is most likely a kernel bug. This is mapped code, right, not
some mmaped device file (which is not generally accessible by ptrace)?
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-10-05 18:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 17:10 David Lecomber
2005-10-05 17:11 ` Daniel Jacobowitz
2005-10-05 18:26 ` David Lecomber
2005-10-05 18:40 ` David Lecomber
2005-10-05 18:41 ` Daniel Jacobowitz [this message]
2005-10-05 19:50 ` David Lecomber
2005-10-05 19:54 ` Daniel Jacobowitz
2005-10-05 20:31 ` David Lecomber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051005184121.GA10564@nevyn.them.org \
--to=drow@false.org \
--cc=david@allinea.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).