chore: update readme.
This commit is contained in:
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "dumpsym"]
|
||||
path = dumpsym
|
||||
[submodule "DumpSYM"]
|
||||
path = DumpSYM
|
||||
url = https://github.com/Redbeanw44602/dumpsym.git
|
||||
|
||||
0
askrva/.gitignore → AskRVA/.gitignore
vendored
0
askrva/.gitignore → AskRVA/.gitignore
vendored
@@ -17,6 +17,7 @@ known as magicblob), PreLoader no longer handles PDB. The source code in the cur
|
||||
- Just execute `xmake` to complete the build.
|
||||
|
||||
### Usage
|
||||
- --output-format can be `auto` / `txt` / `fakepdb`
|
||||
|
||||
```
|
||||
Usage: askrva [--help] [--version] --output VAR [--output-failed VAR] [--output-format VAR] path
|
||||
0
dethunk/.gitignore → DeThunk/.gitignore
vendored
0
dethunk/.gitignore → DeThunk/.gitignore
vendored
@@ -20,13 +20,13 @@ git checkout -b header
|
||||
```
|
||||
|
||||
### Thunks
|
||||
- `virtual function thunk` - Removed.
|
||||
- `constructor thunk` - Removed.
|
||||
- `vftables` - Removed.
|
||||
- `virtual function thunk` - *Removed.*
|
||||
- `constructor thunk` - *Removed.*
|
||||
- `vftables` - *Removed.*
|
||||
- **TODO** dumpsym is currently unable to emit a symbol of vtable pointer.
|
||||
- `destructor thunk` - Removed.
|
||||
- `destructor thunk` - *Removed.*
|
||||
- **TODO** dumpsym is currently unable to emit a symbol of destructor.
|
||||
- `static variables thunk` - Restored.
|
||||
- `static variables thunk` - *Restored.*
|
||||
- **TODO** Symbols are now generated correctly, but some symbols cannot be queried from bedrock_runtime_data.
|
||||
|
||||
### Usage
|
||||
2
MakePDB/README.md
Normal file
2
MakePDB/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# MakePDB
|
||||
WIP.
|
||||
54
README.md
54
README.md
@@ -1 +1,55 @@
|
||||
# DebugInfo
|
||||
This repository regenerates debug information (like PDB) from LeviLamina's public data.
|
||||
|
||||
## Background
|
||||
- After 1.21.3.01, Mojang removed debug information from BDS.
|
||||
- Mojang no longer provides any debugging information (both server and client) to the community.
|
||||
- Mojang has an agreement with LiteLDev to provide them with debug data.
|
||||
- LiteLDev generates header files and obfuscated symbol to RVA lookup tables from debug data and provides them to the community.
|
||||
|
||||
### Problems caused by Mojang's collaboration with LiteLDev
|
||||
- Mojang's collaboration with LiteLDev is opaque and we have no idea what they do.
|
||||
- LiteLDev has completed its monopoly, and there will no longer be a second mod loader in the community.
|
||||
- Due to the obfuscated format, the community can no longer reverse engineer BDS.
|
||||
|
||||
### Header files, obfuscation format and security
|
||||
- LeviLamina's design necessitates that they publish header files.
|
||||
- The header file contains all the declaration information so that symbols can be generated.
|
||||
- The RVA of the corresponding symbol can be extracted from the obfuscated format at runtime.
|
||||
- The obfuscated format is actually a carrier of the complete "symbol table", which used to be PDB/DWARF.
|
||||
|
||||
## Tool for restoring original DebugInfo from obfuscated format
|
||||
> [!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.
|
||||
In short, the PDB is generated by the following steps:
|
||||
- Preprocess the header files published by LiteLDev by dethunk.
|
||||
- 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 -v
|
||||
```
|
||||
- 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
|
||||
```
|
||||
./askrva __cpp_main.cpp.cpp.symbols --output succeed.json --output-failed failed.txt --output-format=fakepdb
|
||||
```
|
||||
- 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.
|
||||
- [ ] 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.
|
||||
- https://t.me/bdsplugin
|
||||
|
||||
## LICENSE
|
||||
All tools are open source under the MIT license.
|
||||
1
dumpsym
1
dumpsym
Submodule dumpsym deleted from 911158677e
Reference in New Issue
Block a user