Comments (6)
Unfortunately this is a Ghidra problem. I'm actually logging every single time Ghidra returns the wrong class from the method it uses to get the type for a thiscall function. You can open an issue in the Ghidra repo and hope they finally do something about it.
I recommend leaving the demangler analyzer on. I'll see if I can hack up a script to help deal with this but it will end up being very slow because of how the datatype manager handles type replacement.
from ghidra-cpp-class-analyzer.
Thanks! A script would be helpful.
I'm happy to file a bug on Ghidra as well, but it's not clear to me what's going wrong and where. I assumed the demangler analyzer created its own types (in the
Demanagler
folder in the data type manager), and is using those with the parameters of functions that it similarly created.
Suppose you have two classes namespaceA::Object
and namespaceB::Object
. If there is no demangler folder, VariableUtilities.findOrCreateClassStruct
will return /namespaceA/Object
for both of them in their __thiscall
functions because that is the first Object
it will find.
from ghidra-cpp-class-analyzer.
Hmm. Would
DataTypeManager::replaceDataType
work properly as a means to deduplicate? Wondering if it is affected by this bug.
It would work in your case where the datatype being replaced is trash and is the empty placeholder created by the demangler. This is what I would use in a script to fix your situation. However there is currently nothing that can be done about the case with two different valid class structures.
from ghidra-cpp-class-analyzer.
Got something working (for the placeholder case). It only works if the replacement type has the same name, though this limitation is simply because it makes my workflow easier (I can use a simple dropdown when prompting for the replacement type).
Posting for others.
https://gist.github.com/kevinhartman/a4dce3beadfe08dc7fd3fca61fb40567
from ghidra-cpp-class-analyzer.
Thanks! A script would be helpful.
I'm happy to file a bug on Ghidra as well, but it's not clear to me what's going wrong and where. I assumed the demangler analyzer created its own types (in the Demanagler
folder in the data type manager), and is using those with the parameters of functions that it similarly created.
from ghidra-cpp-class-analyzer.
Hmm. Would DataTypeManager::replaceDataType
work properly as a means to deduplicate? Wondering if it is affected by this bug.
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
- 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.