English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 19 December 2022, 10:18   #1
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Value of the SR register in WinUAE debugger

Is the value of the SR register in WinUAE debugger displayed somewhere?
The value of the différents bits is but the actual value of SR?
kamelito is offline  
Old 19 December 2022, 11:48   #2
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
It's not, that's one of the things I'd like to see as well. It would also be good to see the VBR (I'm talking about the UI).

EDIT: I'm a do-it-yourself guy, but winuae build env has always been a roadblock for me (gcc?)...
Is it as sinple as this (debug_win32.cpp)? There is more than enough room for 2 more lines.
Code:
	hwnd = GetDlgItem(hDbgWnd, IDC_DBG_SP_VBR);
	_stprintf(out, _T("USP: %08X"), regs.usp);
	UpdateListboxString(hwnd, 0, out, TRUE);
	_stprintf(out, _T("ISP: %08X"), regs.isp);
	UpdateListboxString(hwnd, 1, out, TRUE);
 _stprintf(out, _T("SR: %04X"), regs.sr);
 UpdateListboxString(hwnd, 2, out, TRUE);
 _stprintf(out, _T("VBR: %08X"), regs.vbr);
 UpdateListboxString(hwnd, 3, out, TRUE);

	ShowMiscCPU(GetDlgItem(hDbgWnd, IDC_DBG_MISCCPU));

Last edited by a/b; 19 December 2022 at 11:56.
a/b is offline  
Old 21 December 2022, 19:09   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Yeah, it should be included too. Done.
Toni Wilen is offline  
Old 22 December 2022, 04:52   #4
Falcon
Registered User
 
Join Date: Apr 2020
Location: Melbourne/Australia
Age: 44
Posts: 5
Quote:
Originally Posted by a/b View Post
EDIT: I'm a do-it-yourself guy, but winuae build env has always been a roadblock for me (gcc?)...
I actually managed to install Visual Studio 2022 Community Edition with all required components on Windows 10 and build WinUAE from source - ended up being a fairly painless process. I then added some code to work around a Wine keyboard handling discrepancy and even submitted a pull request for it on GitHub.

Linux Mint is my main OS, but I use Windows for gaming (performance reasons) and some testing.
Falcon is offline  
Old 08 January 2023, 08:11   #5
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Quote:
Originally Posted by Falcon View Post
... install Visual Studio 2022 Community Edition .. Windows 10
x + y = overflow :P. That thing does not work on my windoze7. Tried installing several times, straight up crashes or refuses to work. I guess being tripple muzzled and not being able to do whatever the mothership commands is a problem :P.

In any case, I see that SR is now there but it looks like it's out of sync with the individual bits. E.g. I hit shift+f12 during boot and see something like:
- SR 2000, but x = 1, nzvc = 0, or
- SR 2000, but xn = 1, zvc = 0
Then step (t) through several instructions, bits get updated but SR is still at 2000.
Then after, while in userland, shift+f12 into ROM interrupt code:
- SR 0000, but S = 1, IMASK = 3, x = 1, nzvc = 0

After some digging, my best guess is that you have to call MakeSR() to construct the correct value out of all the individual bits prior to using it as regs.sr.

Also, vbr? Somewhere, anywhere? ;p It's actually part of the dialog ID but it's not there ;p.
a/b is offline  
Old 08 January 2023, 09:51   #6
Waccoon
Registered User
 
Waccoon's Avatar
 
Join Date: May 2022
Location: Boston / USA
Age: 46
Posts: 39
I'm currently building with VS 2019 under Win7 and it works fine. However, I have to turn off address sanitation for the Test build or it blows up.

I'm not sure what's going on, but I wouldn't be surprised if VS just doesn't support the feature under Win7 and it doesn't tell you.
Waccoon is offline  
Old 08 January 2023, 10:48   #7
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Thanks, will check it out next time I feel pressured enough to install it ;p. Switching to/from debug config would often freeze the whole thing and only "kill -9" helped ;p, so maybe that was it.
a/b is offline  
Old 08 January 2023, 15:25   #8
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Another annoying thing is when you trace you don’t see what you’re tracing. I need to disassemble after each trace and I’m not even sure if the PC register is displayed we saw more next PC.
kamelito is offline  
Old 08 January 2023, 16:34   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Quote:
Originally Posted by a/b View Post
After some digging, my best guess is that you have to call MakeSR() to construct the correct value out of all the individual bits prior to using it as regs.sr.
Yeah, MakeSR() was missing. Will be fixed.

Quote:
Originally Posted by Waccoon View Post
I'm currently building with VS 2019 under Win7 and it works fine. However, I have to turn off address sanitation for the Test build or it blows up.
Address sanitizer has never worked if 32-bit build. It works if 64-bit build.
Toni Wilen is offline  
Old 10 January 2023, 03:51   #10
Waccoon
Registered User
 
Waccoon's Avatar
 
Join Date: May 2022
Location: Boston / USA
Age: 46
Posts: 39
Quote:
Originally Posted by Toni Wilen View Post
Address sanitizer has never worked if 32-bit build. It works if 64-bit build.
Not like it's a big deal, but I am doing a 64-bit build. When the executable is created, some extra library files are dumped into the destination test folder and when WinUAE is launched, it complains about a DLL entry point being wrong.

I don't use VS for any other projects, so I never bothered to look too much into how its linker works. Maybe I don't have a necessary module installed or something. I'll worry about it later.
Waccoon is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugger updates (was: WinUAE Debugger HH PC history) selco support.WinUAE 8 14 March 2018 22:27
WinUAE Debugger - Address Register Watchpoints SparkyNZ Coders. Asm / Hardware 3 16 June 2015 22:39
WinUAE Debugger - Audio Register Breakpoints SparkyNZ Coders. Asm / Hardware 2 14 June 2015 21:40
WinUAE Debugger Register Display SparkyNZ Coders. Asm / Hardware 3 11 June 2015 20:55
Debugger: replace register value AmiGer request.UAE Wishlist 2 06 January 2005 14:30

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 13:50.

Top

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