| 524 | |
| 525 | #if 0 |
| 526 | bool get_func(const char *mdata, const MDebug::HDRR& hdrr, const MDebug::FDR& fdr, const MDebug::PDR& pdr, const std::vector<MDebug::AUX>& all_auxs, std::span<const MDebug::SYMR> all_symrs, N64Recomp::Function& func_out) { |
| 527 | func_out = {}; |
| 528 | |
| 529 | std::pair<uint32_t, uint32_t> sym_bounds = pdr.sym_bounds(all_symrs, all_auxs); |
| 530 | std::span<const MDebug::SYMR> fdr_symrs = fdr.get_symrs(all_symrs); |
| 531 | |
| 532 | for (uint32_t i = sym_bounds.first; i < sym_bounds.second; i++) { |
| 533 | const MDebug::SYMR& symr = fdr_symrs[i]; |
| 534 | MDebug::ST type = symr.get_st(); |
| 535 | |
| 536 | if (type == MDebug::ST_PROC || type == MDebug::ST_STATICPROC) { |
| 537 | const char* name = fdr.get_string(mdata + hdrr.cbSsOffset, symr.iss); |
| 538 | printf(" %s\n", name); |
| 539 | } |
| 540 | else if (type == MDebug::ST_END) { |
| 541 | printf(" %08lX\n", symr.value); |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | fflush(stdout); |
| 546 | return true; |
| 547 | } |
| 548 | void read_mdebug(N64Recomp::Context& context, ELFIO::section* mdebug_section, std::unordered_map<uint16_t, std::vector<N64Recomp::DataSymbol>>& data_syms) { |
| 549 | if (mdebug_section == nullptr) { |
| 550 | return; |
nothing calls this directly
no test coverage detected