contrib/gdb-7/gdb/python/py-auto-load.c
static void
auto_load_section_scripts (struct objfile *objfile, const char *section_name)
{
  bfd *abfd = objfile->obfd;
  asection *scripts_sect;
  bfd_size_type size;
  char *p;
  struct cleanup *cleanups;

  scripts_sect = bfd_get_section_by_name (abfd, section_name);
  if (scripts_sect == NULL)
    return;

  size = bfd_get_section_size (scripts_sect);
  p = xmalloc (size);
  
  cleanups = make_cleanup (xfree, p);

  if (bfd_get_section_contents (abfd, scripts_sect, p, (file_ptr) 0, size))
    source_section_scripts (objfile, section_name, p, p + size);
  else
    warning (_("Couldn't read %s section of %s"),
	     section_name, bfd_get_filename (abfd));

  do_cleanups (cleanups);
}
/* Load scripts specified in section SECTION_NAME of OBJFILE.  */
Load scripts specified in section SECTION_NAME of OBJFILE.
Load scripts specified in section SECTION_NAME of OBJFILE .
static void
auto_load_section_scripts (struct objfile *objfile, const char *section_name)
{
  bfd *abfd = objfile->obfd;
  asection *scripts_sect;
  bfd_size_type size;
  char *p;
  struct cleanup *cleanups;
  scripts_sect = bfd_get_section_by_name (abfd, section_name);
  if (scripts_sect == NULL)
    return;
  size = bfd_get_section_size (scripts_sect);
  p = xmalloc (size);
  cleanups = make_cleanup (xfree, p);
  if (bfd_get_section_contents (abfd, scripts_sect, p, (file_ptr) 0, size))
    source_section_scripts (objfile, section_name, p, p + size);
  else
    warning (_("Couldn't read %s section of %s"),
	     section_name, bfd_get_filename (abfd));
  do_cleanups (cleanups);
}
static void auto_load_section_scripts ( struct objfile * objfile , const char * section_name ) { bfd * abfd = objfile -> obfd ; asection * scripts_sect ; bfd_size_type size ; char * p ; struct cleanup * cleanups ; scripts_sect = bfd_get_section_by_name ( abfd , section_name ) ; if ( scripts_sect == NULL ) return ; size = bfd_get_section_size ( scripts_sect ) ; p = xmalloc ( size ) ; cleanups = make_cleanup ( xfree , p ) ; if ( bfd_get_section_contents ( abfd , scripts_sect , p , ( file_ptr ) 0 , size ) ) source_section_scripts ( objfile , section_name , p , p + size ) ; else warning ( _ ( " " ) , section_name , bfd_get_filename ( abfd ) ) ; do_cleanups ( cleanups ) ; }
Load scripts specified in section SECTION_NAME of OBJFILE.
Load scripts specified in section SECTION_NAME of OBJFILE .