English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 15 June 2013, 20:34   #1
lallafa
Registered User
 
Join Date: Aug 2010
Location: Erlangen, Germany
Posts: 24
Added SegTracker to FS-UAE's Debugger

I use FS-UAE mainly for testing and debugging own Amiga code. I really like to do this directly with the built-in debugger of FS-UAE, but it was lacking some features that support executable analysis inside Amiga OS. That's why I added Enforcer's SegTracker and FindHit features directly into the debugger...

Now you can list the loaded segments and even attach debug info from the symbol and debug/line hunk sections of an executable to inspect your code.

The code of the extended FS-UAE is available in my public devel branch on fs-uae-gles GitHub Repo. Just clone the repo and build an extended FS-UAE. I tested the code on OS X and Linux. Windows was not tested and might need some polishing first...

Detailed instructions and examples on the usage of the new features can be found on my blog.

I know that such a feature is only useful for a very limited number of users, but I thought I'll give you the pointer, in case someone wants to play with it And if more users like this extension then a merge of the patch into main line FS-UAE or even WinUAE could make sense...
lallafa is offline  
Old 16 June 2013, 10:41   #2
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 662
Great, I wish this was in WinUAE.
arti is offline  
Old 16 June 2013, 10:57   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Just wondering why whole segtracker is duplicated in UAE side, instread of using normal AmigaOS segtracker data structures? (Just like uae enforcer does) You won't be able to track anything that happens before dos starts anyway.
Toni Wilen is online now  
Old 16 June 2013, 20:19   #4
lallafa
Registered User
 
Join Date: Aug 2010
Location: Erlangen, Germany
Posts: 24
Main reason for this extension is convenience Sure, you can run the original SegTracker in a CLI and call FindHit for each location you want to resolve, but as I am already in the built-in debugger this means a exit-debugger/enter CLI/call command/enter debugger cycle each time during debugging...

Furthermore, the debugger commands are more powerful than FindHit: while the original tool only allows to map hunk+offset to source lines, I added symbol look ups, absolute memory addresses, and also reverse lookups, i.e. enter a symbol name or source location and get the memory location of the corresponding code.

In fact during debugging I mainly use the reverse lookups, e.g. to set a breakpoint at a symbol/source location or disassemble/patch the code there.

With the segment and debug info modeled inside the debugger you can even extend my approach and use the symbol or source line infos everywhere where an address input is required, e.g. d <symbol>. Also the debug output could be annotated this way.
lallafa is offline  
Old 17 June 2013, 10:16   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Ah, I thought you added SegTracker support ("SegTracker support" = works with existing SegTracker), not some kind of improved re-implementation.
Toni Wilen is online now  
Old 26 June 2013, 00:17   #6
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Sounds great I added a blog post about this feature on the FS-UAE home page: http://fs-uae.net/2013/06/26/segtrac...-uaes-debugger
FrodeSolheim is offline  
Old 27 December 2015, 16:04   #7
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Old thread, but:
a) are there any plans for fs-uae to integrate the segtracker into it's debugger?
b) would be way way cool to have watchpoints set up automatically and have a counter (how many times code execution reached there) and aggregated time!!! And then a sorted list based on time and there is your profiler!
alkis is offline  
Old 16 January 2016, 11:03   #8
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
a) I haven't looked into it in detail, but if it is rather trivial to merge in, I'm positive to that. https://github.com/FrodeSolheim/fs-uae/issues/101
FrodeSolheim 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
How do I go about getting something added to TOSEC? Abaddon project.TOSEC (amiga only) 65 12 June 2012 18:18
Who added Pop-Up to HOL? Whitesnake HOL contributions 0 21 April 2012 19:48
Dos Drivers added??? dabone project.ClassicWB 4 24 January 2010 20:31
Can I get some pics added? retrogamer HOL suggestions and feedback 2 27 March 2007 18:58
Can I get a game added?? stainy HOL suggestions and feedback 6 25 February 2007 20:39

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 17:41.

Top

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