
Conditions: the list of preprocessor conditions for a given item.Storage type: the exact storage type in the database.Char type: the character encoding (narrow, wide, etc.).Guid formats: a utility columns that proposes all possible guid formats.There are also directory and filename fields.įilename is useful to query for values in a given file. File path: the file path from which the item was extracted, terminated by the line index.Ĭorresponding database field: filepath.Comments and characters such as TAB, CR are preserved. Source lines(s): the source lines from which the item was extracted.Useful when you found a unsigned number and want to get the corresponding signed value (uint -> int for example). Signed Value: the item's signed value, only valid for integer and double types.There is no corresponding database field. Hex Value: the item's hexadecimal value, only valid for integer types.There is also a typedvalue field that can contain database's Int32, Int64, Float, Double or String typed values. For string values, it's displayed as is w/o quotes nor escaping.Ĭorresponding database field: value. Type: the item's type, expressed in a specific, universal system.Ĭorresponding database's field: valuetype, but use the value of the Storage type column for queries on items type.For enum values, it's prefixed with the enum's name. You can use Lucene's query syntax.Ĭheck out the list of columns with their corresponding database column names: property key, or PROPERTYKEY, or PKEY, a combination of a guid (fmtid) and a 32-bit integer (id).Ĭ2P5 and this MagNumDB web site are written in C# and use a Lucene database as a full-text search engine.Ĭ2P5 uses a custom ANTLR4cs C grammar for expression parsing, not for preprocessor parsing.Ī: Yes.character, in narrow, wide, or utf-8/16/32 formats.string, in narrow, wide, or utf-8/16/32 formats.globally unique identifier, or guid, uuid, CLSID, IID, etc.floating point number, single (32-bit) or double (64-bit).integer, signed or unsigned, from 8-bit to 128-bit.There may be more than one item corresponding to a given name, if there are differences in their associated conditions stack.Ĭ2P5 supports the following types of constants, regardless of the way they are defined in source files: The parser remembers dynamic preprocessor definitions ( #if, #ifdef, etc.) that are conditions for constants definitions and expression computation.Īll parsed items are saved in the database, as well as the associated conditions. Special GUID constructs like DECLSPEC_UUID, DEFINE_GUIDSTRUCT, MIDL_INTERFACE, you name it.C and C++ constants, strings and enum definitions, and some level of pointerness.#define preprocessor that define expression to compute constants.#define preprocessor that define constants.It currently supports the following preprocessor and C/C++ constructs: So, in the end, we have written a C/C++ parser named C2P5 (for C/CPP/PreProcessor/Parser), tailored specifically for computing constants.Ĭ2P5 is capable of preprocessing, parsing and partially evaluating all header files as if they were included in a one big virtual project (that of course, does not compile) on a 32G RAM machine. They don't remember the stack of #define directives that led to a definition, they only give you a final AST, not a partial one, etc. They can't handle thousands of files that don't compile together, they can't handle some specific (or just very old) Microsoft constructs or annotations, To build this database, we have tried many existing parsers, things like CLANG or other fine tools, but they just don't suit our needs. It also contains around 36,0000 undocumented guids that we found. This can explain some duplicates (because names in uuid.lib are not always exactly the same as names in. Some values have been extracted from the very special uuid.lib file that contains the value of thousands of guids and property keys, not present anywhere else in header files.
MAGIX FASTCUT ACCESS VIOLATION WINDOWS
idl, etc.) provided by standard Windows and Visual Studio SDKs and WDKs. These items are constants, names, valuesĪll extracted from more than 9,000 header files (.h. MagNumDB is a database that contains about 360,000 items.
