can't access READ_ONLY mmap-ed file in core on linux

Pavel Krauz <[email protected]> Fri, 30 May 2003 16:08:30 +0200
Newsgroups gmane.comp.gdb.bugs.general
Organization NetTest
Message-ID <[email protected]>
Hello,

I have encountered a problem with gdb and READ_ONLY mmap-ed file.
If the program crashes and generates core file, I can't print variables that are
in READ_ONLY mmap-ed file region. If I change it to READ&WRITE or
if I attach gdb to running program I can read the region memory.

Is this known problem? I am expecting to read (print) variables that are in read-only region.

It even may be a kernel core generation problem but first I try to ask you what do
you think about.



I am running:

GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.

Linux nimitz 2.4.17 #2 Fri Jan 4 15:50:10 CET 2002 i686 unknown


(please reply personally - I did not subscribe the list).
best regards
Pavel