summaryrefslogtreecommitdiff
path: root/bfd/opncls.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-14 20:11:07 +0000
committerTom Tromey <tromey@redhat.com>2013-03-14 20:11:07 +0000
commitd8427a16af7fe06480b82a9a018a9d1628da1f5b (patch)
treecb9e62472a866f55de1e8444c8962e9fed680544 /bfd/opncls.c
parent76a145e4d87107334100f3c5d8b50cf303bafced (diff)
downloadbinutils-redhat-d8427a16af7fe06480b82a9a018a9d1628da1f5b.tar.gz
gdb
* symfile.c (get_debug_link_info): Remove. (find_separate_debug_file_by_debuglink): Use bfd_get_debug_link_info. bfd * opncls.c (bfd_get_debug_link_info): Rename from get_debug_link_info. Export. Update comment. (find_separate_debug_file): Update. * bfd-in2.h: Rebuild.
Diffstat (limited to 'bfd/opncls.c')
-rw-r--r--bfd/opncls.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 6d61191a96..1217cea6b6 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -1,6 +1,6 @@
/* opncls.c -- open and close a BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -1140,20 +1140,22 @@ bfd_calc_gnu_debuglink_crc32 (unsigned long crc,
/*
-INTERNAL_FUNCTION
- get_debug_link_info
+FUNCTION
+ bfd_get_debug_link_info
SYNOPSIS
- char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
+ char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
DESCRIPTION
fetch the filename and CRC32 value for any separate debuginfo
associated with @var{abfd}. Return NULL if no such info found,
- otherwise return filename and update @var{crc32_out}.
+ otherwise return filename and update @var{crc32_out}. The
+ returned filename is allocated with @code{malloc}; freeing it
+ is the responsibility of the caller.
*/
-static char *
-get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
+char *
+bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
{
asection *sect;
unsigned long crc32;
@@ -1261,7 +1263,7 @@ find_separate_debug_file (bfd *abfd, const char *debug_file_directory)
return NULL;
}
- base = get_debug_link_info (abfd, & crc32);
+ base = bfd_get_debug_link_info (abfd, & crc32);
if (base == NULL)
return NULL;