GithubHelp home page GithubHelp logo

ida-pro-loadmap's Introduction

IDA Pro plugin for loading .MAP symbol files

Loads a VC/Borland/Dede/GCC/IDA .map file into IDA Database.

What is the MAP file

The .map file may be generated during compilation, and contain some of debug info (function names, global variables, in some cases locals as well).

In the past, it was generated automatically by many compilers. For some programs, it was included in a pre-release version, or even in final release.

Todays compiles still have ability to enable .map file generation, ie:

  • Watcom linker has OPTION MAP[=map_file] command line switch
  • GCC linker has -Xlinker -Map=output.map command line switch
  • Microsoft VC linker has /MAP[:filename] command line switch

More information

See src/LoadMap.cpp for credits, license and changelog.

Installation

  • Copy loadmap.dll to IDA plugins folder
  • Open any PE/LE file project
  • Click Load MAP with Shift to see options

Building

The building requires IDA Pro SDK.

To rebuilt the project on Windows using GUI, copy it to IDA SDK plugins/loadmap folder, then open SLN file and build it with Visual Studio.

To rebuilt the project from command line, check how the Github Actions do that. You will need some GNU tools including make, and VC compiler from Visual Studio.

Troubleshooting

If the plugin does not show in "Edit" -> "Plugins", then:

  • Make sure you have a code project opened
  • Check IDA "Output" console, there should be a message either confirming the load or with error
  • If the "Output" console shows "Cannot load certain module", you probably lack Visual C++ Redistributable Package
  • Check the "Issues" tab of this project on Github for more info

Known issues

Currently it doesn't understand MAP files with 64-bit offsets - new versions of GCC produce files with such long offsets. WA for this is to just remove excessive zeros from offsets in MAP file before loading it.

Currently the tool uses Windows API, so will not work with Linux or Mac OS version of IDA Pro. To fix that:

  • reading keys would have to be switched to one from Qt
  • memory mapped file usage would have to be implemented (or switched to C++ standard method, when it finally arrives)

ida-pro-loadmap's People

Contributors

emoose avatar mattiwatti avatar mefistotelis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ida-pro-loadmap's Issues

How to load plugin?

  • Click Load MAP with Shift to see options

How does one do this. I can't actually figure out how to load the plugin ? Where is this button/menu?

Plugin requires fixing.

qstrncpy(g_szIniPath, get_user_idadir(), sizeof(g_szIniPath));

This piece of code, for me, it returns "C:\Users\SunBeam\AppData\Roaming\Hex-Rays\IDA Pro" (without the ""). As you can see, there's no trailing \ after Pro. So, naturally, this then happens:

qstrncat(g_szIniPath, "loadmap.cfg", sizeof(g_szIniPath));

Which means we get "C:\Users\SunBeam\AppData\Roaming\Hex-Rays\IDA Proloadmap.cfg". Which will never ever be a valid file. So you need a qstrncat(g_szIniPath, "\", 1); right after the first qstrncpy.

Because of the above, the plugin always exits; unless fixed as you may have mentioned in another issue I read.

Recommendation:

qstrncpy(g_szIniPath, idadir("plugins"), sizeof(g_szIniPath));
qstrncat(g_szIniPath, "\\", sizeof(g_szIniPath));
qstrncat(g_szIniPath, "loadmap.cfg", sizeof(g_szIniPath));

This way the 'loadmap.cfg' stays in the plugins directory, where the .dll resides and proper path is computed with trailing slash after first strncpy.

Hope this helps!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.