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

Michael Snyder msnyder@vmware.com
Wed Nov 4 18:29:00 GMT 2009


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.



More information about the Gdb mailing list