From 349126ea35abd5b62676149a290a2a6c22e6aac3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 15 Sep 2010 03:30:30 +0000 Subject: [PATCH] PR 4606 * gcore.c (gcore_create_callback): Clear SEC_HAS_CONTENTS rather than setting SEC_NEVER_LOAD on sections that need not be copied. --- gdb/ChangeLog | 8 +++++++- gdb/gcore.c | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6ca89bf795f..c4d5312eb82 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-09-15 Alan Modra + + PR 4606 + * gcore.c (gcore_create_callback): Clear SEC_HAS_CONTENTS rather + than setting SEC_NEVER_LOAD on sections that need not be copied. + 2010-09-14 Tom Tromey * psympriv.h (add_psymbol_to_list, init_psymbol_list) @@ -109,7 +115,7 @@ * v850-tdep.c (v850_gdbarch_init): Change the v850's `char' type to be signed. - + 2010-09-09 Ulrich Weigand * dwarf2read.c (fixup_partial_die): Do not set dummy name for diff --git a/gdb/gcore.c b/gdb/gcore.c index 595c6431dd5..9fc0a7f3557 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -426,8 +426,7 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, || (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 */ } } -- 2.30.2