![]() |
![]() |
#81 |
Registered User
Join Date: Aug 2013
Location: Germany
Posts: 82
|
>winuae.7z updated, added one more path variant test..
It is still the older file from May,28th ? |
![]() |
![]() |
#82 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Sometimes cached data is returned even when file is updated. Reuploaded today, try again..
|
![]() |
![]() |
#83 | |
Registered User
Join Date: Jan 2018
Location: Germany
Posts: 46
|
Hi Toni,
WinUAE Public Beta 11 crashes hard when I try to debug a minimal assembler program linked with NDK2.0 astartup.obj: Code:
opt l+ XDEF _main _main: rts genam minimal.s blink from include2.0:startups/Astartup.obj,minimal.o lib include3.9:linker_libs/amiga.lib to minimal uaedbg minimal Quote:
Thank you. |
|
![]() |
![]() |
#84 |
Registered User
Join Date: Aug 2013
Location: Germany
Posts: 82
|
You must disable JIT before. Did you?
|
![]() |
![]() |
#85 |
Registered User
Join Date: Jan 2018
Location: Germany
Posts: 46
|
Yes, I know. I configured a 68030 with 68882 and JIT disabled.
|
![]() |
![]() |
#86 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Attach also your test executable. It probably is needed, at least to confirm the fix quickly.
|
![]() |
![]() |
#87 |
Registered User
Join Date: Jan 2018
Location: Germany
Posts: 46
|
Sure, please find the test executable attached.
The crash happens right after the AllocMem call for parsing the command line. |
![]() |
![]() |
#88 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Fixed, redownload uaedbg.zip. Startup code uses pr_ReturnAddr which was not adjusted.
|
![]() |
![]() |
#89 |
Registered User
Join Date: Jan 2018
Location: Germany
Posts: 46
|
Thank you very much for fixing it so quickly. No more crashes.
|
![]() |
![]() |
#90 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Quick new feature: break to debugger when debugged task causes any unexpected exception. Uses tc_TrapCode so if debugged program also sets it, it should properly call old handler if program's own handler gets unexpected exception.
Note: currently debugger breaks to internal uaedbg trap code routine. You need to manually trace few following instructions to get back to user code. EDIT: Fixed, now it automatically executes out of exception routine and then breaks to debugger. Also note that it automatically adjusts stack and returns to following instruction even if 68k documentation says it should have returned to instruction that caused the exception. Last edited by Toni Wilen; 31 May 2018 at 19:56. |
![]() |
![]() |
#91 |
Registered User
Join Date: Aug 2013
Location: Germany
Posts: 82
|
Reading uninitialized memory
Stupid question:
What is "uninitialized memory"? How is that detected? What marks memory "initialized"? I am testing here an gcc/libnix-compiled program and get the messeage in fread()-call when inside fread() the stream-buffer is acessed. The buffer was filled before from an AmigaOS-Read()-call and the program works just fine. Invalid access. Addr=70149510 RW=R Size=1: Reading uninitialized memory Page: 70149500 - 701495ff. State=R Modified=-, Start=00, End=100 D0 000000DD D1 7014950D D2 00000000 D3 00000000 D4 00000000 D5 00000000 D6 00000000 D7 401B41CC A0 70216B28 A1 70149510 A2 700A848C A3 700A84C8 A4 4021FD80 A5 701202B4 A6 40000830 A7 7012028C USP 7012028C ISP 400022A8 SFC 00000000 DFC 00000000 CACR 00000001 VBR 00000000 CAAR 00000000 MSP 00000000 T=00 S=0 M=0 X=1 N=1 Z=0 V=0 C=0 IMASK=0 STP=0 0: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan 2: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan 4: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan 6: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan FPSR: 00000000 FPCR: 00000090 FPIAR: 00f8161a N=0 Z=0 I=0 NAN=0 70045F1E [03DF16] 1011 MOVE.B (A1) [6d],D0 Segment 1: 000003e9 70008000-700a03b3 70045F20 [03DF18] 1080 MOVE.B D0,(A0) [00] Next PC: 70045f22 |
![]() |
![]() |
#92 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Uninitialized = memory was allocated with allocmem/allocvec without MEMF_CLEAR flag and someone read from address that wasn't previously written to at least once.
It is not always a bug. |
![]() |
![]() |
#93 |
Registered User
Join Date: Aug 2013
Location: Germany
Posts: 82
|
Thanks for explaination!
Does that always work? I have file with "1234567890abcdf..." as contents. That file is beeing fopened and fread. fread() does internally an AmigaOS Read() to a internal stream buffer. Then the internal stream buffer is copied to the fread-argument. This copy stops the debugger. I see however in the debugger the internal stream buffer and it contains the values from the file, so the file was read and the values have been stored into the stream buffer. So the stream buffer cannot be uninitalited any more!? Can AmigaOS Read() somehow outsmart your memory-not-initialised detection? Invalid access. Addr=70149710 RW=R Size=1: Reading uninitialized memory Page: 70149700 - 701497ff. State=R Modified=-, Start=00, End=100 D0 000000DD D1 7014970D D2 00000000 D3 00000000 D4 00000000 D5 00000000 D6 00000000 D7 401B4614 A0 70149710 A1 7014970F A2 700A868C A3 700A86C8 A4 4021FE98 A5 701204B4 A6 40000830 A7 7012048C USP 7012048C ISP 400022A8 SFC 00000000 DFC 00000000 CACR 00000001 VBR 00000000 CAAR 00000000 MSP 00000000 T=00 S=0 M=0 X=0 N=1 Z=0 V=0 C=0 IMASK=0 STP=0 0: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan 2: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan 4: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan 6: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan FPSR: 00000000 FPCR: 00000090 FPIAR: 00f8161a N=0 Z=0 I=0 NAN=0 70045FD2 [03DFCA] 1010 MOVE.B (A0) [35],D0 Segment 1: 000003e9 70008000-700a057b 70045FD4 [03DFCC] 1000 MOVE.B D0,D0 Next PC: 70045fd6 >m 7014970d 7014970D 3233 3435 3637 3839 3061 6263 6465 6667 234567890abcdefg 7014971D 6869 6A6C 6B6D 6E6F 7071 7273 7475 7677 hijlkmnopqrstuvw 7014972D 7879 7A0A 9999 9999 9999 9999 9999 9999 xyz............. 7014973D 9999 9999 9999 9999 9999 9999 9999 9999 ................ 7014974D 9999 9999 9999 9999 9999 9999 9999 9999 ................ Last edited by selco; 26 June 2018 at 15:57. |
![]() |
![]() |
#94 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Right, directory filesystem and uae hardfiles bypass all normal memory access functions and access the host RAM directly (DMA-like) so debugger can't see it either..
Workaround added that forces indirect mode when debugger is enabled. |
![]() |
![]() |
#95 |
Registered User
Join Date: Aug 2013
Location: Germany
Posts: 82
|
WinUAE crashes on "rs"
Your fix seemes to have solved my fread() issue.
Thnx! Now I get a unitilized access later which I am inverstigating currently. I wanted to see where it happened and entered "rs" to show the stackframe. It shows the following lines and then crashes. Please find dump and bootloag attached. Code:
>rs 70008066 -> 7000a4b0 SP=7011f488 [0024A8] Segment 1: 000003e9 70008000-7009f62f _main 70008066 [00005E] 4eb9 7000 a4b0 JSR $7000a4b0 _main 7000806C [000064] 2f40 0004 MOVE.L D0,(A7, $0004) == $7011f48c [00000003] 7000b9cc -> 70009fe4 SP=7011f404 [001FDC] Segment 1: 000003e9 70008000-7009f62f 7000B9CC [0039C4] 4eba e616 JSR (PC,$e616) == $70009fe4 7000B9D0 [0039C8] 2039 700b 90cc MOVE.L $700b90cc [00000000],D0 7000a124 -> 7004601c SP=7011f3e8 [03E014] Segment 1: 000003e9 70008000-7009f62f __Z10LoadPhDataPi 7000A124 [00211C] 4eb9 7004 601c JSR $7004601c __Z10LoadPhDataPi 7000A12A [002122] 588f ADDA.L #$04,A7 7004644e -> 7009b6a0 SP=7011f3ac [093698] Segment 1: 000003e9 70008000-7009f62f _memcpy memcpy (F) 7004644E [03E446] 4eb9 7009 b6a0 JSR $7009b6a0 _memcpy memcpy (F) 70046454 [03E44C] 4fef 000c LEA.L (A7, $000c) == $7011f3b8,A7 7009b6cc -> 400005c0 SP=7011f394 |
![]() |
![]() |
#96 |
Registered User
Join Date: Oct 2014
Location: Berlin
Posts: 131
|
Improvement to the debugger
Hello Toni,
for debugging i sometimes print out the address of a function, Press Shift-F12 for debugger, set a breakpoint to the printed address and continue with g. What do you think, is it a good idea to have some kind of API for the debugger? So you could set the breakpoint from within the running Amiga-Program? Also it will be good to have a function to clear the breakpoint before the program exits, because the next time this old breakpoint may be "stalled". I think of using the uae.resource like a library with LVOs so one can check if running under WinUAE to use these functions only in this case. Cheers and keep up that marvellous work! ![]() |
![]() |
![]() |
#97 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Use official beta (4010b1), dump files from winuae.7z are useless. EDIT: or b2.
Last edited by Toni Wilen; 04 July 2018 at 08:59. |
![]() |
![]() |
#98 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
Quote:
![]() Lots of work to do.. |
|
![]() |
![]() |
#99 |
Registered User
Join Date: Oct 2014
Location: Berlin
Posts: 131
|
|
![]() |
![]() |
#100 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,611
|
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|