chore: update docs.
This commit is contained in:
@@ -1 +1,23 @@
|
||||
# cxx-project-template
|
||||
# MakePDB
|
||||
Generates a matching PDB file from the symbol data and the original COFF file.
|
||||
|
||||
### Usage
|
||||
|
||||
> [!NOTE]
|
||||
> Please make sure that the symbol data (generated by askrva) matches the original COFF (bedrock_server.exe).
|
||||
|
||||
```
|
||||
Usage: makepdb [--help] [--version] --program VAR --symbol-data VAR --output VAR
|
||||
|
||||
Optional arguments:
|
||||
-h, --help shows help message and exits
|
||||
-v, --version prints version information and exits
|
||||
--program Path to bedrock_server.exe [required]
|
||||
--symbol-data Path to symbol data. [required]
|
||||
-o, --output Path to output PDB. [required]
|
||||
```
|
||||
|
||||
- Example:
|
||||
```
|
||||
./makepdb --program test.exe --symbol-data dump.json --output test.pdb
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ using namespace makepdb;
|
||||
|
||||
[[nodiscard]] auto load_args(int argc, char* argv[]) {
|
||||
|
||||
argparse::ArgumentParser program("MakePDB", "1.0.0");
|
||||
argparse::ArgumentParser program("makepdb", "1.0.0");
|
||||
|
||||
struct {
|
||||
std::string server_program_path;
|
||||
|
||||
23
README.md
23
README.md
@@ -22,30 +22,33 @@ This repository regenerates debug information (like PDB) from LeviLamina's publi
|
||||
> [!NOTE]
|
||||
> LiteLDev has not yet released bedrock_runtime_data/magicblob for the Linux server.
|
||||
|
||||
They are dethunk, dumpsym, askrva and *makepdb (todo)*. Each tool is in a directory with the same name as it, and also has a README to help you use it.
|
||||
They are dethunk, dumpsym, askrva and makepdb. Each tool is in a directory with the same name as it, and also has a README to help you use it.
|
||||
In short, the PDB is generated by the following steps:
|
||||
- Preprocess the header files published by LiteLDev by dethunk.
|
||||
```
|
||||
python main.py {HEADER_PROJECT_DIR}/src
|
||||
```
|
||||
- Compile the header file and load the dumpsym plugin in the compilation parameters.
|
||||
```
|
||||
xmake f -c -p windows -a x64 -m release --sdk=/opt/msvc --cxflags=-fplugin=/path/to/libdumpsym.so --toolchain=clang
|
||||
xmake f -c -p windows -a x64 -m release --sdk=/opt/msvc --cxflags="-fplugin=/path/to/libdumpsym.so -fplugin-arg-dumpsym-record-decl-name" --toolchain=clang
|
||||
xmake -v
|
||||
```
|
||||
- Find the generated symbols file
|
||||
- Find the generated symbols file.
|
||||
```
|
||||
{HEADER_PROJECT_DIR}/build/.objs/bdsheader/windows/x64/release/test/__cpp_main.cpp.cpp.symbols
|
||||
```
|
||||
- Generate symbol table using askrva
|
||||
- Generate symbol table using askrva.
|
||||
```
|
||||
./askrva __cpp_main.cpp.cpp.symbols --output succeed.json --output-failed failed.txt --output-format=fakepdb
|
||||
./askrva __cpp_main.cpp.cpp.symbols --output succeed.json --output-failed failed.txt --output-format=makepdb
|
||||
```
|
||||
- Generate PDB using makepdb.
|
||||
```
|
||||
./makepdb --program bedrock_server.exe --symbol-data succeed.json --output bedrock_server.pdb
|
||||
```
|
||||
- This will generate a Json file that can be recognized by [FakePDB](https://github.com/Redbeanw44602/FakePDB). Refer to FakePDB's README to import it to IDB.
|
||||
|
||||
|
||||
## TODOs
|
||||
- [ ] Automatically build PDB on CI.
|
||||
## TODO
|
||||
- [ ] Tap into more available symbols.
|
||||
- [ ] Fully open source HeaderGen.
|
||||
- [ ] Standalone makepdb/makedwarf, no longer requires fakepdb.
|
||||
|
||||
## Be with us
|
||||
Our vision is to build an open and inclusive Minecraft: Bedrock Edition ecosystem.
|
||||
|
||||
Reference in New Issue
Block a user