English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 16 December 2015, 21:55   #1
Dr. MefistO
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:
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 25, PC=00F86462
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 27, PC=00FE4F50
Exception 26, PC=00FE4F50
Exception 27, PC=00FE4F50
Exception 26, PC=00FE4F50
Exception 27, PC=00FE4F50
Exception 27, PC=00FE4F50
Exception 27, PC=00FE4F50
Exception 27, PC=00FE4F50
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 26, PC=00E2235E
Exception 8, PC=00F86BB4
Exception 25, PC=00F86462
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 8, PC=00F86BB4
Exception 27, PC=00FE4F50
Exception 26, PC=00FE4F50
Exception 27, PC=00FE4F50
Exception 27, PC=00FE4F50
After some investigation:
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; }
After execution breakpoints, regs.s equals to zero here. And because exception_debugging variable is set to 1 after breakpoint, it shows these exceptions.

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.
Dr. MefistO is offline  
Old 17 December 2015, 08:17   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
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)
Toni Wilen is online now  
Old 17 December 2015, 08:27   #3
Dr. MefistO
Registered User
 
Join Date: Jan 2015
Location: Belarus
Posts: 44
Quote:
Originally Posted by Toni Wilen View Post
JIT enabled? It causes undefined behavior.
I'll try to switch off it and check.
Quote:
Originally Posted by Toni Wilen View Post
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)
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.
Dr. MefistO is offline  
Old 17 December 2015, 16:21   #4
Dr. MefistO
Registered User
 
Join Date: Jan 2015
Location: Belarus
Posts: 44
It doesn't work without JIT too.
Dr. MefistO is offline  
Old 17 December 2015, 16:46   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
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..
Toni Wilen is online now  
Old 17 December 2015, 17:23   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
EDIT: updating 'z' to handle exceptions have been planned but it has never been important enough feature to bother with it..
I for one would like this! It can be kinda annoying at times. If one day you don't know what to improve anymore in WinUAE you may fix this.
StingRay is offline  
Old 17 December 2015, 18:05   #7
Dr. MefistO
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.
Dr. MefistO is offline  
Old 29 December 2015, 09:33   #8
Dr. MefistO
Registered User
 
Join Date: Jan 2015
Location: Belarus
Posts: 44
How to disable these f**king exceptions or context switching?
Dr. MefistO is offline  
Old 29 December 2015, 13:48   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Quote:
Originally Posted by Dr. MefistO View Post
How to disable these f**king exceptions or context switching?
You don't, it is designed (if you can call it having any design) for tracing programs totally side-effect free (for example programs that are timing sensitive, use prefetch tricks or have encrypted copy protection code) that is impossible to trace with any normal debugger.

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?
Toni Wilen is online now  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:21.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16950 seconds with 15 queries