| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
VICE debug interface
i want to add some simple mechanisms to VICE that will help with automatic regression testing (there are over 800 test programs now, running them all manually takes several hours) - this stuff might be interesting for coders writing c64 software as well, so before i start i am looking for some more ideas on what might be useful.... the whole thing would be implemented as either a cartridge or some special i/o device, so basically everything should be triggered by writing to certain registers. the minimal functionality i came up with looks like:
- exit vice with exit code (to signal the test suite success or error)
- print a string to console (with some kind of "printf" like functionality, so you can print contents of registers/memory easily)
what else may be useful? |
|
... 32 posts hidden. Click here to view all posts.... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
sometimes i really wonder if people actually read before they write an answer.... this is all stuff that has very little to do with "basically everything should be triggered by writing to certain registers". i am NOT touching the monitor or adding any related features, thats something completely different =)
(you can already trigger breakpoints depending on register values, btw) |
| |
doynax Account closed
Registered: Oct 2004 Posts: 212 |
Quoting Groepazsometimes i really wonder if people actually read before they write an answer.... this is all stuff that has very little to do with "basically everything should be triggered by writing to certain registers". Yeah, sorry about going off-topic there and drooling over unrelated debugging features.
The overlay proposal was meant as a serious suggestion for a virtual debugging cartridge though as it requires cooperation from the code being emulated. I envisage an array of virtual bank-switching register which when poked would bring in the labels/breakpoints tagged with the written value (and unload whatever overlay was there previously.) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
- passing arguments to the guest program
- an IO register which prints emulation state info to stdout/stderr upon access
- equivalent features for drive code (except argument passing) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
I approve of this discussion. :D |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:- passing arguments to the guest program
like a commandline switch that will let you pass a value, which then can be seen in some i/o register?
Quote:- an IO register which prints emulation state info to stdout/stderr upon access
ie like the output you get in the monitor when tracing code?
those should be fairly easy to do indeed :) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting Groepazlike a commandline switch that will let you pass a value, which then can be seen in some i/o register? I was thinking of passing a complete string. Writing to the register would reset the character index to 0, and reading would return the current character and increase the index. The terminating character may be a 0, and after that, the string would either wrap or return 0 until writing to the register again. To keep parsing complexity low, you could simply pass a single-character string, but the possibility for more complex parameters is there.
Quote:ie like the output you get in the monitor when tracing code? Basically yes, but maybe with more information than just raster position and CPU state. There could be a register for every chip, such as VIC, SID, CIA1, CIA2 etc., and the value written to it could be a bitfield or enum value to determine how detailed the output should be. The idea is that you could check for more than just test passed/failed from the regression test script, diffing VICE's terminal output with a reference. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:The idea is that you could check for more than just test passed/failed from the regression test script
well, thats not really useful. for most of those tests even a full register dump wouldnt help - you'll have to examine wth happened in all detail anyway. for the regression-testing alone what i listed in the first post is more than sufficient already :) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
True. But maybe it would help further debugging after a failed regression test, such that you can insert these writes at strategic points to find out where it breaks. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
for that we have breakpoints =) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Can you currently comfortably trigger host-level breakpoints from guest code, such that you can trap into a host debugger to debug VICE code by doing something in the emulated machine? |
Previous - 1 | 2 | 3 | 4 | 5 - Next |