America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, January 4, 1994 10:00 p.m. Eastern Time Topic: Debugging Tools and Techniques ("Splat!", and others) Forum Leader: Gary Jacobson (AFL GaryJ) AFL GaryJ Welcome to the Apple II Development Forum! AFL GaryJ Tonight, our topic, is Debugging Tools and Techniques! MikeHacket Hi Gary. I was just about to drop you a line, but I lost my message. Sheppy Hi, Mike. AFA AndyW I added some more script controls to OE too.. MikeHacket I'll get back to you later, if I don't answer you're questions here. MikeHacket Hello all. For anyone who doesn't know me, I'm the author of Splat! so if MikeHacket anyone's got any questions, fire away. AFA AndyW <- Splat beta tester.. MikeHacket Hi Andy. :-) BCS Frank Splat??? Just Marty What's Splat? BCS Frank Yeah, what Marty said. AFA AndyW Used it just the other day to debug a sound player utility.. Sheppy It's a debugger. :) MikeHacket It's a new source-level debugger for Orca languages. Works under GNO too! AFA AndyW Too bad the icon on the startup screen does it's splat so quickly! SoftdiskGS Well, well, if it isn't the Houston Hacker. MikeHacket Well, I'm not a great animator, but I thought it was cute. :-) BCS Frank You want adjustable splat speed settings? AFA AndyW Only way to slow it down would be to make it take longer for Splat to install AFA AndyW itself I guess.. Just Marty Where do you get Splat? MikeHacket Procyon. Jawaid's selling it for $39.95, I believe, direct mail-order only. AFA AndyW Mike, now what is needed is a COP vector switcher! AFL GaryJ How does Splat compare to other debuggers? MikeHacket Mmm, yes. Too many things fighting over that vector. AFA AndyW Only other debugger (of it's sort) is the ORCA debugger (new version).. MikeHacket But at least Splat! passes on anything it doesn't recognize. AFA AndyW That's nice to know.. MikeHacket That's one reason it works with GNO. AFA AndyW The new ORCA/Debugger handles objects.. Is Splat ever going to handle them AFA AndyW too? AFA AndyW <- Waiting on the ORCA/Debugger update now.. MikeHacket Hmm, I've never tried the new Orca/Pascal, but I was told by someone that it MikeHacket did support objects correctly. If it doesn't I'll fix it! AFA AndyW I don't have Pascal 2.0, so I can't check that out.. AFA AndyW I guess I should check it with M2 too.. AFA AndyW Anyone want to list all the debuggers that are available? AFA AndyW :) AFL GaryJ Mike, can you give us an idea of the differences between Splat and ORCA/Debugger? MikeHacket Well, there's Splat!, Orca/Debugger and Prism, of the source-level variety. AFL GaryJ Debuggers: GSBug, ORCA/Debugger, ProDEV DDT (hardware), Splat MikeHacket Sure, one thing is the nicer interface. And you can see more of your source AFA AndyW Prism isn't all that good.. AFC DYAJim If anyone is looking to buy Pascal 2.0.1, I'm trying to sell my copy :-) AFA AndyW What do you want for it? MikeHacket code, and scroll around in it. Also, as I mentioned, it runs fine under GNO. MikeHacket It does support the new Orca 2.0 langauges, as well as is possible until the MikeHacket compilers get fixed. Let see, oh yeah, it's got a profiler. And it's very AFA AndyW The new version of the ORCA/Debugger supports the 2.0 languages too.. MikeHacket easy to view your variables and structures. MikeHacket Yeah, I know the new Orca/Debugger works on 2.0. That's no longer a difference MikeHacket There's also a shell version of Splat!, if you're working with limited memory. AFA AndyW There is? I never saw that part of it.. AFA AndyW Oh, yes, I did.. AFL GaryJ Now we just need someone to write a switcher for all of these debuggers :) AFA AndyW Just never thought twice about it! AFA AndyW I think what is needed is a COP init handler.. MikeHacket But why? All you need is Splat! and GSBug! :-) IMHO AFA AndyW It would have to load the INITs itself though.. AFL GaryJ I assume they co-exist well? (Splat/GSBug) MikeHacket Yep. AFA AndyW They co-exist quite well! AFA AndyW Splat uses COPs, GSBug uses BRKs.. MikeHacket I used GSBug to debug Splat!, of course. MikeHacket The only thing you have to watch out for is getting them crossed. AFC DYAJim Is MikeW's COP format documented or did you hack it out, Mike? MikeHacket You shouldn't invoke one while the other is active. AFA AndyW And, if you do, hit r on GSBug.. MikeHacket I got the docs from Mike, although with the structures, he hasn't quite MikeHacket followed them correctly. Hopefully, everything will be straightened out soon. AFL GaryJ Ok, anyone have any questions for Mike, or general questions/comments about AFL GaryJ debuggers, how to debug, etc.? AFA AndyW I know one thing for sure! Debug code sure slows code WAY down! MikeHacket Yeah, there's a lot of overhead involved. I'll work on improving that, but Sheppy The best way to debug is to find somebody else to do it for you. ;) MikeHacket the COP handler alone takes a fair bit of time, before I even get control. AFL GaryJ Dave Lyons (if he's available). AFL GaryJ :) AFA AndyW I noticed that Mike.. Like, setting up the stack before each COP.. MikeHacket Yeah, there's a lot of stuff to be saved and so on. Even with debugging off MikeHacket (so Splat! is doing very little), speed is noticeably poorer. MikeHacket Mike Westerfield gets around this by changing all COPs to BRAs when debugging MikeHacket is off, but that messes up restartable programs. AFA AndyW So, who uses which debugger(s)?? MikeHacket Well? I've already had my say! ;) AFA AndyW I wrote a program to convert .WAV files to //gs binary sound files, and the AFA AndyW loop that changed zeros to ones went pretty fast with no debug code, but it AFA AndyW took forever with debug code in! AFL GaryJ That could make you worry a bit while writing the program :) MikeHacket Yeah, it's gets really noticeable with big loops AFL GaryJ (Maybe make you think that you really need to be using an assembler and GSBug :) AFA AndyW I ended up NOPing out the debug code in that part of it just so it would finish AFA AndyW ! MikeHacket Wherever possible, turn off debugging code once you think the loop is working. AFL GaryJ :) AFL GaryJ So is Splat! available now? AFA AndyW Yup.. MikeHacket Yeah, it started shipping just before Christmas, and Jawaid is back now from MikeHacket vacation. AFL GaryJ Has anyone else besides Andy tried Splat? AFC DYAJim I helped beta it for a bit :) It's a real nice program. MikeHacket Me! :) AFA AndyW I was glad to beta test Splat as ORCA/Debugger quit working when I started AFL GaryJ Oh yeah, I forgot to say Mike and Andy :) AFC DYAJim I even used it to debug a Twilight II module :) AFA AndyW using C 2.0.. Now, I gotta see what the new ORCA/Debugger does, whenever the MikeHacket See, there you go! :) AFC DYAJim but the trouble is, or so James says, when you use #pragma cdev, orca doesn't link in some of the .. AFA AndyW update shows up.. AFC DYAJim .. usual debug code, so you can't view all structures and variables while debugging. AFA AndyW Maybe James had some of the optimizing turned on.. AFC DYAJim hmm.. too bad he's not here so I can ask him.. MikeHacket That shouldn't affect the debug code generated. AFA AndyW You would think not, but the optimizer doesn't respect it.. MikeHacket Are the structures missing globals? AFC DYAJim it might have been something like that, Mike. I can't remember exactly what he said... MikeHacket Well, Orca/C puts the globals in the main() function, so if you don't have one, MikeHacket you won't see the globals. Hopefully, this will be improved upon in a future MikeHacket version. AFC DYAJim I think that was the problem, Mike.. MikeHacket Of Orca, that is. Splat! shows every variable it can access. AFL GaryJ We need a new Nifty List now :) AFL GaryJ (Updated, that is) AFA AndyW I have a DDT-16, but almost never use it.. AFL GaryJ When that first came out (the DDT-16), it was before I ever heard of GSBug, Matt DTS What was the last version Dave released? MikeHacket Why not? Not useful? AFC DYAJim 3.4?? AFL GaryJ and I thought it would be real cool (and it probably would have been had GSBug AFL GaryJ not come along :) AFC DYAJim The DDT interferes with GSBug if you use the DDT.INIT all the time.. AFL GaryJ Yeah, I think 3.4 is the latest on Nifty List. AFA AndyW Difficult to use.. Tended to lose it's K register.. James S WI I spent the last 10+ minuts waiting for AOL to "check my password". AFL GaryJ Has anyone written a Stratus debugger? :) AFL GaryJ (Maybe that's something you should add to Online Enhancer, Andy :) AFA AndyW I wonder if there's going to be any update to GSBug too.. Now that System AFA AndyW 6.0.1 is out, the tool table needs updating too.. AFL GaryJ There's *supposed* to be an update to GSBug GSPlusBill Evening, folks. What's up? AFA AndyW Easy enough to do that with NL, but it's built in to GSBug! AFL GaryJ (that's what's supposed to be on the Tools disk that ByteWorks is going to AFL GaryJ sell as soon as Apple comes out with it.) BCS Frank James, you shoulda bought a vowel. AFL GaryJ I think the people who worked on those Apple II things are too distracted by other things. AFC DYAJim When you disable a menu item which is underlined, is the underline supposed to be dimmed too? AFL GaryJ (But I hope they get undistracted soon :) AFC DYAJim I thought that the underlines stayed undimmed, but lately I've been noticing a lot of dimmed AFC DYAJim underlines.. Matt DTS Not sure, Jim. Another reason not to use underlines, I guess. AFL GaryJ Hi Bill. AFL GaryJ Topic tonight is Debugging Tools and Techniques. AFC DYAJim I was wondering if it might be a new 6.0.1 bug GSPlusBill Ah. Over my head, as usual. ;) AFL GaryJ We've been mostly talking about "Splat!", the latest debugger on the market. James S WI I am using one now. Splat! BCS Frank Aren't the underlines actually "blank" lines in their own right? AFL GaryJ Yeah, MikeHackett is here, James. AFL GaryJ (The author) MikeHacket Hi James. AFC DYAJim I will have to pay attention to see if I can find any darkened underlines with corresponding .. AFC DYAJim .. disabled items. AFL GaryJ Anyone use STEP or TRACE lately? :) AFA AndyW No more underlines for me.. I use separator items instead (after getting James S WI Gary, what STEP and TRACE are you talking about? AFA AndyW yelled at for using underlined items).. AFC DYAJim It is cool! :-) But it right now only has BRK error checking. AFC DYAJim Underlines are preferable when the use of separate divider items causes the menus to scroll.. AFL GaryJ Well, that was part of the question, I guess :) AFC DYAJim (a la Word Works 2.1 which has 2 menus that scroll because of this ;) AFL GaryJ There's a Step and Trace mode in just about every "debugger" (including AFL GaryJ Integer BASIC). Matt DTS I can't think of any changes in 6.0.1 which would precipitate it, Jim. Sheppy Precipitate what? SoftdiskGS For the record, I tracked down a bug in WWPro 2.1 today, and I am gloating (**I** didn't write it...:) Sheppy Are you talking about the fact that sometimes underline dividers get dimmed Sheppy along with the item above? AFC DYAJim yes, Eric. AFL GaryJ Is that a gloat because you found the bug, or because you didn't write the program that had a bug? James S WI I am using step this very minute.I don't know that the equivelent of TRACE would be in Splat AFL GaryJ Anyone have any off-topic questions or comments? MikeHacket Trace in Splat! starts running your program a line at a time, showing the SoftdiskGS ! AFL GaryJ Anyone have a program they're trying to debug? MikeHacket execution, but not waiting for you to press a key after each line. James S WI I am no longer stepping. Thanks to Splat!, I just foud my bug. AFA AndyW Not at the moment.. I am planning to write one more little utility, then I'll AFA AndyW have a bunch of little sound utilities to upload (along with source).. MikeHacket That's great! It gives me a warm feeling inside. :-) SoftdiskGS Just for the record, concerning lasts weeks side discussion about PaintWorks animation... SoftdiskGS Chris McKinsey's (sp?) vaunted PW animation loop has 6% more overhead than mine. :) AFC DYAJim Now you've committed yourself to uploading and sharing it ;) Matt DTS Yeah, but it comes with 95% less attitude, so it's worth it. SoftdiskGS (Not to mention more than three times the overhead for bank crossings, but that is fairly SoftdiskGS insignificant). AFA AndyW Well, they didn't take long to write.. Just Marty LOL SoftdiskGS Yes, Matt, so you'll be able to squeeze YOURS into his code... :) AFA AndyW One converts RIFF files to //gs binary files, and/or shows .WAV file info (this AFA AndyW one is already done), another plays raw sound files from the shell command line AFA AndyW . I need to make this one play .WAV files too.. AFA AndyW The last one I'll write converts raw sounds to .WAV files.. James S WI Andy, do you have one that will send do a SysBeep2 so I can play a "Task Compleat" sound at James S WI the end of a build? AFA AndyW That would be very simple to do.. MikeHacket Hmm, I was looking for something like that a while ago. AFA AndyW a simple.. AFA AndyW SysBeep2(atoi(argv[1])); would do it.. James S WI Andy, do you handle > 8 bit .WAV files? AFA AndyW Nope.. AFC DYAJim I already made a quick util like that for myself, James :) AFA AndyW If it's stereo or 16 bits, the program will tell you and abort.. AFC DYAJim It does a sysbeep2 at the end of my builds to alert me, and also to unblank the screen. James S WI Andy, why not? AFA AndyW Because I don't know what the data portions format is.. AFC DYAJim I wrote an accompanying shell script that only calls the beep EXE if a certain shell variable is .. AFA AndyW Raw 8 bit files are simple sounds.. James S WI Jim, I thought you always did a restart at the end of your builds. At least theT2 build. AFC DYAJim .. set, so I can compile a whole bunch of makefiles at once (each with a BEEP at their end) without AFC DYAJim hearing any of their beeps! And then just one beep at the end. It was pretty cool :) AFC DYAJim James: what about modules? Also sometimes when I am just recompiling a part of the CDev, no reboot .. AFC DYAJim .. is necessary :) James S WI Ahhh AFC DYAJim I think I might have even suggested to Mike that he put an automatic Sysbeep2(taskCompleted) in Orca, AFC DYAJim and I think he suggested to just make your own EXE :) AFC DYAJim that was awhile ago tho James S WI Mike, do you think you could add some extended keyboard supprt to Splat!? I keep hitting James S WI page up and down and Splat! does starnge things in responce. AFA AndyW Want the source to a beep exe? AFA AndyW I can type it in by hand.. AFA AndyW #include AFA AndyW #include AFA AndyW AFA AndyW int main(argv[]); AFA AndyW { MikeHacket Yeah, I'd like to add extended keyboard support, perhaps in the next version. AFA AndyW SysBeep2(atoi(argv[1]); AFA AndyW } AFA AndyW AFA AndyW That's the whole thing, unless you want to put a #pragme optimize -1 at the James S WI Mike, when is that? AFA AndyW beginning.. AFA AndyW Whoops.. Left out a ) in there.. MikeHacket James, I'm not sure yet. I've got a couple of projects that I'd really like AFL GaryJ What else have you been working on? (Anything that you intend to release?) MikeHacket to get going on first, but I would guess, in a couple of months. MikeHacket Yes, I do intend to release some stuff, but it's all too early to comment on. MikeHacket I don't want to be held to anything! :-) AFL GaryJ Why not? This would be the time that everyone else would have out the advertisements and the AFL GaryJ t-shirts! AFL GaryJ :) AFA AndyW Well, if you need any beta testers, I'm still available for that! James S WI And the mouse pads! AFL GaryJ Anyone else have any programming questions/comments? AFL GaryJ (Debugging or otherwise) AFL GaryJ Next week is C and Pascal programming... AFL GaryJ Then in two weeks.... AFL GaryJ We're going to do another ADV Trivia Night! MikeHacket Don't worry, you'll hear from me when I'm ready! :-) Matt DTS Oh boy! AFA AndyW Yeah.. I still need to find out if licensing has an email address, and if so, AFA AndyW what it is.. AFL GaryJ We'll be giving away free online time for our trivia contest. Matt DTS What do I get if I win? :) AFL GaryJ Um... well, hmm... SoftdiskGS Front row seats at the end of the world, Matt... :) Just Marty Give him a new debugger :) SoftdiskGS Free copies of IR, I think... MikeHacket Well, it's been a blast, but I'm outta here. Take care everyone! AFC DYAJim Trivia rules :) AFC DYAJim See ya soon, Mike! Just Marty When's OE going to be released Andy? BCS Frank I'll second that question! AFA AndyW I'm waiting on the guy who's doing the documentation.. As soon as I have the AFC Softy "Second quarter of......" ;D AFA AndyW proofs, I'll have them printed.. AFL GaryJ Matt: If you win (at ADV Trivia), you'll get to award the prize to the next eligible AFL GaryJ winner :) AFA AndyW I have all the disks, labels, master disk, etc.. Just Marty it's getting as bad as apple releasing system software BCS Frank Soft... that's "Fifth quarter of...." James S WI When Andy stops playing with sounds and .WAVs. James S WI testing AFA AndyW I just sent him a note today.. AFA AndyW James, I'm doing that while waiting on the documentation.. AFA AndyW Gotta do something while I'm waiting.. AFA AndyW Although, I'v added a couple minor script file changes to OE in the meantime AFA AndyW too.. AFA AndyW \a is OA key pressed for next char, \p pause, \$ or \x hex value of char AFA AndyW follows, \n type out name of last person to enter/leave room.. AFC Softy (now if OE could only fix the WAOL to A2AOL file xfer problems... :D) AFA AndyW Can't do it.. AOL is interpreting data being sent back to it improperly, and AFA AndyW then returning that error that you just mentioned..