D-Bug & Automation Forum | |
D-Bug & Automation Forum >> Coding >> Bugaboo usage
http://d-bug.mooo.com/dbugforums/cgi-bin/yabb2/YaBB.pl?num=1179828064 Message started by ggn on 22.05.07 at 10:01:03 |
Title: Bugaboo usage Post by ggn on 22.05.07 at 10:01:03
I've been meaning to start this topic since I came back from Outline 07, but I didn't have enough time in my hands, plus real life stuff etc. ;) This tutorial was conceived when I sat next to SSB and showed him a couple of tricks of this debugger and we said that it would be a good idea to do a thing like that, so here it is!
Dunno if I will finish it in 1 go, maybe it will be extended and corrected as time goes by. I'll try to keep a structure in this text, but it's not easy to include all the stuff I want (and because this is by no means an exhaustive manual). So you'll have to bear with me :) Your feedback will be appreciated of course! Also, if any other sites would like to reprint this, they should consult me first please. |
Title: Re: Bugaboo usage Post by ggn on 22.05.07 at 10:41:03
Preliminaries
Even when starting Bugaboo there is some sort of flexibility! Well, not built in really, but using an external program provided in the Turbo Assembler package (L_XXXXXX.PRG), you can load Bugaboo to any possible address from start of program area up to the Physical screen. This is very handy especially when you have lots of memory because you can load it high enough so it won't interfere with a code you're trying to trace through and it has to load at a specific address. Bugaboo is a very special debugger in my opinion, as you can use it using shortcut keys AND/OR CLI commands. When you load it you can see the top 2 lines containing 20 useful functions. These can be invoked using F-keys (top line) and Shift-F-Keys (second line). Let me cover briefly the most important of those functions.
|
Title: Re: Bugaboo usage Post by ggn on 22.05.07 at 11:40:32
A bit more on the Bugaboo screen
Line 3 of the Bugaboo screen writes the following: Code (] PC=200000 USP=3F7FF8 SSP=100000 SR=TS210XNZVC ori #0,d0[/code):
As you expect, if you click on any of those numbers they can be changed. But, what are the two arrows doing there? Well, this is a very nice feature (unique perhaps?) that in spite of a better name I'd like to call 'backtracing'. Let's say you traced thru a few commands and you suddendly realise that you wanted to see what d0 was 5 instructions ago. Oops! Usually this would mean restarting the trace from the beginning, which can get very tedious. But if you click on the left arrow then you can actually see the state of the PC and registers one instruction back! Bugaboo keeps quite some of those states (32?) and you have the added bonus that you can actually set that state to be the current! What this means is that you can reverse the trace! (of course the memory can't be altered back) What you need to do to achieve this is click on the "close box" character that appears on the 3rd line (on top of the arrows) when you go back some states. You can also do this by pushing alt+left or right buttons, and alt+insert to go back to a previous state. Now that we covered a few things about the CLI, let's discuss a few more useful commands. First of all: Loading stuff into memory
|
Title: Re: Bugaboo usage Post by ggn on 17.08.07 at 22:39:59
Setting variables (~ and LET)
There are lots of stuff that can be set, and fortunately it is done using the same mechanism. Code (]LET <variable>=value ~<variable>=value[/code):
Yay, we finally set some breakpoints . Now, the breakpoint setting has some more tricks under its sleeve. For example: Code (]~b0=PC?^d0=3[/code):
Simply displays all breakpoints Code (]showmemory <mem> or showm <mem>[/code):
Makes Bugaboo resident and exits. After that it can be called from Turbo Assembler by pressing F2, or when an exception occurs (handy for debugging GFA inlines ). Code (]observe trap,function[/code):
Will give you a listing with all the built-in commands you can use Some other random things that are nice
|
Title: Re: Bugaboo usage Post by ggn on 17.08.07 at 22:44:28
Where to get it?
So now that your appetitie is wetted, I guess you want to start hacking straight away :) Posted here is v1.26, the first one I actually used back in the day. TBH I like it much better than the latest version :). Also, IIRC I patched this version for correct setting of the STE video registers! |
Title: Re: Bugaboo usage Post by ggn on 17.08.07 at 22:45:07
For TT lovers out there, here's a compatible version (hi gwEm :))
|
Title: Re: Bugaboo usage Post by ggn on 17.08.07 at 22:46:00
This is a patched version by Chirs/Aura and The Innovator/Newline for Falcons!
|
Title: Re: Bugaboo usage Post by ggn on 17.08.07 at 22:46:38
And here is the 14mb fix by Defjam of the above version!
|
Title: Re: Bugaboo usage Post by jens on 19.08.07 at 22:36:27
Hi George.
I just get 404 messages when trying to d/l those files. Are you certain they're there? |
Title: Re: Bugaboo usage Post by ggn on 20.08.07 at 06:32:40 jens wrote on 19.08.07 at 22:36:27:
Hi jens, sure the files were there, but a wrong configuration of the forum (along with a bug in the forum code that wiped half of this topic once - big thanks to gwEm for the backup!) permitted the files from being downloaded. Please try now, all should be ok! |
Title: Re: Bugaboo usage Post by jens on 20.08.07 at 17:21:57 ggn wrote on 20.08.07 at 06:32:40:
*sings* All is well again... |
D-Bug & Automation Forum » Powered by YaBB 2.6.0! YaBB Forum Software © 2000-2025. All Rights Reserved. |