Page 1 of 1

Debugging under Codewarrior?

Posted: Wed Dec 16, 2009 11:37 pm
by al_14
Should it be possible to run Metrowerks Codewarrior debugger in SheepShaver? When I tried Codewarrior 6 and hit a breakpoint in the debugger, SheepShaver crashed.

I saw a post back from 2004 where someone was trying to use CW5 debugger and SheepShaver crashed. Just wanted to check to see if anything has changed since then.

I was actually using MWDebug 1.7.4 (not the integrated debugger) with MetroNub 1.4.2 -- a combination that I use on my "real" OS9 machine. I haven't tried Codewarrior 8 with the integrated debugger under SheepShaver yet.

MacsBug 6.6.3 doesn't seem to load either although that's not as critical.

Re: Debugging under Codewarrior?

Posted: Wed Feb 24, 2021 7:40 am
by Ian Blackbird
Greetings,

i'am replying to this over 10 years old thread because it seems to address my issue with SheepShaver.
My plan is to get myself into classic Mac OS software development.
Currently i'am using CodeWarrior 4 Pro on Mac OS 7.6.1 inside SheepShaver 2.5 (The notarized package 10 February 2021 from github.com/kanjitalk755/macemu) running on macOS Big Sur 11.2.1.

Everything runs pretty fine except for debugging inside the emulator. When debugging 68k the call stack and the local variables are never shown. When debugging PPC SheepShaver crashes.

Is this still an issue because of unimplemented opcodes or am i doing something wrong?

Regards,
Ian

Re: Debugging under Codewarrior?

Posted: Thu Feb 25, 2021 5:53 am
by kanjitalk755
SheepShaver doesn't seem to be able to execute the instructions required by the debugger.
If your target is runnable on Mac OS 9, I recommend using QEMU.

Re: Debugging under Codewarrior?

Posted: Thu Feb 25, 2021 8:57 am
by Ian Blackbird
kanjitalk755 wrote: Thu Feb 25, 2021 5:53 amSheepShaver doesn't seem to be able to execute the instructions required by the debugger.
I've been afraid to hear that.
Would it make sense to file this as an issue in your github repo?
kanjitalk755 wrote: Thu Feb 25, 2021 5:53 am If your target is runnable on Mac OS 9, I recommend using QEMU.
I wanted to target system 7 as well. That's why it would be nice to be able to debug 68k & PPC code on the same environment.

Re: Debugging under Codewarrior?

Posted: Thu Feb 25, 2021 11:26 am
by kanjitalk755
Ian Blackbird wrote: Thu Feb 25, 2021 8:57 am Would it make sense to file this as an issue in your github repo?
Modifying the PPC emulation code is difficult and it is not a feature that normal users need.
Therefore I will not modify it.
Ian Blackbird wrote: Thu Feb 25, 2021 8:57 am I wanted to target system 7 as well. That's why it would be nice to be able to debug 68k & PPC code on the same environment.
Currently, I think it's best to debug 68k (system 7) with BasiliskII and debug PPC with QEMU.

Re: Debugging under Codewarrior?

Posted: Thu Feb 25, 2021 4:41 pm
by adespoton
Can SheepShaver use the BII debugger environment? Sure, it's not the CW debugger, but it can see things CW can't.

Re: Debugging under Codewarrior?

Posted: Fri Feb 26, 2021 3:26 am
by kanjitalk755
The latest source can use cxmon with configure flag --with-mon.

Re: Debugging under Codewarrior?

Posted: Thu Jun 10, 2021 9:17 pm
by ronr
I'm having partial success, using CodeWarrior 10 and SheepShaver 2.5. My app runs fine, and when Enable Debugger is chosen, the debugger .SYM window and the Stack window appear. I can set breakpoints in the .SYM window's source code view, but the Stack window does not show the Stack or Source. The debugger is working, sort of, since it stops if I set a breakpoint in the .SYM window, but that's not very helpful since I can't see anything in the Stack window. I am not experiencing any crashes, but I also can't really debug productively. Something must be missing, but I have no idea what.

Re: Debugging under Codewarrior?

Posted: Fri Jun 11, 2021 3:06 pm
by adespoton
ronr wrote: Thu Jun 10, 2021 9:17 pm I'm having partial success, using CodeWarrior 10 and SheepShaver 2.5. My app runs fine, and when Enable Debugger is chosen, the debugger .SYM window and the Stack window appear. I can set breakpoints in the .SYM window's source code view, but the Stack window does not show the Stack or Source. The debugger is working, sort of, since it stops if I set a breakpoint in the .SYM window, but that's not very helpful since I can't see anything in the Stack window. I am not experiencing any crashes, but I also can't really debug productively. Something must be missing, but I have no idea what.
I've had issues with the CW debugger in the past in SS and it looked like it was attempting to use traps that were patched, resulting in instability at best or crashes at worst. Since then I've disabled the debugger extension, and stick to cxmon or gdb from the host. A shame, since the symbols are all there for the using.

Re: Debugging under Codewarrior?

Posted: Thu Dec 01, 2022 4:54 am
by siddhartha
It sure would be nice to have the Debugger and related traps in SheepShaver. QEMU is great, but the OS sharing of the Windows clipboard with SheepShaver, mountable host drives, ability to reboot, mouse smoothing, and the customizable keycodes make it much easier to use.

Re: Debugging under Codewarrior?

Posted: Thu Dec 01, 2022 4:50 pm
by adespoton
siddhartha wrote: Thu Dec 01, 2022 4:54 am It sure would be nice to have the Debugger and related traps in SheepShaver. QEMU is great, but the OS sharing of the Windows clipboard with SheepShaver, mountable host drives, ability to reboot, mouse smoothing, and the customizable keycodes make it much easier to use.
Theoretically, it should be possible to add all the CW debugger primitives to cxmon or go through the work of correctly implementing the traps... but that would require someone with the knowledge, skill and time to do it.

Feel up for a different type of challenge than usual, Sid?