govind-mukundan / MapViewer

A windows application to view and analyze information from the linker generated Map file
GNU General Public License v3.0
286 stars 65 forks source link

Fails to populate olv_SymbolView #7

Closed deyspandan closed 4 years ago

deyspandan commented 4 years ago

Sorry I am a noob programmer (specially C#)

When I click on a file on the left it does not populate the list on the right image

the problem seems to arise because

any idea why this is happening?

govind-mukundan commented 4 years ago

For some reason the program couldn't parse the module name of the symbol acknowledge. You could add a simple empty string check to make the exception go away, for example:

            List<Symbol> syms = mods.SelectMany(m => _syms.Symbols.Where(s =>
            {
                if (m.ModuleName == "") return false;  // NEW

But as to why it couldn't find the module name - we have to look into the input files, most likely the regular expression for parsing the module name requires some update or the name is not available in the files. If you attach the files (and exe's if you are using NM/ReadELF) I can take a look.

deyspandan commented 4 years ago

Tried adding this line, but it is not helping

if (m.ModuleName == "") return false; // NEW

My platform is Windows 10 v1903 I am working on a PIC32MX5XX/6XX/7XX MCU with compiler XC32 v1.40

I have added all the files in the zip -> MapAnalysis.zip

govind-mukundan commented 4 years ago

Thanks for the files, I'm not able to run the *.exe, I think I might need some accompanying DLLs or so. Could you zip the entire folder where the ,exe's are stored? Or send me a link to the version of the PIC32 compiler you are using, I can install it locally and check.

EDIT - sorry I just noticed the v1.40 - I will install it and let you know over the weekend

deyspandan commented 4 years ago

Here you go in case you need the installer

https://we.tl/t-bwfKHqhrln

govind-mukundan commented 4 years ago

I'm not able to reproduce the exception. I can see the files as expected. But I notice that there is a difference between the sizes shown in your screenshot with what I have. Did you send me the wrong .elf file/project?

image

deyspandan commented 4 years ago

Also you should use the program xc32-readelf.exe instead of xc32-elfedit.exe

This was the issue (facepalm)

Thanks for pointing out you owe some beer, let me how to send you one!

govind-mukundan commented 4 years ago

Well you could use PayPal