English Amiga Board


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

 
 
Thread Tools
Old 15 June 2013, 21:34   #1
lallafa
Registered User
 
Join Date: Aug 2010
Location: Erlangen, Germany
Posts: 23
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  
AdSense AdSense  
Old 16 June 2013, 11:41   #2
arti
Registered User

 
Join Date: Jul 2008
Location: Poland
Posts: 475
Great, I wish this was in WinUAE.
arti is offline  
Old 16 June 2013, 11:57   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,961
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 offline  
Old 16 June 2013, 21:19   #4
lallafa
Registered User
 
Join Date: Aug 2010
Location: Erlangen, Germany
Posts: 23
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, 11:16   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,961
Ah, I thought you added SegTracker support ("SegTracker support" = works with existing SegTracker), not some kind of improved re-implementation.
Toni Wilen is offline  
Old 26 June 2013, 01:17   #6
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,411
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, 17:04   #7
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 365
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 online now  
Old 16 January 2016, 12:03   #8
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,411
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  
AdSense AdSense  
 


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 19:18
Who added Pop-Up to HOL? Whitesnake HOL contributions 0 21 April 2012 20:48
Dos Drivers added??? dabone project.ClassicWB 4 24 January 2010 21:31
Can I get some pics added? retrogamer HOL suggestions and feedback 2 27 March 2007 19:58
Can I get a game added?? stainy HOL suggestions and feedback 6 25 February 2007 21: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 20:52.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.15473 seconds with 14 queries