English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 20 June 2019, 22:17   #121
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,565
I guess I forgot to make it less strict when I decided to make this more usable for generic debugging..

But cache "support" is good idea: next update will complain if address was modified and later it gets executed without cache flush (if 68020+).
Toni Wilen is online now  
Old 20 June 2019, 22:36   #122
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,999
Quote:
Originally Posted by Toni Wilen View Post
I guess I forgot to make it less strict when I decided to make this more usable for generic debugging..

But cache "support" is good idea: next update will complain if address was modified and later it gets executed without cache flush (if 68020+).


Thanks!
ross is offline  
Old 25 January 2020, 19:23   #123
rikkles
Registered User

 
Join Date: Sep 2019
Location: Beirut / Lebanon
Posts: 8
W(rite) string with spaces

Using W on the debugger, it's not possible to write a string with spaces. I'm forced to write hex. Am I missing something?
rikkles is offline  
Old 26 January 2020, 15:12   #124
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,565
Quote:
Originally Posted by rikkles View Post
Using W on the debugger, it's not possible to write a string with spaces. I'm forced to write hex. Am I missing something?
W command line parsing uses normal parsing/get next character functions that automatically strips white space.. Oops, will be fixed
Toni Wilen is online now  
Old 26 January 2020, 18:38   #125
rikkles
Registered User

 
Join Date: Sep 2019
Location: Beirut / Lebanon
Posts: 8
Thanks! Helps having to convert manually
rikkles is offline  
Old 09 August 2020, 23:52   #126
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,123
@toni - I've had time today to try out the uaedbg side loader and new printf functionality in 4.4.0.

On the uaedbg, I'm finding the debugger is breaking on instruction fetch changes.

Configuration is A1200 with Cycle exact, here's my code snippet:

Code:
agdPingPong:
	tst.l	.dir
	beq.s	.down
	bmi.s	.up		
	bra.s	.exit

.down:	cmp.w	#$8c,CAMERA_YPOS
	beq.s	.swap
	bsr	agdPanDown
	bra	.exit

.up:	cmp.w	#$0,CAMERA_YPOS
	beq.s	.swap
	bsr	agdPanUp
	bra	.exit
	
.swap:	not.l	.dir
	bra.s	.exit
	
.dir:	dc.l	0

.exit:	rts
As you can see I'm using local/private variables in the code.

Whenever the not.l is executed the debugger is breaking with:

Code:
Invalid access. Addr=7000968c RW=R Size=4: Instruction fetch from memory that was modified after being executed at least once
Is there a valid reason the debugger is breaking due to this? If I was to guess what was happening I'd say the cache is being loaded and then the code is changing the value in memory causing it to break - but I'm not self modding the code.

Is there any way to disable this particular check if what I think is happening is correct?

Cheers,
Graeme
mcgeezer is offline  
Old 10 August 2020, 13:35   #127
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,565
Instruction prefetch read hits the variable address. Either it happens when branch is executed (branch + next word/long gets loaded depending on alignment) or when jumping to RTS and RTS address is not long aligned (prefetch would load low word of variable and opcode of RTS)

It can't know if it is self-modifying code or just a harmless side-effect.

Keep variables further away from code. (I personally prefer using A4 or A5 as a base pointer to variables, I hate unnecessary absolute addresses )

There is no option to disable kit, at least not yet.
Toni Wilen is online now  
Old 10 August 2020, 15:03   #128
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,123
Quote:
Originally Posted by Toni Wilen View Post
Instruction prefetch read hits the variable address. Either it happens when branch is executed (branch + next word/long gets loaded depending on alignment) or when jumping to RTS and RTS address is not long aligned (prefetch would load low word of variable and opcode of RTS)

It can't know if it is self-modifying code or just a harmless side-effect.

Keep variables further away from code. (I personally prefer using A4 or A5 as a base pointer to variables, I hate unnecessary absolute addresses )

There is no option to disable kit, at least not yet.
Thanks for the explanation Toni.

I've put in some nops (CNOP 0,16 in Vasm) before the variable and now the debugger is not breaking which is good. While I do point one of the address registers to my global variables I also like the convenience of using local labels because then I don't need to have them as unique names in the global space. I'll make do with the workaround I have.

Thanks for the fast response.
mcgeezer 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 23:27
Hacking the fs-uae console debugger alpine9000 Coders. Asm / Hardware 1 28 March 2016 17:45
Added SegTracker to FS-UAE's Debugger lallafa support.FS-UAE 7 16 January 2016 12:03
Amiga Segment!!! :) :) blade002 Amiga scene 8 08 October 2015 16:00
SAS/C: Undefined symbols Yesideez Coders. C/C++ 14 13 February 2014 17:36

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 20:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.08171 seconds with 16 queries