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]

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


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