Open w1282 opened 1 year ago
I typed out this whole comment on July 19 and then...apparently just left the browser tab open without clicking 'Comment'. Oops!
So, what's happening here is that, under the hood, there are multiple different 'kinds' of tags. When you call bv.tags
, Binary Ninja is going to look up all of the data tags and return those to you. But, what you're looking for is a function tag, which belongs to a Function
and not a BinaryView
. This is why current_function.tags
works as expected.
Although this is basically "working as intended", I'm still going to leave this issue open for the time being. I think this is surprising to a user, and we should fix this by either:
bv.tags
to return all tags (more difficult to do, possible performance issues depending on implementation).Changing the behavior of bv.tags to return all tags (more difficult to do, possible performance issues depending on implementation).
We have a BNGetAllTagReferences
API that hasn't been implemented in Python. It should be pretty easy to solve it in this way, we just need to add a function and let bv.tags
return the results from BNGetAllTagReferences
.
Version and Platform (required):
Bug Description: Access to
tags
via theBinaryView
is no longer functioning as expected.bv.tags
,bv.get_tags()
, andbv.get_tags_at(addr)
and the other related methods consistently return[]
even when tags exist.I have confirmed that the
bv
is not some spuriousbv
to which tags have not been applied.Function.tags
and otherFunction
methods still recover tags as expected.Steps To Reproduce: Please provide all steps required to reproduce the behavior:
bv.tags
and observe no tag data is returnedcurrent_function.tags
and observe tag data is returned as expectedExpected Behavior: All existing tags will be returned via
bv.tags