This is the mail archive of the gdb@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]

Re: About the gdb prec save/restore reverse exec behavior error (gcore error)


Hui Zhu wrote:
Hi Michael,

I make a patch to fix it.  I try in i386-ubuntu.  It is OK now.
Please help me review it.

Thanks,
Hui

2009-11-04 Hui Zhu <teawater@gmail.com>

* gcore.c (gcore_copy_callback): Remove bfd_get_section_flags check.

---
 gcore.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/gcore.c
+++ b/gcore.c
@@ -510,10 +510,6 @@ gcore_copy_callback (bfd *obfd, asection
   struct cleanup *old_chain = NULL;
   void *memhunk;

-  /* Read-only sections are marked; we don't have to copy their contents.  */
-  if ((bfd_get_section_flags (obfd, osec) & SEC_LOAD) == 0)
-    return;
-
   /* Only interested in "load" sections.  */
   if (strncmp ("load", bfd_section_name (obfd, osec), 4) != 0)
     return;


No, this is not acceptable. We can't save ALL of the loadable sections, it will make the gcore file much bigger than necessary. Most loadable sections are code, and do not need to be saved.

We will need to choose explicitly just the loadable sections
that we need to save.


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