0

I have an iOS App disassembly which has the following block:

IDA Pro snippet

There are 'greyed out' comments in the picture of great interest which we want to capture from IDAPython. Such as which selectors are used on imported Framework objects such as UIWindow, CLHeading etc. IDA python however only has calls to get Repeatable comments, regular comments and function comments. Any idea which idc/idapython function gets this 'greyed out' comments? I assume they are repeatable comments from somewhere. Thanks.

UPDATES

The grey out comments are repeatable comments so I tried following the labeled address (selRef_setLastHeading on the third line) to the repeatable comment and arrived at this line:

enter image description here

However, when I did a RptCmt(here()) at that address, I was expecting @selector(setLastHeading:) to be returned as the comment but it returned an empty string..

Community
  • 1
  • 1
gigasai
  • 564
  • 4
  • 23

2 Answers2

0

The grey comments are repeating comments from the referenced item, thus for the first grey comment on the third line, if you went to the selRef_setLastHeading_ it should have a repeating comment.

If this was in a structured data block, I'd say read the address and then use that for the comment request function (sorry no IDApython experience just IDC script). but as they are an operand of an instruction, for this type of thing I'd tend to write a script that had a switch based on the instruction so you knew how to decode the reference address.

Simeon Pilgrim
  • 22,906
  • 3
  • 32
  • 45
  • Yeah, I followed the address to the actual repeatable comment definition of `selRef_setLastHeading_` but when I execute `RptCmt(ea)` in that position, it returns an empty string although its not `none` type. Strange.. but thanks for replying – gigasai Feb 21 '13 at 03:29
0

I'm found a stupid way to get the grey comments,something likes below.

widget = ida_kernwin.open_xrefs_window(pk_ea)
title = ida_kernwin.get_widget_title(widget)
ida_kernwin.close_widget(widget,0)
print(title)
Amrf
  • 1