English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 20 June 2019, 21:17   #121
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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, 21:36   #122
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
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, 18: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, 14:12   #124
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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, 17: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, 22:52   #126
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
@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, 12:35   #127
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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, 14:03   #128
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
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  
Old 04 March 2021, 05:27   #129
Docent
Registered User
 
Join Date: Mar 2019
Location: Poland
Posts: 59
Is this tool still available for download? I got error 403 trying to access the link from 1st message.
Docent is offline  
Old 04 March 2021, 13:34   #130
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by Docent View Post
Is this tool still available for download? I got error 403 trying to access the link from 1st message.
Here you go:

https://download.abime.net/winuae/files/b/uaedbg.zip
DamienD is offline  
Old 06 March 2021, 18:42   #131
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
@Toni, you may want to update the 1st post of this thread with the above
DamienD is offline  
Old 06 March 2021, 21:27   #132
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
Changed but replacing old url http->https should have been enough to fix it. I'll need to ask RCK again.
Toni Wilen is online now  
Old 07 March 2021, 00:33   #133
Docent
Registered User
 
Join Date: Mar 2019
Location: Poland
Posts: 59
Quote:
Originally Posted by DamienD View Post
Thanks, Damien!
Docent is offline  
Old 07 March 2021, 00:43   #134
Docent
Registered User
 
Join Date: Mar 2019
Location: Poland
Posts: 59
Hi Toni,
Is this possible to implement support for SAS C HUNK_DEBUG? I found only some info here about the content of this hunk when compiling with debug=line, but even that would be great to have.
Docent is offline  
Old 20 September 2021, 11:51   #135
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Toni Wilen View Post
- Does other popular compilers also generate useful HUNK_DEBUG
As Docent already mentioned: the most common format under Amiga compilers and assemblers is the LINE debug block from SAS/C. Should be trivial to implement.
As a bonus maybe also HCLN from Devpac.
phx is offline  
Old 23 September 2021, 20:11   #136
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
Few example executables + source files required. Standard requirement
Toni Wilen is online now  
Old 25 June 2022, 23:06   #137
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 652
When running an executable under uadbg, I'm getting illegal instruction exceptions early on. When I look at the code/data, it looks like as if the data matches the executable, but PC somehow ended up "inside" instructions. This does not happen when running the executable under regular circumstances.

I tried with "more compatible" on and off, both same results.

I'm emulating an A1200 + Blizzard1230 IV + 64MB (MMU enabled, MMULib in use)

Do you have any advice on what went wrong?
pipper is offline  
Old 19 August 2022, 01:38   #138
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 652
Are BSS segments recognized as "uninitialized"? If so, they probably should not.

Edit: the uninitalized reads were pointing to (chip) memory that had been allocated without MEMF_CLEAR. This happened when calling OpenWindow, so out of my control.
Is there a way to only get exceptions "Invalid access. Addr=702da24c RW=R Size=4: Reading uninitialized memory" for memory that has not been allocated?

Last edited by pipper; 19 August 2022 at 02:00. Reason: original claim is false
pipper is offline  
Old 19 August 2022, 02:01   #139
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 652
Are BSS segments recognized as "uninitialized"? If so, they probably should not.

Edit: the uninitalized reads were pointing to (chip) memory that had been allocated without MEMF_CLEAR. This happened when calling OpenWindow, so out of my control.
Is there a way to only get exceptions of kind "Invalid access. Addr=702da24c RW=R Size=4: Reading uninitialized memory" for memory that has truly not been allocated?
pipper is offline  
Old 20 August 2022, 11:21   #140
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
Quote:
This happened when calling OpenWindow, so out of my control.
It is still a bug somewhere. Possibly bad parameters to some OS call or some other corruption. You need to solve this problem first.

Quote:
When running an executable under uadbg, I'm getting illegal instruction exceptions early on. When I look at the code/data, it looks like as if the data matches the executable, but PC somehow ended up "inside" instructions
Examples please. Instruction caches or MMU can cause side-effects.
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 updates (was: WinUAE Debugger HH PC history) selco support.WinUAE 8 14 March 2018 22:27
Hacking the fs-uae console debugger alpine9000 Coders. Asm / Hardware 1 28 March 2016 16:45
Added SegTracker to FS-UAE's Debugger lallafa support.FS-UAE 7 16 January 2016 11:03
Amiga Segment!!! :) :) blade002 Amiga scene 8 08 October 2015 15:00
SAS/C: Undefined symbols Yesideez Coders. C/C++ 14 13 February 2014 16: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:03.

Top

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