16 December 2015, 21:55 | #1 | |
Registered User
Join Date: Jan 2015
Location: Belarus
Posts: 44
|
Step commands in debugger are throwing exceptions in console
"z" or "t" command after landing at some breakpoint, doesn't work. It throws many exceptions in debugger console, looses current state, and program continues executes without a debugger, then finishes its execution.
Could you fix that annoying behavior? Quote:
Code:
/* ORSR.W #<data>.W */ uae_u32 REGPARAM2 CPUFUNC(op_007c_11)(uae_u32 opcode) { int count_cycles = 0; {if (!regs.s) { Exception (8); goto l_110018; } It is strange, that on the same commands, stepping doesn't execute "uae_u32 REGPARAM2 CPUFUNC(op_007c_11)(uae_u32 opcode)" function. It looks like the execution context of other threads breaks with execution context of my program. Last edited by Dr. MefistO; 16 December 2015 at 22:29. |
|
17 December 2015, 08:17 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
|
JIT enabled? It causes undefined behavior.
Debugger also does not care about contexts or threads, it is mainly designed for debugging programs (games/demos) that take over the system. (for example t will not skip interrupts) |
17 December 2015, 08:27 | #3 |
Registered User
Join Date: Jan 2015
Location: Belarus
Posts: 44
|
I'll try to switch off it and check.
So, Only steps are allowed? I have a console program, that takes over the system. But when WinUAE switches to some system task, it breaks the registers state. |
17 December 2015, 16:21 | #4 |
Registered User
Join Date: Jan 2015
Location: Belarus
Posts: 44
|
It doesn't work without JIT too.
|
17 December 2015, 16:46 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
|
It works as designed (if JIT is off), it follows CPU execution 1:1, it does not care about interrupts or task switches. For example 't' always stops after next instruction, whatever the previous one did, even if previous instruction caused an exception. ('z' is not good idea if exceptions can happen)
If you want to enter debugger and you run program you can modify, it is usually better idea to use memory watch breakpoints and do something like "clr.w $100" in your program and set memwatch to break when $100 is modified. Or use 'f <address>' break point command instead of 'z'. Or disable all interrupts EDIT: updating 'z' to handle exceptions have been planned but it has never been important enough feature to bother with it.. |
17 December 2015, 17:23 | #6 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
|
|
17 December 2015, 18:05 | #7 |
Registered User
Join Date: Jan 2015
Location: Belarus
Posts: 44
|
Just try to break somewhere, then step by "t" after that breakpoint. It throws exceptions.
P.S. Hmm... I think it works. But I can't understand how) Last edited by Dr. MefistO; 17 December 2015 at 18:48. |
29 December 2015, 09:33 | #8 |
Registered User
Join Date: Jan 2015
Location: Belarus
Posts: 44
|
How to disable these f**king exceptions or context switching?
|
29 December 2015, 13:48 | #9 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
|
Quote:
It has no helper functions for "normal" programs. Debugger keeps reporting exceptions (it is only reporting them) after any trace operation. It is normal. You still haven't explained what exactly are you trying to do. I assume you want to skip interrupts when tracing? Anything else? |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Debugger interface | Dr. MefistO | support.WinUAE | 13 | 18 May 2015 20:01 |
Using the ASM-One debugger on K3.1 | zedr | Coders. Asm / Hardware | 14 | 28 August 2014 23:01 |
which kind of person throws out a working Amiga? | Nikolaj_sofus | Amiga scene | 41 | 24 August 2014 01:08 |
Remote Debugger | phx | Coders. Asm / Hardware | 3 | 28 May 2012 12:26 |
Decent debugger? | AmigaBoy | Coders. General | 17 | 24 March 2007 15:12 |
|
|