mirror of
https://github.com/open-goal/jak-project
synced 2026-07-10 23:22:17 -04:00
improve debugger disasm, :sym-name and fix Windows builds (#959)
* improve debugger disasm, `:sym-name` and fix Windows builds * >:( * use this inline constexpr thing?? * fine use strings then * please.... please work... * fix windows debugger oopsie * display rip as goal addr as well * [debugger] attempt to backtrace even if landed on some garbage memory * Update CMakePresets.json
This commit is contained in:
@@ -92,6 +92,7 @@ void write_binary_file(const std::string& name, const void* data, size_t size) {
|
||||
}
|
||||
|
||||
if (fwrite(data, size, 1, fp) != 1) {
|
||||
fclose(fp);
|
||||
throw std::runtime_error("couldn't write file " + name);
|
||||
}
|
||||
|
||||
@@ -147,6 +148,7 @@ std::vector<uint8_t> read_binary_file(const std::string& filename) {
|
||||
data.resize(len);
|
||||
|
||||
if (fread(data.data(), len, 1, fp) != 1) {
|
||||
fclose(fp);
|
||||
throw std::runtime_error("File " + filename + " cannot be read");
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
Reference in New Issue
Block a user