sub AnalyseMapFile { my $self = shift; my $MapFile = $self->{MAPFILEINFO}{MAPFILECONTENT}; my $PlaceToPutInformation = $self->{MEMORYMAP}; $self->{MAPFILEINFO}{ProfileInformation} = $ProfileInformation; my $memory_section = ''; my $state = 0; my $memory_size = 0; my $state_smybol = { 1 => 'Image component sizes', 2 => ' Code \(inc\. data\) RO Data RW Data ZI Data Debug Object Name', }; #Each config profile defines its own way how to parse the map-file. #Process map-file for ( my $iterator = $ProfileInformation->{'StartLine'} ; $iterator < @$MapFile ; $iterator++ ) { chomp($MapFile->[$iterator]); next if (! $MapFile->[$iterator]); if (( $state == 0 ) ###THIS IS LINE 104 && ( $MapFile->[$iterator] =~m/$MTA::Profile_ARM::state_symbol->{1}/)) { $state = 1; next; } elsif (( $state == 1 ) && ( $MapFile->[$iterator] =~m/$MTA::Profile_ARM::state_symbol->{2}/)) { $state = 2; next; } elsif ( $state == 2 ) { #Get module information my($Code, $CodeData, $ROData, $RWData, $ZIData, $Debug, $ObjName) = split(/\s/,$MapFile->[$iterator]);