New python attribute gdb.Objfile.build_id.
authorDoug Evans <dje@google.com>
Thu, 4 Dec 2014 19:32:24 +0000 (11:32 -0800)
committerDoug Evans <dje@google.com>
Thu, 4 Dec 2014 19:32:24 +0000 (11:32 -0800)
commit7c50a93137df660f7b2d9d68c0db748a9cb7868f
treeb47c96bea08c023b78798039c98e18c9dafbd632
parentfbad6518c1397939ea2d832eea7e53f2147759a8
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.
12 files changed:
gdb/ChangeLog
gdb/NEWS
gdb/build-id.c
gdb/build-id.h
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-objfile.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-objfile.exp
gdb/testsuite/lib/gdb.exp
gdb/utils.c
gdb/utils.h