Comments (12)
In the python terminal with the .dylib opened what does currentProgram.getCompilerSpec().getCompilerSpecID().getIdAsString()
produce?
The method GnuUtils.isGnuCompiler()
should be what is being used to check this. The analyzers would be disabled if it returns false.
Edit: please forgive me it appears I misread the issue. May you attach a .dynlib I may use to investigate?
from ghidra-cpp-class-analyzer.
from ghidra-cpp-class-analyzer.
from ghidra-cpp-class-analyzer.
Nothing shows up in the class hierarchy tree is the issue I've been having. It appears the analyzers somewhat work as the methods are recognized as class member functions when you look at the names but the class hierarchy isn't generated for some reason.
from ghidra-cpp-class-analyzer.
Nothing shows up in the class hierarchy tree is the issue I've been having. It appears the analyzers somewhat work as the methods are recognized as class member functions when you look at the names but the class hierarchy isn't generated for some reason.
I'm going to try to take a look this weekend. I have limited access to internet resources though so I won't make any promises.
from ghidra-cpp-class-analyzer.
So, the good news is that it appears to be a minor issue with how external symbols are being handled. I should have a solution shortly.
from ghidra-cpp-class-analyzer.
@ILOVEPIE if you can build the extension may you try the master branch please?
from ghidra-cpp-class-analyzer.
sure i'll need a little bit of time to do so as im a little busy atm
from ghidra-cpp-class-analyzer.
sure i'll need a little bit of time to do so as im a little busy atm
Not a problem, there's no rush.
from ghidra-cpp-class-analyzer.
Hey, I recently ran into a similar issue and just stepped through the extension through a debugger. I found that getTypeInfo
was returning null
and ended up making a quick hacky change that seemed to help run the analyzer on a mac-gcc binary. Sadly this is just a binary I have so I can't make a small reproducible example right now.
The code change for reference if this helps you get a clue as to what might be happening or helps someone else on mac.
diff --git a/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java b/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java
index bb9961e..2912d8a 100644
--- a/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java
+++ b/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java
@@ -214,6 +214,9 @@ public class TypeInfoUtils {
if (reloc.getSymbolName().startsWith(VtableModel.MANGLED_PREFIX)) {
return reloc.getSymbolName().substring(VtableModel.MANGLED_PREFIX.length());
}
+ if (reloc.getSymbolName().startsWith("_" + VtableModel.MANGLED_PREFIX)) {
+ return reloc.getSymbolName().substring(("_" + VtableModel.MANGLED_PREFIX).length());
+ }
Address relocationAddress = getAbsoluteAddress(program, address);
if (relocationAddress == null || relocationAddress.getOffset() == 0) {
return "";
from ghidra-cpp-class-analyzer.
Hey, I recently ran into a similar issue and just stepped through the extension through a debugger. I found that
getTypeInfo
was returningnull
and ended up making a quick hacky change that seemed to help run the analyzer on a mac-gcc binary. Sadly this is just a binary I have so I can't make a small reproducible example right now.The code change for reference if this helps you get a clue as to what might be happening or helps someone else on mac.
diff --git a/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java b/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java index bb9961e..2912d8a 100644 --- a/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java +++ b/src/main/java/ghidra/app/cmd/data/rtti/gcc/TypeInfoUtils.java @@ -214,6 +214,9 @@ public class TypeInfoUtils { if (reloc.getSymbolName().startsWith(VtableModel.MANGLED_PREFIX)) { return reloc.getSymbolName().substring(VtableModel.MANGLED_PREFIX.length()); } + if (reloc.getSymbolName().startsWith("_" + VtableModel.MANGLED_PREFIX)) { + return reloc.getSymbolName().substring(("_" + VtableModel.MANGLED_PREFIX).length()); + } Address relocationAddress = getAbsoluteAddress(program, address); if (relocationAddress == null || relocationAddress.getOffset() == 0) { return "";
That's odd that there are two underscores. I see no problem with this hack fix from a quick glance.
from ghidra-cpp-class-analyzer.
from ghidra-cpp-class-analyzer.
Related Issues (20)
- Binary 10.1.2 release HOT 1
- Resource Leak
- Extension won't install for Ghidra version 10.1.3 HOT 2
- Extension doesn't appear in the Experimental Plugin List HOT 12
- When process comes to cppclassanalyzer.plugin.ClassTypeInfoManagerPlugin.getExternalClassTypeInfo(ClassTypeInfoManagerPlugin.java:331), it haven't ProjectClassTypeInfoManager instancies in heap. HOT 7
- Add Drag n drop handlers
- Plugin: ClassTypeInfoManager name collision
- Duplicated data types with GNU Demangler HOT 6
- Ghidra 10.1.4: "String index out of range: 0" when trying to analyze an executable HOT 3
- `UnresolvedClassTypeInfoException`: Unable to locate archived data HOT 5
- Analysis failure, unable to copy some library ClassTypeInfo data to a project archive HOT 8
- Everything seems to be working fine, but RTTI finds no results. HOT 14
- Error using `TypeInfo *` in structs HOT 2
- Clone method implemented incorrectly for TypeInfoFactoryDataType HOT 3
- Class analyzer errors while analyzing binary HOT 6
- 10.2 Build
- Plugin Related Analysis Tools do not Appear. HOT 4
- 10.2 plugin incompatible with Ghidra 10.3 HOT 6
- getManagerNode is null in analyzer
- Fails to progress due to demangle exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghidra-cpp-class-analyzer.