Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible way around for 7.4+ versions #29

Open
dezmen3 opened this issue Jul 16, 2022 · 2 comments
Open

Possible way around for 7.4+ versions #29

dezmen3 opened this issue Jul 16, 2022 · 2 comments

Comments

@dezmen3
Copy link

dezmen3 commented Jul 16, 2022

Played around with different versions of fakepdb and could finally make an .pdb file. I'm using IDA PRO 7.7

Steps:

  1. Use fakepdb 0.3 to dump info into json file (might work with 0.2 dump, haven't tested)
  2. Get fakepdb 0.2 and copy .json file and original exe file into fakepdb/win32/ folder or just take pdbgen.exe and place somewhere with those files
  3. run cmd.exe-> pdbgen.exe generate -l "path to your app\app.exe" "path to json file\app.json" "path to .pdb file that will saved"

worked like a charm, got pdb,VS recognized functions

@widberg
Copy link

widberg commented Jul 7, 2023

This works for me, thanks! Not sure what happened between 0.2 and 0.3 but using the older version I was able to get a PDB where the newer one would only produce a JSON. Having the same problem on the latest commit too.

@p0358
Copy link
Contributor

p0358 commented Nov 16, 2023

I present to you the actual solution:

In IDA scripting window:

import ida_nalt
ida_nalt.set_root_filename('E:\\new\\path\\to\\your\\analysedfile.dll')

You may also check current path with:

ida_nalt.get_input_file_path()

This is the difference between 0.2 and 0.3, currently FakePDB uses ida_nalt.get_input_file_path(). Previously it assumed the old path to be <ida_db_path>/<ida_db_name>.exe. That assumption was of course very wrong, since you could have a different extension than exe, or even save the database elsewhere in the first place!

But the current behavior causes things to break if you move the executable somewhere else, while IDA still thinks it's at the old location. After changing it, it works again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants