Add SQLite-based model import/export and REVNG_NO_FETCH_DEBUG_INFO#559
Open
revng-claudietto wants to merge 4 commits intorevng:developfrom
Open
Add SQLite-based model import/export and REVNG_NO_FETCH_DEBUG_INFO#559revng-claudietto wants to merge 4 commits intorevng:developfrom
revng-claudietto wants to merge 4 commits intorevng:developfrom
Conversation
Restore the Sqlite3 C++ wrapper that was previously removed and add support for reading INTEGER columns via a new int64_t unpackRow specialization.
When the environment variable REVNG_NO_FETCH_DEBUG_INFO is set, runFetchDebugInfo returns immediately without spawning the fetch-debuginfo subprocess. This is useful for batch processing where debug info has already been fetched separately.
a095b20 to
c49faa9
Compare
8 tasks
Add a Python command that imports rev.ng YAML model files into a SQLite database. The schema stores platforms, libraries, type definitions (with their YAML bodies), symbols, and type definition dependency edges. This enables efficient querying and subsetting of type information across multiple binaries.
Add a C++ tool that exports a subset of type definitions and symbols from a SQLite database (populated by `revng model export sqlite`) back into a rev.ng model YAML file. Given a platform, library, and set of symbol names, the tool: - Fetches the library header from the database - Resolves all transitively-depended-upon type definitions via a recursive CTE query - Composes the model YAML via string concatenation - Parses it through TupleTree<model::Binary>::fromString - Verifies and serializes the result
c49faa9 to
426321f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sqlite3.hC++ wrapper (dropped in a previous refactor) and addint64_tcolumn supportREVNG_NO_FETCH_DEBUG_INFOenvironment variable to skip debug info fetching duringimport-binary, useful for batch processing where debug symbols are pre-cachedrevng model export sqlitePython command to export model YAML files into a SQLite database (types, symbols, dependencies)revng model import sqliteC++ tool to query the SQLite database and reconstruct model YAML for selected symbols with transitive type dependenciesTest plan
orc install -b revngrevng model export sqlite --helpworksrevng model import sqlite --helpworksrevng model export sqlite --db test.db --platform test model.ymlrevng model import sqlite --db test.db --platform test --library <lib> --symbol <sym>REVNG_NO_FETCH_DEBUG_INFO=1 revng analyze import-binaryskips fetching