Repository URL to install this package:
Version:
9.1~250226-1.fc43 ▾
|
// Command-line style options passed to libclang upon invocation of the parser.
//
// This can include any option that you would typically pass to the clang compiler when invoking it from the command line.
//
// For example:
//
// CLANG_ARGV = "-target x86_64-apple-darwin-macho -isysroot /path/to/MacOSX.sdk -I/example/include/path -DEXAMPLE_MACRO";
CLANG_ARGV = "";
// If this option is set to YES, idaclang will look for mangled names in the database
// as types are being parsed, and automatically apply the type info to the address where
// the name was found.
//
// For example, if this type is parsed by idaclang:
//
// class MyService : public IOService
// {
// public:
// virtual IOService *probe(IOService *provider, SInt32 *score) APPLE_KEXT_OVERRIDE;
// };
//
// And the function MyService::probe() is present in the database, a more precise prototype
// will automatically be applied to the function:
//
// ; =============== S U B R O U T I N E =======================================
//
// ; IOService *__cdecl MyService::probe(MyService *__hidden this, IOService *provider, SInt32 *score)
// public __ZN7MyClass5probeEP9IOServicePi
// __ZN7MyClass5probeEP9IOServicePi proc near
//
CLANG_APPLY_TINFO = NO
// A semicolon-separated list of smart pointer template names.
//
// idaclang will simplify instances of such templates to simple pointers when they are encountered in the input source.
//
// For example, consider the "OSSharedPtr" template class from the XNU kernel source code:
//
// template <typename T>
// class __attribute__((trivial_abi)) OSSharedPtr: public libkern::intrusive_shared_ptr<T, intrusive_osobject_retainer> {
// using libkern::intrusive_shared_ptr<T, intrusive_osobject_retainer>::intrusive_shared_ptr;
// };
//
// Now let's say idaclang finds an instance of this template class in the input source:
//
// typedef OSSharedPtr<OSString> OSStringPtr;
//
// In order to properly describe this type, 4 different types must be created:
//
// 1. typedef OSSharedPtr<OSString> OSStringPtr;
// 2. struct __cppobj OSSharedPtr<OSString> : libkern::intrusive_shared_ptr<OSString, intrusive_osobject_retainer> {};
// 3. struct __cppobj libkern::intrusive_shared_ptr<OSString, intrusive_osobject_retainer>
// {
// libkern::intrusive_shared_ptr<OSString, intrusive_osobject_retainer>::pointer ptr_;
// };
// 4. typedef OSString *libkern::intrusive_shared_ptr<OSString, intrusive_osobject_retainer>::pointer;
//
// To avoid all this noise, you can add "OSSharedPtr" to the CLANG_SMART_POINTERS list, which will instruct idaclang
// to reduce the template instances to simple pointers:
//
// typedef OSString *OSStringPtr;
//
// Often times this can simplify the analysis, since all the C++ syntactic sugar is not meaningful from an RE standpoint.
//
// For example this is the configuration we use when generating the type libraries for xnu-7195:
//
// CLANG_SMART_POINTERS = "OSPtr;OSSharedPtr;OSTaggedPtr;OSTaggedSharedPtr";
CLANG_SMART_POINTERS = "";
// If this option is set to YES, idaclang will parse all declarations with internal linkage.
//
// By default idaclang will ignore static function/variable declarations, because they tend to pollute the type info
// with a lot of useless junk. Use this option if that is not the case.
CLANG_PARSE_STATIC_DECLS = NO
// Logging options.
//
// The following options enable more verbose logging during parser invocations. They offer some insight into the parser internals
// which can help when troubleshooting.
// Print compiler warnings reported by clang
CLANG_LOG_WARNINGS = NO
// Print the elements in clang's abstract syntax tree
CLANG_LOG_AST = NO
// Print all macro definitions found in the input source
CLANG_LOG_MACROS = NO
// Print all macros defined internally by clang
CLANG_LOG_PREDEFINED = NO
// Print a warning if a UDT type created by IDA does not match the type in clang's AST
CLANG_LOG_UDTS = NO
// Print the path to every file that was included the translation unit
CLANG_LOG_FILES = NO
// Print the fully resolved command line that will be passed to libclang
CLANG_LOG_ARGV = NO
// Print information about the target platform
CLANG_LOG_TARGET_INFO = NO