avast / avast/retdec

Additional HLL Emission Options

Open
#539 1 comment 0 reactions 0 assignees View on GitHub
C-llvmir2hll new-feature P-output
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

There are two suggestions I would like to introduce.

Header Output
-----------------

* An option to specify the emission of a header file upon completion. This would include all the global variables and forward declarations instead of having a massive list of declarations at the beginning of the hll output file.

Split by Class/Namespace
----------------------------

* An option to specify the emission of all detected class elements into a file of that name.
* Any function or class that is detected to be within a namespace would be emitted into an output file within a folder with said namespace's name.
* Each output file would additionally be output in a folder with the specified output name or the input filename by default.

These two options could greatly reduce the size and clutter of the emitted hll code. Retdec does a superb job of detecting classes from available rtti. Retdec is able to detect 444 classes from the game I am working with to learn from. Splitting the hll output by class would make it much easier to rebuild these classes and to keep track of what has been done.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating the HLL emission entry point and existing output-option handling, then determine how header generation and class/namespace-based file splitting fit the current design; done means both options produce the requested organized output without breaking existing emission.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.