13 January 2016, 23:02 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,411
|
illegal memory access not working
Hi,
Trying to debug something. wd 1 is breaking for nothing... check the current instruction, the log below, and see it's not working at all. Tells me it's trying to write in some custom $DFFxxx register whereas it's writing to regular chipmem My config is a 68020 no JIT 24 bit addressing (CD32 with hard disk actually) thx |
14 January 2016, 20:07 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,595
|
Since memwatch breakpoint handling was changed (few releases ago), wd only sees accesses that also hit any memwatch region.
Use something like "w 0 <start> <len> none" or similar. |
14 January 2016, 22:29 | #3 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,411
|
yes, it works. It's more powerful, but also less convenient. Well, I found something fishy thanks to it!!
|
07 July 2019, 13:49 | #4 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,522
|
Sorry to revive this old thread, but I've the same mentioned problem.
Latest WinUAE stable, no JIT or fancy configuration, a simple A500 or A1200 quick config, CE (or any other similar one). Tried with "w 0 <start> <len> none" or similar. But wddoes't trap or log illegal memory access. And write strangeness: Code:
>wd Memwatch breakpoints enabled Illegal memory access logging enabled. Break=0 > Code:
>wd 1 Cleared logging addresses 00000001 - 00000002 > I've also problem with wcommand and Z3 memory, but I can't understand under what conditions it doesn't work. |
07 July 2019, 20:09 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,595
|
wd supports only first 16M of address space. Including Z3 space would require huge amounts of RAM.
w does not have any limits. |
07 July 2019, 20:34 | #6 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,522
|
Quote:
What we need is simply a log when unmapped memory is accessed. Yes Z3 memory can be huge and problematic, but think about old games/demos/stuff where 24-bit memory is usual. An option for a break/log if ((high byte != 0) && (24-bit memory flag)) can be simple. And wd working in 'low' 16MB memory space. |
|
07 July 2019, 20:37 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,595
|
Any CPU unmapped (address space where nothing is mapped) access is already logged if misc panel illegal access option is ticked.
|
07 July 2019, 21:23 | #8 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,522
|
And obviously I've missed this option Thanks.
I suppose all zone mapped as <none> in current address space map trigger a log. But how about the 'mirror' zone? I tried wd for the addresses $80000-$1FFFFF but it didn't seem to work, nor in $C00000 and up (off course not used in memory map). |
19 June 2024, 14:33 | #9 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 208
|
ok, some points to this command:
wd [<0-1>] Enable illegal access logger. 1 = enable break. I don't know why this command get the name 'wd'? Maybe better would be: 'im' illegal memory (access) And then wd would be free as command for delete all memory watchpoints similar to fd command. Then what's the logic behind 'wd'? Code:
>wd Illegal memory access logging disabled >wd 0 Illegal memory access logging enabled. Break=1 >wd 0 Cleared logging addresses 00000000 - 00000001 >wd 1 Cleared logging addresses 00000001 - 00000002 >wd Illegal memory access logging disabled >wd 1 Illegal memory access logging enabled. Break=1 >wd 1 Cleared logging addresses 00000001 - 00000002 >wd 0 Cleared logging addresses 00000000 - 00000001 >wd Illegal memory access logging disabled >wd 0 Illegal memory access logging enabled. Break=1 >wd 30000 Cleared logging addresses 00030000 - 00030001 >wd 30000 40000 Cleared logging addresses 00030000 - 00070000 > >wd Illegal memory access logging enabled >wd Illegal memory access logging disabled Like 'smc', the 'wd' needs a dummy memwatch >w 0 $0 $1000000 none ; w 0 <start> <len> none 0: 00000000 - 00FFFFFF (16777216) RWI NONE ; it's need for wd (max. 16MB) Is it possible to set this memwatch automatically as default and to give out the actual setting info by wd enabling? >wd Illegal memory access logging enabled 0: 00000000 - 00FFFFFF (16777216) RWI NONE ; default complete 16M Then wd in practice: Code:
move.b d0,$F80000 ; write access ROM - illegal memory access move.w d0,$F90000 ; write access ROM - illegal memory access move.l d0,$FA0000 ; write access ROM - illegal memory access move.w $dff180,d1 ; Color00, data access custom-chips (write only) move.w d0,$200002 ; 8MB Fast RAM area move.w #$0,$C80000 ; normaly unused >g WO: 00F80000 PC=00022E3C ... 00022e3c 13c0 00f8 0000 move.b d0,$00f80000 [11] ; works fine >g WO: 00F90001 PC=00022E44 WO: 00F90000 PC=00022E44 ... 00022e44 33c0 00f9 0000 move.w d0,$00f90000 [6602] ; works fine >g WO: 00FA0001 PC=00022E4C WO: 00FA0000 PC=00022E4C ... 00022e4c 23c0 00fa 0000 move.l d0,$00fa0000 [524151ca] ; works fine > ;------------------------------------------------------------- >g RO: 00DFF181=FF PC=00023A24 RO: 00DFF180=FF PC=00023A24 ... 00023a24 3239 00df f180 move.w $00dff180,d1 ; works fine ... ;------------------------------------------------------------- >g W: 00200003=AB PC=00023F96 W: 00200002=BA PC=00023F96 ... 00023f96 33c0 0020 0002 move.w d0,$00200002 ; works fine ;------------------------------------------------------------- >g WO: 00DFF001 PC=00023FA0 WO: 00DFF000 PC=00023FA0 ... 00023fa0 33fc 0000 00c8 0000 move.w #$0000,$00c80000 ; works fine 00023fa8 0839 0006 00bf e001 btst.b #$0006,$00bfe001 Next PC: 00023fb0 > illegal memory access at WO: 00F80000 PC=00022E3C ... Then I see a W: WO: RO: it could be: Write, Write Only, Read Only but ROM ist for me: RO and not WO and DFF180 is WO and not RO. W offcourse is both. ;------------------------------------------------------------- Then some questions to the memory dump. Code:
>dm 00000000 2048K/4 = 512K ID* C16 Chip memory 00200000 8192K/0 = 8192K -- F16 <none> 00A00000 2048K/0 = 2048K -- CIA CIA 00C00000 512K/1 = 512K ID* C16 Slow memory 00C80000 1024K/0 = 1024K -- F16 Custom chipset 00D80000 256K/0 = 256K -- C16 <none> 00DC0000 64K/0 = 64K -- C16 Battery backed up clock (MSM6242B) 00DD0000 64K/0 = 64K -- C16 <none> 00DE0000 128K/0 = 128K -- C16 Custom chipset 00E00000 512K/2 = 256K ID* F16 Kickstart ROM (C4F0F55F) =KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k) [315093-02] 00E80000 512K/0 = 512K -- F16 <none> 00F00000 64K/1 = 64K --* F16 UAE Boot ROM 00F10000 448K/0 = 448K -- F16 <none> 00F80000 512K/2 = 256K ID* F16 Kickstart ROM (C4F0F55F) =KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k) [315093-02] > (All <none> and ROM regions and the son on) Then my interpretation to this /0 /1 /2 /4 is: /0 - not present /1 - 1x present /2 - 2x present (mirrored) /4 - 4x present (mirrored) What means ID* or '--' or '--*' ? I - Instruction, D - Data, * - ? ;------------------------------------------------------------- 00000000 2048K/4 = 512K ID C16 Chip memory ; Chip memory ;0800000 copy of chip ;1000000 copy of chip ;1800000 copy of chip But there is no illegal memory access log in the mirrored chip ram area from $800000 - $1FFFFF because wd supports only the first 16M of address space. >w 0 $0 $1FFFFFF none 0: 00000000 - 01FFFFFE (33554431) RWI NONE ; false message? with Paths 'Log window' enabled and Misc Panel 'Log illegal memory accesses' is ticked, the illegal memory access is logged Illegal wput at 0088888a=1234abba PC=2464c ; works |
19 June 2024, 19:58 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,595
|
Just a quick note: not interested in debugger updates at the moment, maybe (much) later.
All debugger features are "undefined". Features randomly change or appear if I need some new feature to debug something.. |
20 June 2024, 10:35 | #11 |
German Translator
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 50
Posts: 208
|
Don't be put off by my posts. I'll go through all the commands again and tell you everything I notice.
You decide what to do with it (also later). Maybe WinUAE 7.0 ? Personally, I think the WinUAE debugger is really good and I just want to make it even better. And in general I just want to understand only everything... |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
memory access speed question | Lord Riton | Coders. General | 42 | 27 February 2019 14:26 |
Is there a list of know working memory parts available | toddbailey | support.Hardware | 2 | 25 August 2015 01:31 |
Break on Memory Access? | Khyron | support.WinUAE | 3 | 21 August 2010 00:10 |
access emulated memory | ara | support.WinUAE | 6 | 03 April 2010 13:05 |
|
|