mirror of
https://github.com/open-goal/jak-project
synced 2026-05-23 06:54:31 -04:00
LSP: initial LSP implementation for IR files to assist with decompilation (#1647)
* lsp: json-rpc example is working, a decent place to start... * lsp: vendor library * lsp: cleanup and time to get started * lsp: commit what i got so far * lsp: example `initialize` payload * lsp: switch to `stdio` * stash * modularize the lsp implementation * lsp: implement first actual LSP feature - function names in outline * lsp: produce document diagnostics * lsp: remove unused third-party lib * lsp: support hovering MIPS instructions in IR files * lsp: basic go-to all-types definition * stash * lsp: cleanup code, just need to add it to the release artifacts * fix some project configuration * fix linux build * lsp: add lsp to PR artifacts and release assets * lsp: address feedback
This commit is contained in:
@@ -693,8 +693,6 @@ void ObjectFileDB::ir2_write_results(const fs::path& output_dir,
|
||||
const std::vector<std::string>& imports,
|
||||
ObjectFileData& obj) {
|
||||
if (obj.linked_data.has_any_functions()) {
|
||||
// todo
|
||||
|
||||
auto file_text = ir2_to_file(obj, config);
|
||||
auto file_name = output_dir / (obj.to_unique_name() + "_ir2.asm");
|
||||
file_util::write_text_file(file_name, file_text);
|
||||
@@ -708,6 +706,11 @@ void ObjectFileDB::ir2_write_results(const fs::path& output_dir,
|
||||
std::string ObjectFileDB::ir2_to_file(ObjectFileData& data, const Config& config) {
|
||||
std::string result;
|
||||
|
||||
auto all_types_path = file_util::get_file_path({config.all_types_file});
|
||||
auto game_version = game_version_names[config.game_version];
|
||||
|
||||
result += fmt::format("; ALL_TYPES={}={}\n\n", game_version, all_types_path);
|
||||
|
||||
const char* segment_names[] = {"main segment", "debug segment", "top-level segment"};
|
||||
ASSERT(data.linked_data.segments <= 3);
|
||||
for (int seg = data.linked_data.segments; seg-- > 0;) {
|
||||
|
||||
Reference in New Issue
Block a user