Re: [hatari-devel] symbols not always loaded when entering debugger ?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]




On 11/12/2017 09:24 PM, Nicolas Pomarède wrote:
Le 12/11/2017 à 19:57, Eero Tamminen a écrit :
As far as I see, they should be loaded also with exceptions,
if they get get loaded with normal debugger invocation.

Could you provide me with your test program?


Unfortunately, I fixed the 3 bombs error in the meantime ; I tried to "restore" the bug, but I made too much changes since then, so I can't provide the crashing program :(

But I think you could get the same behaviour with a compiled C code that would do a "div by 0" for example. It should crash an invoke the debugger.

The program is started in the same context in both cases, the only difference is if I go to debugger myself before the crash (symbols are loaded) or if the crash happens first (no message about loading symbol). Maybe a difference between pressing alt+gr and calling the debugger function directly from cpu emulation ?

Both go through same code, which does symbol loading.

However, WinUAE CPU didn't invoke debugger on configured exceptions
until I applied attached patch.  Could you review it?

After debugger actually gets invoked, symbols are automatically loaded too:
	hatari --trace os_base --debug-except autostart,all test.prog

If it still doesn't work for you, could you mail the output of above command?


Also, now that debugger is aware of terminal's size, could it be possible to display more than only 8 symbols at once and "--- q to exit listing, just enter to continue ---" but to display one full page each time ?

As mentioned by Otto, and documented in release-notes.txt, you need
to remove your current nDisasmLines / nMemdumpLines setting values
(which force pager to page 8 lines), or set them to negative value.

Yes, I can change nDisasmLines / nMemdumpLines, but 8 lines was a good setting for these 2 for me. Could it be possible to add a separate nSymbolLines setting ?

Symbols command uses just nMemdumpLines just.  But I can add new
config file option just for symbols listing (after finishing
something else I'm currently doing).


	- Eero
diff -r eb2f2da07e8d src/cpu/newcpu.c
--- a/src/cpu/newcpu.c	Sat Nov 11 15:42:31 2017 +0100
+++ b/src/cpu/newcpu.c	Sun Nov 12 22:42:46 2017 +0200
@@ -2911,11 +2911,6 @@
 
 static void exception_debug (int nr)
 {
-#ifdef DEBUGGER
-	if (!exception_debugging)
-		return;
-	console_out_f (_T("Exception %d, PC=%08X\n"), nr, M68K_GETPC);
-#endif
 #ifdef WINUAE_FOR_HATARI
 	if (unlikely(ExceptionDebugMask & EXCEPT_NOHANDLER) && STMemory_ReadLong(regs.vbr + 4*nr) == 0) {
         	fprintf(stderr,"Uninitialized exception handler #%i!\n", nr);
@@ -2923,6 +2918,12 @@
 	} else {
 		DebugUI_Exceptions(nr, M68K_GETPC);
 	}
+#else
+#ifdef DEBUGGER
+	if (!exception_debugging)
+		return;
+	console_out_f (_T("Exception %d, PC=%08X\n"), nr, M68K_GETPC);
+#endif
 #endif
 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/