| 1898 | } |
| 1899 | |
| 1900 | void MainWindow::equatesAddEquate(const QString &name, uint32_t address) { |
| 1901 | if (address < 0x80) { |
| 1902 | return; |
| 1903 | } |
| 1904 | if (!equatesAddEquateInternal(name, address)) { |
| 1905 | return; |
| 1906 | } |
| 1907 | uint8_t *ptr = static_cast<uint8_t *>(phys_mem_ptr(address - 4, 9)); |
| 1908 | if (ptr && ptr[4] == 0xC3 && (ptr[0] == 0xC3 || ptr[8] == 0xC3)) { // jump table? |
| 1909 | uint32_t address2 = ptr[5] | ptr[6] << 8 | ptr[7] << 16; |
| 1910 | if (phys_mem_ptr(address2, 1)) { |
| 1911 | equatesAddEquateInternal(QStringLiteral("_") + name, address2); |
| 1912 | } |
| 1913 | } |
| 1914 | } |
| 1915 | |
| 1916 | bool MainWindow::equatesAddEquateInternal(const QString &name, uint32_t address) { |
| 1917 | std::pair<map_value_t::iterator, bool> inserted = disasm.reverse.emplace(name.toUpper().toStdString(), address); |
nothing calls this directly
no test coverage detected