English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.FS-UAE (https://eab.abime.net/forumdisplay.php?f=122)
-   -   Added SegTracker to FS-UAE's Debugger (https://eab.abime.net/showthread.php?t=69638)

lallafa 15 June 2013 20:34

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...

arti 16 June 2013 10:41

Great, I wish this was in WinUAE.

Toni Wilen 16 June 2013 10:57

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.

lallafa 16 June 2013 20:19

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.

Toni Wilen 17 June 2013 10:16

Ah, I thought you added SegTracker support ("SegTracker support" = works with existing SegTracker), not some kind of improved re-implementation.

FrodeSolheim 26 June 2013 00:17

Sounds great :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 :)

alkis 27 December 2015 16:04

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! :)

FrodeSolheim 16 January 2016 11:03

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


All times are GMT +2. The time now is 21:14.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04270 seconds with 11 queries