From 99a29497c673871040fed2382938eb5bd06befdd Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 21 Nov 2013 15:33:22 +0100 Subject: [PATCH] Fix non-build-id core files on build-id system Signed-off-by: Jan Kratochvil --- libdwfl/ChangeLog | 6 ++++++ libdwfl/link_map.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 3c2ffc814..deb501407 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,9 @@ +2013-11-21 Jan Kratochvil + + Fix non-build-id core files on build-id system. + * link_map.c (report_r_debug): Remove valid clearing if build-id cannot + be read from memory. + 2013-11-21 Jan Kratochvil * dwfl_segment_report_module.c (dwfl_segment_report_module): New diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index b30f2e37a..2913d9f73 100644 --- a/libdwfl/link_map.c +++ b/libdwfl/link_map.c @@ -415,9 +415,11 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata, &buffer, &buffer_available, build_id_vaddr, build_id_len, memory_callback_arg)) - /* File has valid build-id which cannot be verified - in memory. */ - valid = false; + { + /* File has valid build-id which cannot be read from + memory. This happens for core files without bit 4 + (0x10) set in Linux /proc/PID/coredump_filter. */ + } else { if (memcmp (build_id_bits, buffer, build_id_len) != 0) -- 2.47.2