Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Fix for failing gdb.base/corefile.exp on Linux
@ 2008-07-17 18:36 Paul Pluzhnikov
  2008-07-17 18:58 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Pluzhnikov @ 2008-07-17 18:36 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-17 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-17 18:36 [RFA] Fix for failing gdb.base/corefile.exp on Linux Paul Pluzhnikov
2008-07-17 18:58 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox