This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ptrace PEEKTEXT IO error?!


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]