update disasm window when break state changes#78
update disasm window when break state changes#78pvmm wants to merge 2 commits intoopenMSX:masterfrom
Conversation
|
Can you explain why this is the right fix? |
|
I just added an update to the disasm widget on the same place where all the other widgets get updated (slot, registers and main memory). The only difference is that DisasmViewer lacks an explicit refresh() function. But the description is about the desired outcome. |
That is because the debugger lacks the functionality to detect such changes. |
Yes, so, why would it help to trigger this on the 'breaked' state? It means you get a refresh if you toggle this state right? Is that good enough? |
|
We are already counting on the emulator to do most of the grunt work anyway. I can create a signal/slot structure to detect slot changes, but tell me how you would expect the debugger to detect self modifying code? |
|
@MBilderbeek: I don't claim to understand how the debugger update stuff works. But I propose to be pragmatic about this:
Then I propose we already merge the PR. And if needed we can continue to discuss about a better way to fix it. |
|
To be completely clear, the title of this PR is "update disasm window when slot changes or code is rewritten". But I think what is implemented is: "update disasm window when break state changes". Am I correct, or did I misunderstand somewhere? |
|
If I'm correct, I agree with this change, but I'd make it a bit different:
|
|
While this is a more consistent approach regarding the rest of the widgets code, I think we should loosen the coupling by using more signals/slots rather than less. So maybe the other widgets should follow suit and adopt slots too? What do you think? |
In principle, yes. But I just did an attempt (e.g. emit BreakStateChanged and let the stuff in updateData be handled by processing this signals) but I run into some inconsistencies... e.g. there is an updateData after finalizing the connection... why? Can I leave out the stuff in updateData for that case, which updates the slot, disasm and mainMemoryView? The attached patch tries to clean this up first a bit, assuming things are good enough like this.... please review and comment. After this patch is applied, adding that update of disasm when break state changes is a matter of adding one connect line. |
|
I think the function names are misleading. finalizeConnection is not called when the user disconnects, but when the debugger finishes establishing connection. So that the debugger widgets are automatically updated upon connection which makes sense. Also, there is a mess in this piece of code: if emulator is halted, |
|
Why always call updateData? breakOccured already calls updateData() as well. Here's a an updated patch with your first remark processed. Can you also help testing with this patch? |
|
OK, I made your patch work by repurposing my previous fix within your patch (and I squashed my previous commit, because it was no longer relevant). It's not extensively tested, but I think it has improved the situation of the bitmap VRAM dialog too from what I've checked. I also looked at |
|
My last commit allows BitmappedView and TileView to reload VRAM data even if connection was established after their dialogs were created. |
What exactly was not working in my patch? EDIT: ah, I did make a mistake: I removed the wrong line in the
I would like to change one thing at a time please.... I would not like to discuss other changes separately, otherwise I get completely confused mixing up all these changes.
I wonder if it is correct to NOT call Please, let's do one thing at a time. Let me know if my last patch (as attached) doesn't break anything. If it's OK, then I'll add the new |
The removed line: I changed it to: Since we want the update to occur when connection is established to a halted emulator. The rest of my commit is basically the same.
Yes, that was the problem. |
|
OK, I cleaned up my commit and pushed it. It also needed to do an initial refresh of 2 parts (slot viewer and main memory viewer). Now we have a base to continue. Please review my patch though. |
|
I wonder if this is necessary though:
EDIT: I saw that you did not commit this line. |
|
I removed that in the final patch. It was a mistake indeed.
Op di 22 feb. 2022 00:10 schreef Pedro de Medeiros ***@***.***
…:
I wonder if this is necessary:
void SlotViewer::setMemoryLayout(MemoryLayout* ml)
{
memLayout = ml;
+ update();
}
SlotViewer should be updated by refresh, like the other widgets.
—
Reply to this email directly, view it on GitHub
<#78 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAWXCS6VWE4NLCQ4274BKLU4LA6TANCNFSM5OWIIL6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This should fix issue #21. Not with a refresh button, but actually updating the disasm window after each debug step.