This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PR 4606, gcore sections
- From: Alan Modra <amodra at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 15 Sep 2010 12:59:40 +0930
- Subject: PR 4606, gcore sections
I'm committing this as obvious, because I'm about to make some changes
to BFD that will break gcore if it continues to use SEC_NEVER_LOAD.
PR 4606
* gcore.c (gcore_create_callback): Clear SEC_HAS_CONTENTS rather
than setting SEC_NEVER_LOAD on sections that need not be copied.
Index: gdb/gcore.c
===================================================================
RCS file: /cvs/src/src/gdb/gcore.c,v
retrieving revision 1.41
diff -u -p -r1.41 gcore.c
--- gdb/gcore.c 31 Aug 2010 18:08:43 -0000 1.41
+++ gdb/gcore.c 15 Sep 2010 02:35:27 -0000
@@ -426,8 +426,7 @@ gcore_create_callback (CORE_ADDR vaddr,
|| (start >= vaddr && end <= vaddr + size))
&& !(bfd_get_file_flags (abfd) & BFD_IN_MEMORY))
{
- flags &= ~SEC_LOAD;
- flags |= SEC_NEVER_LOAD;
+ flags &= ~(SEC_LOAD | SEC_HAS_CONTENTS);
goto keep; /* break out of two nested for loops */
}
}
--
Alan Modra
Australia Development Lab, IBM