Ghidra-Cpp-Class-Analyzer icon indicating copy to clipboard operation
Ghidra-Cpp-Class-Analyzer copied to clipboard

Installation Tutorial

Open astrelsky opened this issue 5 years ago • 9 comments

Provide better instructions for installation and use.

astrelsky avatar Apr 20 '20 02:04 astrelsky

Installation

  1. Install Gradle - follow the installation guild.
  2. Set environment variable - GHIDRA_INSTALL_DIR=<path_to_ghidra_folder>.
  3. Navigate to Ghidra-Cpp-Class-Analyzer cloned repository.
  4. Open command prompt and run gradle buildExtension
  5. Open Ghidra project manager -> File -> Install Extensions...
  6. Add Ghidra-Cpp-Class-Analyzer repo by clicking the green plus on the right top corner
  7. Restart Ghidra
  8. Open CodeBrowser File -> Configure... -> Experimental
  9. Select ClassTypeInfoManagerPlugin
  10. Restart CodeBrowser and enable analyzers

0xhido avatar Jan 03 '21 09:01 0xhido

I am trying to build it myself, but seems there is missing dependencies?

Ghidra-Cpp-Class-Analyzer/src/main/java/cppclassanalyzer/database/tables/AbstractDatabaseTable.java:36: error: cannot find symbol protected final db.Record getRawRecord(Field key) throws IOException { ^ symbol: class Record location: package db

halvors avatar Mar 29 '21 02:03 halvors

I am trying to build it myself, but seems there is missing dependencies?

Ghidra-Cpp-Class-Analyzer/src/main/java/cppclassanalyzer/database/tables/AbstractDatabaseTable.java:36: error: cannot find symbol protected final db.Record getRawRecord(Field key) throws IOException { ^ symbol: class Record location: package db

Which version of Ghidra are you using? If you are using Ghidra 9.3_DEV please use the dev branch. db.Record was renamed to DBRecord in Ghidra 9.3 to fix the conflict with java 14 java.lang.Record.

astrelsky avatar Mar 29 '21 11:03 astrelsky

Thanks @myrode for the notes. One detail from me: I got an error when compiling against 9.2. I upgraded to 9.2.2 and it worked. Also, I think I did not need to enter some of the dialogs to enable this analyzer, as Ghidra asked me to enable it initially, and I said yes. After it was enabled, I needed to run the "Analysis > Auto analyze", which I suppose it's what it meant "enable analyzers" (I'm not familiar with Ghidra yet).

suy avatar Apr 12 '21 20:04 suy

I'm trying to build it for 9.2.4 and get:

> Task :compileJava
<home>\Ghidra-Cpp-Class-Analyzer-2.0.5\src\main\java\cppclassanalyzer\data\typeinfo\AbstractClassTypeInfoDB.java:12: error: cannot find symbol
import db.DBRecord;
         ^
  symbol:   class DBRecord
  location: package db
<home>\Ghidra-Cpp-Class-Analyzer-2.0.5\src\main\java\cppclassanalyzer\database\schema\ClassTypeInfoSchema.java:5: error: cannot find symbol

HexRoman avatar Aug 17 '21 12:08 HexRoman

Same error when trying to build for Ghidra 9.2

HexRoman avatar Aug 17 '21 13:08 HexRoman

Same error when trying to build for Ghidra 9.2

It is not compatible with Ghidra 9.2. I apologize for the outdated section in the README. See #42

astrelsky avatar Aug 17 '21 18:08 astrelsky

I used the build for Ghidra 10.1.1 and installed the Extension, but in Code Browser -> Configure i dont see it?

https://gyazo.com/e64248b07804acf6e171bf77fa5d89cf https://gyazo.com/b66a92ff74553ec44f88dda4c213e363

Issue #44 Fixed it, maybe add it to the readme?

Maxxxel avatar Jan 15 '22 12:01 Maxxxel

I used the build for Ghidra 10.1.1 and installed the Extension, but in Code Browser -> Configure i dont see it?

https://gyazo.com/e64248b07804acf6e171bf77fa5d89cf https://gyazo.com/b66a92ff74553ec44f88dda4c213e363

Issue #44 Fixed it, maybe add it to the readme?

I don't understand how/why this happens as it shouldn't. How did you install it?

astrelsky avatar Jan 15 '22 23:01 astrelsky