Quantcast

Jump to content

» «
Photo

IDB to Visual Studio symbol injection

4 replies to this topic
The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#1

Posted 07 October 2016 - 03:22 PM Edited by The_GTA, 30 August 2017 - 08:08 AM.

oCJymUR.png

Tutorial: Put IDA Database symbols into GTA executable

vBHl2Aum.png

IMPORTANT: We switched to Visual Studio 2017. Now you have to copy the correct "MSPDBCORE.DLL" file into the "output" folder or else the tool will not run.

This tutorial shows you how to put your IDA database (.idb file) symbols into a PDB file that is linked to an executable, such as a GTA engine. By doing so you will see named callstacks in Visual Studio as well as symbols in the disassembly view, hopefully greatly enhancing your GTA modding experience.



dumpinfo.idc: https://www.hex-rays...es/dumpinfo.idc
Source code of tool: http://pefrm-units.o...p/pe_debug.html
TortoiseSVN: https://tortoisesvn.net/

Quick Step-by-Step Guide
  • download dumpinfo.idc onto your desktop
  • scroll to the bottom, disable OPT_IDC_FILE (example file, download)
  • open your IDB, click File -> IDC File..., select dumpinfo.idc
  • click OK, output file name should be "symbols.txt"
  • checkout the tool source code to the desktop
  • go inside the "build" folder, open the solution
  • set working folder to "output" folder in repository, set program arguments to path to EXE file (GTA3, GTA VC, etc)
  • compile the program in Release mode
  • put "symbols.txt" into the "output" folder in repository
  • run the tool by launching it without debugging through Visual Studio
gmtHHp4m.png

Precompiled symbols.txt files
Thanks to public database resources such as this I have compiled a list of symbols.txt files to save time.
  • The Hero, Wesser, ThirteenAG and 10 others like this

iFarbod
  • iFarbod

    Breaking and fixing things!

  • Members
  • Joined: 17 Dec 2013
  • Unknown

#2

Posted 08 October 2016 - 05:40 AM

Awesome, Needed something like this since I use VS as my debugger.  :)

 

Spoiler

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#3

Posted 08 October 2016 - 08:39 AM Edited by The_GTA, 08 October 2016 - 08:39 AM.

Awesome, Needed something like this since I use VS as my debugger.  :)
 

Spoiler

Glad you like it! You can do the same thing for GTA 3 and Vice City by the way.

Spoiler

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#4

Posted 13 November 2016 - 11:52 AM

This breaks III/VC EXEs because of .bss section :( It's getting raw size/address after the EXE is touched, and both are 0 in stock EXEs. Correcting this with CFF Explorer fixes it, though!
  • The_GTA likes this

The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany
  • Modding Milestone [Magic.TXD]

#5

Posted 14 November 2016 - 12:13 AM Edited by The_GTA, 14 November 2016 - 12:14 AM.

This breaks III/VC EXEs because of .bss section :( It's getting raw size/address after the EXE is touched, and both are 0 in stock EXEs. Correcting this with CFF Explorer fixes it, though!

Thank you for notifying me, Silent senpai! I have fixed writing of export directory ordinals as well as the PE optional directory "SizeOfHeaders" variable. I missed those details in the big cave that is Microsoft PE documentation. Sorry for the inconvenience :3

Update the repository to get the fix.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users