This is the mail archive of the gdb-patches@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]

[RFA] Fix for failing gdb.base/corefile.exp on Linux


Greetings,

(Some?) Linux kernels do not write out unmodified mmaped regions,
which causes gdb.base/corefile.exp to fail:

Running ../../../src/gdb/testsuite/gdb.base/corefile.exp ...
FAIL: gdb.base/corefile.exp: accessing mmapped data in core file (mapping address not found in core file)

Attached patch fixes that.
Ok to commit?

--
Paul Pluzhnikov

2008-07-17  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.base/coremaker.c: Fix for Linux failure in gdb.base/corefile.exp

Index: testsuite/gdb.base/coremaker.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/coremaker.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 coremaker.c
--- testsuite/gdb.base/coremaker.c	1 Jan 2008 22:53:18 -0000	1.5
+++ testsuite/gdb.base/coremaker.c	17 Jul 2008 18:29:50 -0000
@@ -96,6 +96,8 @@ mmapdata ()
 	  return;
 	}
     }
+  /* Touch buf2 so kernel writes it out into 'core'. */
+  buf2[0] = buf1[0];
 }
 
 void


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