* bfd-in.h (bfd_cache_close_all): New function declaration.
* bfd-in2.h: Regenerate. * cache.c (bfd_cache_close_all): New function definition.
This commit is contained in:
parent
d2bef49288
commit
02d5a37b2d
@ -1,3 +1,9 @@
|
||||
2004-06-17 Jerome Guitton <guitton@gnat.com>
|
||||
|
||||
* bfd-in.h (bfd_cache_close_all): New function declaration.
|
||||
* bfd-in2.h: Regenerate.
|
||||
* cache.c (bfd_cache_close_all): New function definition.
|
||||
|
||||
2004-06-16 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
|
||||
|
@ -511,6 +511,8 @@ extern bfd_boolean bfd_cache_close
|
||||
(bfd *abfd);
|
||||
/* NB: This declaration should match the autogenerated one in libbfd.h. */
|
||||
|
||||
extern bfd_boolean bfd_cache_close_all (void);
|
||||
|
||||
extern bfd_boolean bfd_record_phdr
|
||||
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
|
||||
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
|
||||
|
@ -518,6 +518,8 @@ extern bfd_boolean bfd_cache_close
|
||||
(bfd *abfd);
|
||||
/* NB: This declaration should match the autogenerated one in libbfd.h. */
|
||||
|
||||
extern bfd_boolean bfd_cache_close_all (void);
|
||||
|
||||
extern bfd_boolean bfd_record_phdr
|
||||
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
|
||||
bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
|
||||
|
25
bfd/cache.c
25
bfd/cache.c
@ -343,6 +343,31 @@ bfd_cache_close (bfd *abfd)
|
||||
return bfd_cache_delete (abfd);
|
||||
}
|
||||
|
||||
/*
|
||||
FUNCTION
|
||||
bfd_cache_close_all
|
||||
|
||||
SYNOPSIS
|
||||
bfd_boolean bfd_cache_close_all (void);
|
||||
|
||||
DESCRIPTION
|
||||
Remove all BFDs from the cache. If the attached file is open,
|
||||
then close it too.
|
||||
|
||||
RETURNS
|
||||
<<FALSE>> is returned if closing one of the file fails, <<TRUE>> is
|
||||
returned if all is well.
|
||||
*/
|
||||
|
||||
bfd_boolean
|
||||
bfd_cache_close_all ()
|
||||
{
|
||||
bfd_boolean ret = TRUE;
|
||||
|
||||
while (bfd_last_cache != NULL)
|
||||
ret &= bfd_cache_close (bfd_last_cache);
|
||||
}
|
||||
|
||||
/*
|
||||
INTERNAL_FUNCTION
|
||||
bfd_open_file
|
||||
|
Loading…
Reference in New Issue
Block a user