diff options
Diffstat (limited to 'src/emu/debug/debugcpu.c')
-rw-r--r-- | src/emu/debug/debugcpu.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 81380a7e5fb..29a4d759552 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -1979,7 +1979,7 @@ void device_debug::memory_read_hook(address_space &space, offs_t address, UINT64 watchpoint_check(space, WATCHPOINT_READ, address, 0, mem_mask); // check hotspots - if (m_hotspots.count() > 0) + if (!m_hotspots.empty()) hotspot_check(space, address); } @@ -2542,13 +2542,14 @@ void device_debug::registerpoint_enable_all(bool enable) void device_debug::hotspot_track(int numspots, int threshhold) { // if we already have tracking enabled, kill it - m_hotspots.reset(); + m_hotspots.clear(); // only start tracking if we have a non-zero count if (numspots > 0) { // allocate memory for hotspots - m_hotspots.resize_and_clear(numspots, 0xff); + m_hotspots.resize(numspots); + memset(&m_hotspots[0], 0xff, numspots*sizeof(m_hotspots[0])); // fill in the info m_hotspot_threshhold = threshhold; @@ -2951,7 +2952,7 @@ void device_debug::watchpoint_update_flags(address_space &space) { // if hotspots are enabled, turn on all reads bool enableread = false; - if (m_hotspots.count() > 0) + if (!m_hotspots.empty()) enableread = true; // see if there are any enabled breakpoints @@ -3079,21 +3080,21 @@ void device_debug::hotspot_check(address_space &space, offs_t address) offs_t curpc = pc(); // see if we have a match in our list - int hotindex; - for (hotindex = 0; hotindex < m_hotspots.count(); hotindex++) + unsigned int hotindex; + for (hotindex = 0; hotindex < m_hotspots.size(); hotindex++) if (m_hotspots[hotindex].m_access == address && m_hotspots[hotindex].m_pc == curpc && m_hotspots[hotindex].m_space == &space) break; // if we didn't find any, make a new entry - if (hotindex == m_hotspots.count()) + if (hotindex == m_hotspots.size()) { // if the bottom of the list is over the threshhold, print it - hotspot_entry &spot = m_hotspots[m_hotspots.count() - 1]; + hotspot_entry &spot = m_hotspots[m_hotspots.size() - 1]; if (spot.m_count > m_hotspot_threshhold) debug_console_printf(space.machine(), "Hotspot @ %s %08X (PC=%08X) hit %d times (fell off bottom)\n", space.name(), spot.m_access, spot.m_pc, spot.m_count); // move everything else down and insert this one at the top - memmove(&m_hotspots[1], &m_hotspots[0], sizeof(m_hotspots[0]) * (m_hotspots.count() - 1)); + memmove(&m_hotspots[1], &m_hotspots[0], sizeof(m_hotspots[0]) * (m_hotspots.size() - 1)); m_hotspots[0].m_access = address; m_hotspots[0].m_pc = curpc; m_hotspots[0].m_space = &space; |