comparison host/tools/configtool/common/win32/memmap.cpp @ 103:95f3e12a6327 ecos-sw-2000-06-23

Merge from eCos master repository on 2000-06-23-16:41:10-BST
author jlarmour
date Fri, 23 Jun 2000 17:06:31 +0000
parents 435cced73e2f
children 6ed91473a1cd
comparison
equal deleted inserted replaced
102:6409b6d94dd7 103:95f3e12a6327
836 836
837 list <mem_section>::iterator new_section = section_view->section; 837 list <mem_section>::iterator new_section = section_view->section;
838 mem_location * new_section_location = (location_type == initial_location ? new_section->initial_location : new_section->final_location); 838 mem_location * new_section_location = (location_type == initial_location ? new_section->initial_location : new_section->final_location);
839 list <mem_section_view>::iterator insertion_point = section_view; 839 list <mem_section_view>::iterator insertion_point = section_view;
840 ++insertion_point; 840 ++insertion_point;
841 bool no_relocation = true;
841 842
842 while (new_section_location->following_section != NULL) 843 while (new_section_location->following_section != NULL)
843 { 844 {
844 // add the new section to the section view list 845 // add the new section to the section view list
845 846
846 mem_section_view new_section_view; 847 mem_section_view new_section_view;
847 new_section_view.section = new_section_location->following_section; 848 new_section_view.section = new_section_location->following_section;
848 const bool section_relocates = new_section->relocates; 849 const bool section_relocates = new_section->relocates;
849 new_section = new_section_view.section; 850 new_section = new_section_view.section;
850 new_section_view.section_location = (new_section->relocates ? location_type : fixed_location); 851 new_section_view.section_location = (new_section->relocates ? location_type : fixed_location);
851 if ((new_section_view.section_location == fixed_location) && (location_type == final_location) && (! section_view->section->relocates) && (! section_relocates)) 852 if ((new_section_view.section_location == fixed_location) && (location_type == final_location) && (! section_view->section->relocates) && (! section_relocates) && no_relocation)
852 { 853 {
853 // section already added to the view 854 // section already added to the view so add nothing but
855 // increment insertion point for following sections
856 TRACE (_T("Skipping section %s %s location (relative) preceding %s\n"), CString (new_section_location->following_section->name.c_str()), location_type == initial_location ? _T("initial") : _T("final"), ((insertion_point != region->section_view_list.end ()) && (insertion_point->section != NULL)) ? CString (insertion_point->section->name.c_str()) : _T("(null)"));
857 ++insertion_point;
854 } 858 }
855 else 859 else
856 { 860 {
857 TRACE (_T("Inserting section %s %s location (relative) preceding %s\n"), CString (new_section_location->following_section->name.c_str()), location_type == initial_location ? _T("initial") : _T("final"), ((insertion_point != region->section_view_list.end ()) && (insertion_point->section != NULL)) ? CString (insertion_point->section->name.c_str()) : _T("(null)")); 861 TRACE (_T("Inserting section %s %s location (relative) preceding %s\n"), CString (new_section_location->following_section->name.c_str()), location_type == initial_location ? _T("initial") : _T("final"), ((insertion_point != region->section_view_list.end ()) && (insertion_point->section != NULL)) ? CString (insertion_point->section->name.c_str()) : _T("(null)"));
858 region->section_view_list.insert (insertion_point, new_section_view); 862 region->section_view_list.insert (insertion_point, new_section_view);
863 no_relocation = no_relocation && ! new_section_view.section->relocates;
859 } 864 }
860 new_section_location = (location_type == initial_location ? new_section->initial_location : new_section->final_location); 865 new_section_location = (location_type == initial_location ? new_section->initial_location : new_section->final_location);
861 } 866 }
862 867
863 return true; 868 return true;