Merge pull request #2125 from npwoods/new_addrmap_validation

Adds a new addrmap.cpp validation intended to catch AM_REGION declarations not tied to anything meaningful
This commit is contained in:
R. Belmont 2017-03-10 11:46:03 -05:00 committed by GitHub
commit cfda3b1ffd

View File

@ -665,6 +665,10 @@ void address_map::map_validity_check(validity_checker &valid, address_spacenum s
// if this entry references a memory region, validate it // if this entry references a memory region, validate it
if (entry.m_region != nullptr && entry.m_share == nullptr) if (entry.m_region != nullptr && entry.m_share == nullptr)
{ {
// address map entries that reference regions but are NOPs are pointless
if (entry.m_read.m_type == AMH_NONE && entry.m_write.m_type == AMH_NONE)
osd_printf_error("%s space references memory region %s, but is AM_NOP\n", spaceconfig.m_name, entry.m_region);
// make sure we can resolve the full path to the region // make sure we can resolve the full path to the region
bool found = false; bool found = false;
std::string entry_region = entry.m_devbase.subtag(entry.m_region); std::string entry_region = entry.m_devbase.subtag(entry.m_region);