New to de-compiling, want to set up Ida to give best reading experience with ELF files from android phone.
I run in following issues:
- Even though i set Edit > PlugIns > Hex-Rays Decompiler > Options > Default Radix = 10, still getting mixed HEX and decimal values for below function.
- indent after = is not there in local IDA i want to align values vertically.
Output from https://dogbolt.org/ using Hex-Rays.
__int64 __fastcall GetSensorLibraryAPIs(__int64 result, double a2)
{
*(double *)(result + 4) = a2;
*(_QWORD *)(result + 16) = CalculateExposure;
*(_QWORD *)(result + 24) = FillExposureSettings;
*(_QWORD *)(result + 32) = FillPDAFSettings;
*(_QWORD *)(result + 40) = FillAutoWhiteBalanceSettings;
*(_QWORD *)(result + 72) = StatsParse;
*(_QWORD *)(result + 80) = SetMinMaxAnalogRegisterGain;
*(_QWORD *)(result + 48) = FillToneControlSettings;
return result;
parsed with Ida on my PC
__int64 __fastcall GetSensorLibraryAPIs(__int64 inputVar, double a2)
{
*(double *)(inputVar + 4) = a2;
*(_QWORD *)(inputVar + 0x10) = CalculateExposure;
*(_QWORD *)(inputVar + 24) = FillExposureSettings;
*(_QWORD *)(inputVar + 0x20) = FillPDAFSettings;
*(_QWORD *)(inputVar + 40) = FillAutoWhiteBalanceSettings;
*(_QWORD *)(inputVar + 0x48) = StatsParse;
*(_QWORD *)(inputVar + 80) = SetMinMaxAnalogRegisterGain;
*(_QWORD *)(inputVar + 48) = FillToneControlSettings;
return inputVar;
}
Source code from similar file
VOID GetSensorLibraryAPIs(
SensorLibraryAPI* pSensorLibraryAPI)
{
pSensorLibraryAPI->majorVersion = 1;
pSensorLibraryAPI->minorVersion = 0;
pSensorLibraryAPI->pCalculateExposure = CalculateExposure;
pSensorLibraryAPI->pFillExposureSettings = FillExposureSettings;
pSensorLibraryAPI->pStatsParse = StatsParse;
pSensorLibraryAPI->pFillAutoWhiteBalanceSettings = FillAutoWhiteBalanceSettings;
pSensorLibraryAPI->pUpdateMaxAnalogGain = UpdateMaxAnalogGain;
}
is there way to set up ida to have more readable output similar to original source code?
Please suggest overall best suitable Ida settings for this file.
I upload source code and file here: https://www.upload.ee/files/16662735/ELF_and_Source_Code.zip.html