summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-10-04 13:29:25 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-10-04 13:31:31 -0400
commit30d6d250531e14ce947c6911cb01606703c0783d (patch)
tree8deca2f8860fb1ac7a8f545d342611b2c9c797a3 /src/osd
parentaeb9eae87469e67bc6a91caf3840c34c11d959fc (diff)
Fix multiple issues with debug memory tracking
- Track write accesses rather than read accesses - Actually install the taps when the trackmem command is executed - Correct cell addresses for address-shifted spaces in Qt and Windows memory viewers
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/debugger/qt/memorywindow.cpp7
-rw-r--r--src/osd/modules/debugger/win/memoryviewinfo.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp
index c4b4ce9a429..c2ed7dc404e 100644
--- a/src/osd/modules/debugger/qt/memorywindow.cpp
+++ b/src/osd/modules/debugger/qt/memorywindow.cpp
@@ -330,7 +330,7 @@ void DebuggerMemView::addItemsToContextMenu(QMenu *menu)
{
// get the last known PC to write to this memory location
debug_view_xy const pos = memView.cursor_position();
- offs_t const address = memView.addressAtCursorPosition(pos);
+ offs_t const address = addressSpace->byte_to_address(memView.addressAtCursorPosition(pos));
offs_t a = address & addressSpace->logaddrmask();
bool good = false;
if (!addressSpace->device().memory().translate(addressSpace->spacenum(), TRANSLATE_READ_DEBUG, a))
@@ -355,7 +355,10 @@ void DebuggerMemView::addItemsToContextMenu(QMenu *menu)
memValue);
if (pc != offs_t(-1))
{
- m_lastPc = QString("Address %1 written at PC=%2").arg(address, 2, 16).arg(pc, 2, 16);
+ if (addressSpace->is_octal())
+ m_lastPc = QString("Address %1 written at PC=%2").arg(address, 2, 8).arg(pc, 2, 8);
+ else
+ m_lastPc = QString("Address %1 written at PC=%2").arg(address, 2, 16).arg(pc, 2, 16);
good = true;
}
else
diff --git a/src/osd/modules/debugger/win/memoryviewinfo.cpp b/src/osd/modules/debugger/win/memoryviewinfo.cpp
index 15dc46ebb98..4b6f33bcd85 100644
--- a/src/osd/modules/debugger/win/memoryviewinfo.cpp
+++ b/src/osd/modules/debugger/win/memoryviewinfo.cpp
@@ -95,7 +95,7 @@ void memoryview_info::update_context_menu(HMENU menu)
{
// get the last known PC to write to this memory location
debug_view_xy const pos = memview.cursor_position();
- offs_t const address = memview.addressAtCursorPosition(pos);
+ offs_t const address = space->byte_to_address(memview.addressAtCursorPosition(pos));
offs_t a = address & space->logaddrmask();
if (!space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, a))
{
@@ -119,7 +119,10 @@ void memoryview_info::update_context_menu(HMENU menu)
memval);
if (pc != offs_t(-1))
{
- m_lastpc = util::string_format("Address %x written at PC=%x", address, pc);
+ if (space->is_octal())
+ m_lastpc = util::string_format("Address %o written at PC=%o", address, pc);
+ else
+ m_lastpc = util::string_format("Address %x written at PC=%x", address, pc);
enable = true;
}
else