emu/debug: Allowed device_state_interface to participate in global symtable state#14898
emu/debug: Allowed device_state_interface to participate in global symtable state#14898galibert merged 1 commit intomamedev:masterfrom
Conversation
6536d76 to
d0737ff
Compare
|
I don't have a problem with renaming state() to cpu(), but I do have a problem with not renaming debugger_cpu to debugger_state then. And the filename too. |
|
Yeah, I was waiting for feedback on this change. |
|
I made an executive decision and only kept functional changes in this PR. |
|
For other things I want to do I'm going to end up massively reorganizing that crap, so tabling the rename is a good thing |
|
So what happens when two devices in a system have a state item with the same name? |
|
This is unpleasant situation where last registered win. But we are far away from this situation as the device needs to be "state" and not be executable. I believe now number of devices which match this condition are close to 0. |
An option to minimize conflicts if you will: #14950 |
After this, for device which implements device_state_interface we can access state from global symtable.
CPU (exec) devices continue to publish their state to separate CPU symtables (child of GLOBAL).
Also suggesting to rename<<< will do separately, if requestedmachine().debugger().cpu()tomachine().debugger().state()as "cpu" confusing term in this context as far as we can have multiple cpu.