Skip to content

Conversation

@holub
Copy link
Contributor

@holub holub commented Oct 27, 2025

This allows to share more internal states with debugger.
image
... and makes possible do something like: bp c000, mmu6==2a

Brought by taylorza

@ajrhacker
Copy link
Contributor

ajrhacker commented Oct 27, 2025

I don't really like this approach of creating a brand new structure for devices to infiltrate the global symbol table with. I'd rather have the CPU (which, after all, is rather customized here) allow non-owned variables to be inserted into its state interface by calling back to the driver during its own device_start(), somewhat like I did with some of the Kawasaki KC80-based cores.

@holub
Copy link
Contributor Author

holub commented Oct 27, 2025

I did this through the cpu in the past. @cuavas doesn't like that either :(

@holub
Copy link
Contributor Author

holub commented Oct 27, 2025

It would be nice if we agree on cpu injection - I can rewrite this way.

Alternatively I can give a try and rewrite this without device modification. In case symbols lifecycle accepts this in driver's device_start.

CPU's way would be more useful as has the way to format the values out of the box. It's definitely doesn't work nicely for multicpu drivers.
In the long term ideally we need to expose the entire save state to debugger symbols automatically.

@galibert
Copy link
Member

Hmm, what happens if you use device_state_interface on a non-cpu?

@holub
Copy link
Contributor Author

holub commented Oct 27, 2025

State is exposed to active cpu? I'll give a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants