Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: ppluzhnikov@google.com (Paul Pluzhnikov)
To: gdb-patches@sourceware.org
Subject: [RFA] Fix for failing gdb.base/corefile.exp on Linux
Date: Thu, 17 Jul 2008 18:36:00 -0000	[thread overview]
Message-ID: <20080717183535.CF6C33A67B6@localhost> (raw)

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


             reply	other threads:[~2008-07-17 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 18:36 Paul Pluzhnikov [this message]
2008-07-17 18:58 ` Daniel Jacobowitz

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=20080717183535.CF6C33A67B6@localhost \
    --to=ppluzhnikov@google.com \
    --cc=gdb-patches@sourceware.org \
    /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