gdb/build-id.h - gdb

Macros defined

Source code

  1. /* build-id-related functions.

  2.    Copyright (C) 1991-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef BUILD_ID_H
  15. #define BUILD_ID_H

  16. /* Locate NT_GNU_BUILD_ID from ABFD and return its content.  */

  17. extern const struct elf_build_id *build_id_bfd_get (bfd *abfd);

  18. /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
  19.    Otherwise, issue a warning and return false.  */

  20. extern int build_id_verify (bfd *abfd,
  21.                             size_t check_len, const bfd_byte *check);


  22. /* Find and open a BFD given a build-id.  If no BFD can be found,
  23.    return NULL.  The returned reference to the BFD must be released by
  24.    the caller.  */

  25. extern bfd *build_id_to_debug_bfd (size_t build_id_len,
  26.                                    const bfd_byte *build_id);

  27. /* Find the separate debug file for OBJFILE, by using the build-id
  28.    associated with OBJFILE's BFD.  If successful, returns a malloc'd
  29.    file name for the separate debug file.  The caller must free this.
  30.    Otherwise, returns NULL.  */

  31. extern char *find_separate_debug_file_by_buildid (struct objfile *objfile);

  32. #endif /* BUILD_ID_H */