From 7c50a93137df660f7b2d9d68c0db748a9cb7868f Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 4 Dec 2014 11:32:24 -0800 Subject: New python attribute gdb.Objfile.build_id. gdb/ChangeLog: * NEWS: Mention gdb.Objfile.build_id. * build-id.c (build_id_bfd_get): Make non-static. * build-id.h (build_id_bfd_get): Add declaration. * python/py-objfile.c: #include "build-id.h", "elf-bfd.h". (OBJFPY_REQUIRE_VALID): New macro. (objfpy_get_build_id): New function. (objfile_getset): Add "build_id". * utils.c (make_hex_string): New function. * utils.h (make_hex_string): Add declaration. gdb/doc/ChangeLog: * python.texi (Objfiles In Python): Document Objfile.build_id. gdb/testsuite/ChangeLog: * lib/gdb.exp (get_build_id): New function. (build_id_debug_filename_get): Rewrite to use it. * gdb.python/py-objfile.exp: Add test for objfile.build_id. --- gdb/build-id.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/build-id.h') diff --git a/gdb/build-id.h b/gdb/build-id.h index ddd2645..548ea5e 100644 --- a/gdb/build-id.h +++ b/gdb/build-id.h @@ -20,6 +20,10 @@ #ifndef BUILD_ID_H #define BUILD_ID_H +/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ + +extern const struct elf_build_id *build_id_bfd_get (bfd *abfd); + /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value. Otherwise, issue a warning and return false. */ -- cgit v1.1