question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help with RTTI problem

See original GitHub issue

Hi,

I don’t think this is a bug in Ghidra but I must be making a mistake somewhere. I have a lot of strings like 11NisePVectorIN6ns_lib11NormalLayerEE, 12BattleVersus and N6ns_lib12SmartPointerI16CellAnimLiveDataEE in my program. This is a decompiled Nintendo DS ROM. These strings lead me to believe that there’s Runtime Type Information in my binary. I’m almost convinced it was compiled with GCC, since they’re RTTI strings are similar.

The problem is that none of the scripts that are in Ghidra will help me reconstruct these strings into types and it seems I have to do it all by hand. When I run a script like GccRttiAnalysisScript, it tells me it doesn’t think it’s a GCC binary. I also tried the Ghidra C++ Class and Run Time Type Information Analyzer plugin, which also does not run.

Is there any way to reconstruct this, without doing it by hand? I’m sure I’m making a mistake in my understanding of all this, can you point it out to me? Why does it not recognize it as GCC RTTI?

I was thinking I had to write my own script for this, but before I have to dive into the Ghidra Script API, I want to make sure I’m not making a simple mistake.

Some program info:

Language ID:	ARM:LE:32:v5t (1.103)
Compiler ID:	default
Processor:	ARM
Endian:	Little
Address Size:	32
Analyzed:	true
Created With Ghidra Version:	10.1.4
Executable Format:	Raw Binary
Executable Location:	unknown

Thank you for your input.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ghidra007commented, Oct 12, 2022

Thanks! I was also able to generate one and also noticed calls to null which I had never seen before. Will try to get someone to look into that.

0reactions
ghidra007commented, Oct 12, 2022

Hi @ghidra007, I’m extremely sorry as I want to provide more information but I have no clue which compiler was used. I do know that in my specific case, the Nintendo DS has a devkit which provides the compiler so I think it would be easy to find out. I’m looking into it as we speak, to try to provide information about which compiler was used. (I imagine the chance of the compiler being GCC very high, as it’s not likely they created their own compiler)

EDIT: It’s very likely that GCC was used to compile, but I’m not able to find an exact or even close version…

Thanks! No worries.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoiding RTTI, and support for -fno-rtti in Arm Compiler 6
Avoiding RTTI without the -fno-rtti command-line option. If your project does not use the -fno-rtti option, then RTTI will be present in the...
Read more >
Solved: RTTI Error - Inventor Community - Autodesk Forums
I have talk to the operators of the three computers and they don't know what could be triggering it. They say it's random....
Read more >
Qt RTTI trouble - c++ - Stack Overflow
While doing so, I've encountered a problem with RTTI support, meaning that typeid().name() gives QObject * all the time, no matter on which ......
Read more >
Build LLVM with RTTI enabled · Issue #114 - GitHub
It seems that by default LLVM is build with -fno-rtti . This means when building code that links to the LLVM libs no...
Read more >
RTTI (Run-Time Type Information) in C++ - GeeksforGeeks
In C++, RTTI (Run-time type information) is a mechanism that exposes information about an object's data type at runtime and is available ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found