From 2e75c987d591d3af313ee38a31ab677f6f4eb1ff Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Wed, 11 Dec 2019 17:29:44 -0800 Subject: libdwfl: remove broken coalescing logic in dwfl_report_segment dwfl_report_segment has some logic that detects when a segment is contiguous with the previously reported segment, in which case it's supposed to coalesce them. However, in this case, it actually returns without updating the segment array at all. As far as I can tell, this has always been broken. It appears that no one uses the coalescing logic anyways, as they pass IDENT as NULL. Let's just get rid of the logic and add a test case. Signed-off-by: Omar Sandoval --- libdwfl/libdwflP.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libdwfl/libdwflP.h') diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h index f631f946..25753de2 100644 --- a/libdwfl/libdwflP.h +++ b/libdwfl/libdwflP.h @@ -132,12 +132,7 @@ struct Dwfl GElf_Addr *lookup_addr; /* Start address of segment. */ Dwfl_Module **lookup_module; /* Module associated with segment, or null. */ int *lookup_segndx; /* User segment index, or -1. */ - - /* Cache from last dwfl_report_segment call. */ - const void *lookup_tail_ident; - GElf_Off lookup_tail_vaddr; - GElf_Off lookup_tail_offset; - int lookup_tail_ndx; + int next_segndx; struct Dwfl_User_Core *user_core; }; -- cgit v1.2.1