[hatari-devel] saving/restoring memory state from debugger

npomarede at corp.free.fr npomarede at corp.free.fr
Sat Feb 13 22:39:38 CET 2010


On Sat, 13 Feb 2010, Eero Tamminen wrote:

> Debugger uses the normal MemorySnapShot_Capture() function to do the state
> saving.  Because that doesn't return any success/fail value, debugger gives
> it an argument that makes it to print message about saving success.
>
> It does that using:
> 	Log_AlertDlg(LOG_INFO, "Memory state file saved.");
>
> With the default Hatari settings that will just print the message to
> console.  You have set an alert level which shows this also as an alert on
> screen.
>
> Instead of using ^C in debugger, you can just press Enter in Hatari window
> for the dialog to go away and Hatari to continue.
>
>
> I could:
> - Remove that flag from MemorySnapShot_Capture/Restore() calls
> - Change them to return a bool about success
> - Output a message from debugger itself based on this return value.
>
> But I wonder whether alerts should be completely disabled while one is in
> debugger.  Is there any reason why one should get an alert from debugger
> command in addition to console message (log messages can be re-directed
> to a file)?
>

You're right, a message was displayed in Hatari's window, but I didn't see 
it as my terminal was above hatari's window, and pressing ctrl+c was 
terminating hatari (pressing 'c' after in the debugger would cause hatari 
to exit).

I think it would be more consistent to not display alert messages in 
Hatari's window while we're in the debugger. In the case of saving a 
memory snapshot for example, it doesn't add any value to have a 
confirmation message in Hatari's window. A message in the console would be 
enough (I think saving/restoring snapshot is the only case so far that can 
display a confirmation box ?).

I would go for disabling alerts while in the debugger, once in console 
mode we shouldn't mix interactions between term and non term windows.

Nicolas



More information about the hatari-devel mailing list