Open WhatTheFuzz opened 2 months ago
The checkbox is automatically enabled if BN_TYPE_PARSER
appears within the first 2kb of the file, so that headers generated with Export Header File are detected. Given this, I don't think a setting is required, but the documentation needs to be updated to include this fact.
For future reference for anyone seeing this issue, BN_TYPE_PARSER
has to be defined in the exact header file that's being imported, not other header files that are imported within that file. For example, if you're importing <path/to/foo.h
, make sure to #define BN_TYPE_PARSER
in foo.h
, not bar.h
that foo.h
imports. At least, I'm fairly confident this is the case. 😃
That is correct, it only reads the file(s) specified and sets the checkbox based on their contents on disk, before any sort of parsing is run.
What is the feature you'd like to have?
Add setting to enable "Define Binary Ninja Macros" by default when selecting "Analysis > Import Header File"
Is your feature request related to a problem?
N/A
Are any alternative solutions acceptable?
Additional Information:
I keep most of my type definitions in a C library for easy source control. I make heavy use of the Binary Ninja macros which define the C type qualifiers, like
__padding
. This definition isn't found by the parser if "Define Binary Ninja Macros" isn't checked.