def __init__(self): super().__init__( "similar_symbols", DisplayInfo(), RelatedSymbols(), Value("id", Doc("The id of the symbol pair"), Type(int)), Multiple( ("old", "new"), Node( None, Value( "signature_tagged", Doc("A tagged version of the symbol signature. Taggs '%s' and '%s' must be replaced accordingly, e.g. for highlighting." % ( string_diff.HIGHLIGHT_START_TAG, string_diff.HIGHLIGHT_END_TAG, )), Type(str), ), ), ), Node( "similarities", Properties(Doc("Symbol similarity ratios"), Type(float)), Value("signature", Doc("The percentage of symbol signature similarity")), Value( "instruction", Doc("The percentage of symbol instruction similarity"), ), ), ) self.connectNodes()
def __init__(self): super().__init__( "related_symbols", Properties(Doc("A relation between two symbols")), Value( "size_delta", Doc("Difference in bytes between the resource occupation of the two symbols" ), Type(int), ), Value("old", Doc("The old symbol"), Type(ValueTreeNode), AliasType(Symbol)), Value("new", Doc("The new symbol"), Type(ValueTreeNode), AliasType(Symbol)), )
def __init__(self): super().__init__( "symbol", Value("name", Doc("The symbol name (demangled if supported)"), Type(str)), Value("name_mangled", Doc("The mangled symbol name"), Type(str)), Value("is_demangled", Doc("True if the symbol name is demangled"), Type(bool)), Value( "type", Doc("Type character matching the characters used by the nm binutils tool" ), Type(str), ), Value("id", Doc("Unique symbol identifier"), Type(int)), Value("size", Doc("Number of bytes occupied by the symbol"), Type(int)), Value( "instructions", Doc("Code instructions (assembly with possibly high level language code intermixed)" ), Type(str), ), Value( "is_stored_in_program_memory", Doc("True if the symbol is stored in program memory"), Type(bool), ), Node( "source", Doc("Information about the symbols source definition"), Value("file_id", Doc("The id of the source file"), Type(int)), Value( "line", Doc("The line number in the source file where the symbol is defined" ), Type(int), ), # Value( # "column", # Doc( # "The column number in the source file where the symbol is defined" # ), # Type(int), # ), ), ) self.connectNodes()
def __init__(self): super().__init__( "source_file", Value( "path", Doc("The full path of the source file as reported by binutils/nm" ), Type(str), ), Value( "path_wo_prefix", Doc("The name of the source file with user defined prefix stripped" ), Type(str), ), Value("id", Doc("The id of the source file"), Type(int)), ) self.connectNodes()
def __init__(self, symbol_class: str): self._symbol_class = symbol_class super().__init__( f"{symbol_class}_symbol", DisplayInfo(), Value( "actual", Doc("The actual symbol"), Type(ValueTreeNode), AliasType(Symbol), # , DynamicValue(lambda value: value.id)) ), ) self.connectNodes()
def __init__(self): super().__init__( "display_info", Properties( Doc("Information that configures how things are displayed")), Value( "symbol_class", Doc("The class of symbol old/new/appeared/disappeared/persisting/similar" ), Type(str), ), Value( "anchor_id", Doc("Unique string identifier token that can be used to generate a HTML anchor for cross references" ), Type(str), ), Value( "display_symbol_details", Doc("True if symbol details are supposed to be displayed"), Type(bool), ), )
def __init__(self): super().__init__( "document", Properties(Doc(None)), Node( "general", Properties(Doc("General information about the document")), Value( "document_version", Doc("The document version of this document"), Type(int), ), Value("page_title", Doc("The title of the document page"), Type(str)), Value("doc_title", Doc("Document title"), Type(str)), Value( "elf_diff_repo_root", Doc("Path to the root of the elf_diff git repo"), Type(str), ), Value("generation_date", Doc("The document generation date"), Type(str)), Value( "elf_diff_version", Doc("The elf_diff version that generated the page"), Type(str), ), ), Node( "configuration", Properties( Doc("Boolean flags that configure what is supposed to be displayed and how" ), Type(bool), ), Value( "instructions_available", Doc("True if instructions could be read from both binary files" ), ), Value( "display_old_binary_info", Doc("True if old binary info is supposed to be displayed"), ), Value( "display_new_binary_info", Doc("True if new binary info is supposed to be displayed"), ), Value( "display_details", Doc("True if symbol detail information is supposed to be displayed" ), ), Value( "display_binary_details", Doc("True if details about binaries are supposed to be displayed" ), ), Value( "display_build_info", Doc("True if build information is supposed to be displayed" ), ), Value( "display_persisting_symbols_overview", Doc("True if an overview about persisting symbols is supposed to be displayed" ), ), Value( "display_disappeared_symbols_overview", Doc("True if an overview about disappeared symbols is supposed to be displayed" ), ), Value( "display_appeared_symbols_overview", Doc("True if an overview about appeared symbols is supposed to be displayed" ), ), Value( "display_similar_symbols_overview", Doc("True if an overview about similar symbols is supposed to be displayed" ), ), Value( "display_similar_symbols", Doc("True if similar symbols are supposed to be displayed" ), ), Value( "display_migrated_symbols_overview", Doc("True if an overview about migrated symbols is supposed to be displayed" ), ), Value( "display_migrated_symbols", Doc("True if migrated symbols are supposed to be displayed" ), ), Value( "debug_info_available", Doc("True if Dwarf debugging information was found in both binaries" ), ), ), Value("old_binary_info", Doc("Info about the old binary"), Type(str)), Value("new_binary_info", Doc("Info about the new binary"), Type(str)), Value("build_info", Doc("Information about the build"), Type(str)), Node( "files", Properties(Doc("Information about relevant files")), Node( "input", Properties(Doc("Information about relevant input files")), Multiple( ("old", "new"), Node( None, Value( "binary_path", Doc("The path to the binary file"), Type(str), ), Value( "debug_info_available", Doc("True if Dwarf debug info avaiable in the elf binary" ), Type(bool), ), Value( "source_files", Doc("Source file by file id (dict values of type SourceFile)" ), ), ), ), ), ), Node( "statistics", Node( "overall", Properties(Doc("Overall statistics")), Multiple( ("old", "new", "delta"), Node( None, Properties(Doc(None)), Node( "resource_consumption", Properties( Doc("Information about resource consumption" ), Type(int), ), Value("code", Doc("Memory required to store code")), Value("static_ram", Doc("Static RAM consumption")), Value("text", Doc("text section memory consumption")), Value("data", Doc("data section memory consumption")), Value("bss", Doc("bss section memory consumption")), ), ), ), ), Node( "symbols", Properties(Doc("Statistics of symbols")), Multiple( ("old", "new"), Node( None, Properties( Doc("Overall statistics about symbols considered" )), Node( "count", Properties(Doc("Number of symbols"), Type(int)), Value("selected", Doc("Number of symbols selected")), Value("dropped", Doc("Number of symbols dropped")), Value( "total", Doc("Number of total symbols in binary")), ), Node( "regex", Properties(Type(str)), Value( "selection", Doc("Regular expression used to select symbols found in binary" ), ), Value( "exclusion", Doc("Regular expression used to exclude symbols found in binary" ), ), ), ), ), Multiple( ("appeared", "disappeared"), Node( None, Properties(Type(int), Doc(None)), Value("count", Doc("Number of symbols")), ), ), Node( "persisting", Properties(Doc(None)), Value("count", Doc("Number of symbols"), Type(int)), Node( "resource_consumption", Properties( Doc("Total resource consumption of considered symbols of given class" ), Type(int), ), Value( "old", Doc("Overall number of bytes consumed in the old version" ), ), Value( "new", Doc("Overall number of bytes consumed in the old version" ), ), Value( "delta", Doc("Change to number of bytes consumed (only for persisting and similar)" ), ), ), ), Node( "similar", Properties(Doc(None)), Value("count", Doc("Number of symbols"), Type(int)), ), ), ), Node( "symbols", Properties(Doc("Symbols by id/table id ")), Type(dict), Value( "old", Doc("Dict of selected symbols of the old binary by symbol id (dict values of type Symbol)" ), ), Value( "new", Doc("Dict of selected symbols of the new binary by symbol id (dict values of type Symbol)" ), ), Value( "appeared", Doc("Dict of appeared symbols by symbol id (dict values of type AppearedSymbol)" ), ), Value( "disappeared", Doc("Disappeared symbols by symbol id (dict values of type DisappearedSymbol)" ), ), Value( "persisting", Doc("Persisting symbols by symbol id (dict values of type PersistingSymbol)" ), ), Value( "similar", Doc("Similar symbols by symbol id (dict values of type SimilarSymbols)" ), ), Value( "migrated", Doc("Migrated symbols by symbol id (dict values of type MigratedSymbol)" ), ), ), ) self.connectNodes()