Skip to content

Function.has_user_annotations not saved in the bndb #4497

@plafosse

Description

@plafosse

Discussed in #4447

Originally posted by genonullfree June 28, 2023
I was writing a python script that iterates over all the functions of a binary and looked for the flag function.has_user_annotations (https://api.binary.ninja/binaryninja.function-module.html#binaryninja.function.Function.has_user_annotations) to do some pretty prints and things. When the file is loaded in BN and modified, this property works as expected. However when I make changes, save the bndb, exit, and then reopen the bndb, this property is always set to false.

Is this property not saved in the bndb?

If it is not, what other properties are only available in the current session that don't get saved to the bndb? The API documentation does not seem to make any distinction about a currently opened and modified database vs a saved and loaded database, unless I missed it somewhere.

Is this a bug or is this intended behavior? I believe this should be a bug but I'm new to BN scripting. I'm on v3.4.4271, build b7fd028d.

Thank you for your time!

Metadata

Metadata

Assignees

Labels

Component: CoreIssue needs changes to the coreComponent: DatabaseIssue needs changes to BNDBsEffort: TrivialIssues require < 1 day of workImpact: MediumIssue is impactful with a bad, or no, workaround

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions