Community
Participate
Working Groups
Build Identifier: Scope#mergeScopeRange does not correctly update the Scope's IRangeList if one needs to be created or if a range needs to be added which is not above or below the current range covered by a Scope (i.e. between low and high address). RangeList#add{Low,High}Range(long) do not work correctly as they assume that the RangeList is sorted and if it is not then they don't lower the lowest entry's low but some other entries low resulting in an inconsistent RangeList RangeList#mergeRangeList does not work well if the scopes it is merging overlap at all. FunctionScopes do not merge in added children and so a hack is required in DwarfInfoReader to move the low and high addresses which can be removed if instead the merge is performed. Reproducible: Always
Created attachment 201996 [details] Patch to do all this
regarding the TODO in the patch in mergeRangeLists … first, i wonder why RangeList is historically buried in .internal.symbols.dwarf as opposed to residing in .internal.symbols . second, i wonder if this would be a good opportunity to create something like ...edc.internal.symbols.IOrderedRangeList extends SortedSet<IRangeList.Entry> and ...edc.internal.symbols.OrderedRangeList implements IOrderedRangeList … in this way, ultimately, mergeRangeLists could be guaranteed to work on ordered range lists, and the implementation would provide the benefits of doing the ordering so long as the Comparator is sufficient. and it would be obviously available to all symbols formats, not just those that know RangeLists.java is in .internal.symbols.dwarf .
Created attachment 202129 [details] Patch to do all this and add sort method so that this happens correctly (In reply to comment #2) > regarding the TODO in the patch in mergeRangeLists … > > first, i wonder why RangeList is historically buried in .internal.symbols.dwarf > as opposed to residing in .internal.symbols . Yes it might be worth moving it (though I haven't done that in the updated patch) > second, i wonder if this would be a good opportunity to create something like > ...edc.internal.symbols.IOrderedRangeList extends SortedSet<IRangeList.Entry> > and ...edc.internal.symbols.OrderedRangeList implements IOrderedRangeList … Unfortunately the kind of sorting required is not that that standard sort methods will do as it also needs to merge adjacent/overlapping entries and remove zero length ones. (See the patch for an implementation which does that) [snip]
(this is part of a batch change) The Eclipse CDT EDC (https://wiki.eclipse.org/CDT/cdt-debug-edc) is now obsolete and has not had any active development since 2011. Therefore the still open bugs are being marked as wontfix. The git repo for the project still exists for posterity at https://git.eclipse.org/c/cdt/org.eclipse.cdt.edc.git/