English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 11 July 2018, 09:51   #101
sigma63
Registered User
 
Join Date: Oct 2014
Location: Berlin
Posts: 131
Quote:
Originally Posted by Toni Wilen View Post
for example uae-configuration dbg "f 123456" to set break point.
Ah OK, that works! Thank you very much.
sigma63 is offline  
Old 18 July 2018, 15:21   #102
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Should allocating chip ram with AllocMem work with this ?

When I run it through the debugger the chip ram allocations with AllocMem always return 0x0. Works fine outside the debugger.

(tested on 4.0.1)
alpine9000 is offline  
Old 19 July 2018, 09:01   #103
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by alpine9000 View Post
Should allocating chip ram with AllocMem work with this ?

When I run it through the debugger the chip ram allocations with AllocMem always return 0x0. Works fine outside the debugger.

(tested on 4.0.1)
Chip RAM allocations should fall back to original AllocMem()/AllocVec().
Toni Wilen is offline  
Old 19 July 2018, 09:18   #104
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by Toni Wilen View Post
Chip RAM allocations should fall back to original AllocMem()/AllocVec().

I wonder why the behaviour is different when the debugger is running. I have a small chip ram data hunk in the executable.
alpine9000 is offline  
Old 19 July 2018, 20:26   #105
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by alpine9000 View Post
I wonder why the behaviour is different when the debugger is running. I have a small chip ram data hunk in the executable.
Which is it? First you said AllocMem/AllocVec with MEMF_CHIP returns zero but now you talk about chip RAM hunks?

Chip RAM hunks are handled like it was using normal memory (they go to "debug ram") but extra emulator switch is activated that enables chip ram DMA to any RAM address.

If debugged program calls AllocMem/AllocVec (exec->ThisTask == debugged program), allocation comes from debug RAM except if MEMF_CHIP is set, which redirects call back to original function. (=invalid accesses are not detected)

MEMF_CHIP really should use separate "debug ram" region. Maybe later..
Toni Wilen is offline  
Old 19 July 2018, 22:47   #106
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
It’s both :-) the copper list is a chip hunk, everything else is allocated.

I’ll try getting rid of the chip ram hunk, but does this then means the chip ram allocations are not checked?

Edit: just re-read your reply. I think I’ll pre-allocate the chip ram as a hunk then run my own allocator on that ram, that way all accesses should still be checked.
alpine9000 is offline  
Old 22 February 2019, 12:24   #107
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
Hi Toni,
is the source code for uaedbg available? Currently working on GDB server for WinUAE and would like to customize the loader.
Bartman is offline  
Old 23 February 2019, 12:58   #108
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by Bartman View Post
Hi Toni,
is the source code for uaedbg available? Currently working on GDB server for WinUAE and would like to customize the loader.
Source is now included with the archive (two binaries included, old and version that latest 4.2.0 requires due to ELF support)

But I don't think it will help, it is really minimal loader, loads the binary to RAM, sets up required DOS structures so that executable thinks it is running from CLI normally, move stack, the rest is done in winuae side.
Toni Wilen is offline  
Old 23 February 2019, 13:20   #109
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 63
Thanks for the quick reply!
Bartman is offline  
Old 15 April 2019, 18:50   #110
Phantasm
Not a Rebel anymore
 
Phantasm's Avatar
 
Join Date: Apr 2005
Location: UK
Age: 51
Posts: 497
when i try to debug a program that opens a new screen it fails in the debugger.
eg. this in Amiga E works fine normally but fails when running in the debugger.



PROC main()
DEF sptr

sptr:=OpenS(640,256,3,0,'testscreen',NIL)
IF sptr=NIL THEN WriteF('openscreen failed\n') ELSE WriteF('openscreen success\n')
CloseS(sptr)
WriteF('done\n')
ENDPROC


I have attached the source and compiled exe
Attached Files
File Type: zip screen.zip (1.1 KB, 205 views)
Phantasm is offline  
Old 16 April 2019, 19:20   #111
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Chip RAM allocation fallback to normal chip ram is broken. This debugger mode does not yet support faking chip ram in "debug ram". Will be fixed in next version.
Toni Wilen is offline  
Old 16 April 2019, 20:11   #112
Phantasm
Not a Rebel anymore
 
Phantasm's Avatar
 
Join Date: Apr 2005
Location: UK
Age: 51
Posts: 497
Quote:
Originally Posted by Toni Wilen View Post
Chip RAM allocation fallback to normal chip ram is broken. This debugger mode does not yet support faking chip ram in "debug ram". Will be fixed in next version.

Thats great, thanks.
Phantasm is offline  
Old 24 May 2019, 19:24   #113
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
For some reason I can't seem to get this to play ball.

I'm using WinUAE 4.2.1 32 bit and my config is AGA with 4mb of chip ram.

I've allocated debug memory manually in the config file:

Code:
fastmem_options=start=70000000,end=6fffffff
debugmem_start=0x70000000
debugmem_size=512
mem25bit_size=0
When I run uaedbg test.exe I get this repeated.. constantly.

Code:
Trap #11: SR=0018 PC=7000800e Format=002c
Trap #11: SR=0018 PC=7000800e Format=002c
Trap #11: SR=0018 PC=7000800e Format=002c
Trap #11: SR=0018 PC=7000800e Format=002c
Trap #11: SR=0018 PC=7000800e Format=002c
What am I missing?
mcgeezer is offline  
Old 24 May 2019, 20:42   #114
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Does it work without debugmem config entries? Do you use console debugger? (GUI version won't work. xx switches.)
Toni Wilen is offline  
Old 24 May 2019, 20:48   #115
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Toni Wilen View Post
Does it work without debugmem config entries? Do you use console debugger? (GUI version won't work. xx switches.)
No, even if I remove fast ram or just add some (1mb) then all I get is

Code:
Failed to automatically allocate debugmem (no space)!
I always use the console debugger too.
mcgeezer is offline  
Old 24 May 2019, 20:51   #116
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Something is incompatible in your config. Make sure CPU is 32-bit addressing capable. "Too compatible" configs won't also work.
Toni Wilen is offline  
Old 24 May 2019, 20:55   #117
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Toni Wilen View Post
Something is incompatible in your config. Make sure CPU is 32-bit addressing capable. "Too compatible" configs won't also work.
Thanks Toni - Working now... I had 24 Bit addressing ticked.

This will be extremely useful!!!
mcgeezer is offline  
Old 19 June 2019, 09:38   #118
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Hi Toni, a question about uninitialized memory complaints.

Is a part in a deploy/reloc system that construct a jump table:

AllocMem ID= 9: 00000000 7004b500 - 7004ca69 (5482) AllocFlags: 00000001 PC: 700089f4
Invalid access. Addr=7004c0a4 RW=R Size=4: Instruction fetch from uninitialized memory

Memory view:
7004C0A4 4ef9 7004 c106 JMP $7004c106

How I can make this a valid fetch for the debugger?

Last edited by ross; 19 June 2019 at 10:50.
ross is offline  
Old 19 June 2019, 10:08   #119
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by ross View Post
Hi Toni, a question about uninitialized memory complaints.

Is a part in a deploy/reloc system that construct a jump table:

AllocMem ID= 9: 00000000 7004b500 - 7004ca69 (5482) AllocFlags: 00000001 PC: 700089f4
Invalid access. Addr=7004c0a4 RW=R Size=4: Instruction fetch from uninitialized memory

Memory view:
7004C0A4 4ef9 7004 c106 JMP $7004c106

How I can make this a valid fetch for the debugger?
Any write access should have marked it as "initialized". How did you create this jump table instruction?
Toni Wilen is offline  
Old 19 June 2019, 10:15   #120
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
Any write access should have marked it as "initialized". How did you create this jump table instruction?
Something like this:
Code:
        MOVE.W	#$4EF9,(A0)+
	ADD.L	(A2)+,D0
	MOVE.L	D0,(A0)+

EDIT: debugger recognize the previous write but stop anyway
Page: 7004c000 - 7004c0ff. State=W Modified=*, Start=00, End=100

Last edited by ross; 19 June 2019 at 11:00.
ross 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
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 13:10.

Top

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