binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Type propagation (IDA Pro does this automatically)

Open joelreymont opened this issue 1 year ago • 0 comments

Version and Platform (required):

  • Binary Ninja Version: 4.1.5261-dev, 859dedd4
  • OS: macos
  • OS Version: 14.4
  • CPU Architecture: arm64

Internal binary major dine favor.

Note that series and mount_pos_type have default types here

00066f48  int64_t DjiCoreParamConfig_Get(int64_t* arg1)

00066f58      int32_t series
00066f58      DjiAccessAdapter_GetAircraftSeries(series: &series)
00066f78      int32_t mount_pos_type
00066f78      DjiAccessAdapter_GetMountPositionType(mount_pos_type: &mount_pos_type)
00066f94      int32_t var_4_1 = 0

even though DjiAccessAdapter_GetAircraftSeries

000cf930  int64_t DjiAccessAdapter_GetAircraftSeries(enum E_DjiAircraftSeries* series)

000cf948      *series = AIRCRAFT_SERIES
000cf954      return 0

and DjiAccessAdapter_GetMountPositionType

000cf908  int64_t DjiAccessAdapter_GetMountPositionType(enum E_DjiMountPositionType* mount_pos_type)

000cf920      *mount_pos_type = MOUNT_POS_TYPE
000cf92c      return 0

are properly typed.

IDA Pro goes ahead and does the right thing, typing series as enum E_DjiAircraftSeries.

Why doesn't BN? It seems to stumble on the types being uint32_t enums.

joelreymont avatar May 13 '24 13:05 joelreymont