From: Elena Zannoni <ezannoni@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] gcore: ignore no protection segments
Date: Tue, 13 Jan 2004 17:01:00 -0000 [thread overview]
Message-ID: <16388.9214.960234.384619@localhost.redhat.com> (raw)
This is necessary, otherwise a later read/write to that memory will
jam the kernel.
elena
2004-01-12 Elena Zannoni <ezannoni@redhat.com>
* gcore.c (gcore_create_callback): Skip any memory segment that
has no permissions set.
Index: gcore.c
===================================================================
RCS file: /cvs/src/src/gdb/gcore.c,v
retrieving revision 1.13
diff -u -p -r1.13 gcore.c
--- gcore.c 11 Oct 2003 01:56:53 -0000 1.13
+++ gcore.c 13 Jan 2004 16:50:14 -0000
@@ -1,6 +1,6 @@
/* Generate a core file for the inferior process.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -313,6 +313,17 @@ gcore_create_callback (CORE_ADDR vaddr,
bfd *obfd = data;
asection *osec;
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
+
+ if (read == 0 && write == 0 && exec == 0)
+ {
+ if (info_verbose)
+ {
+ fprintf_filtered (gdb_stdout, "Ignore segment, %lld bytes at 0x%s\n",+ (long long) size, paddr_nz (vaddr));
+ }
+
+ return 0;
+ }
if (write == 0)
{
next reply other threads:[~2004-01-13 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-13 17:01 Elena Zannoni [this message]
2004-01-13 18:46 ` Andrew Cagney
2004-01-14 18:39 ` Elena Zannoni
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=16388.9214.960234.384619@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/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