TransWikia.com

How to create an uninitialized variable in Ghidra?

Reverse Engineering Asked on August 12, 2021

The code under inspection is a native Android library used in an Android application.
The decompiler is showing me a lot of lines in the style DAT_12345678 = 0x12345678 with ascending addresses.
I know that this is the initialization of an uninitialized array.

When I want to set the data type, I get the error message Address not found in program memory..

I guess I have to create a memory block first, but in the Memory Map window I do not see an option to add blocks.

How can I fix that? Thanks.

One Answer

You can add an uninitialized block of memory in the Memory Map window. Hit the little green "Add a new block to memory" button.

Add a new block button

Change the start address to an area not currently mapped, specify the length of the block you wish to allocate, and select Uninitialized.

menu

Correct answer by Shane Reilly on August 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP