Debugging under Codewarrior?

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
al_14
Space Cadet
Posts: 1
Joined: Tue Dec 15, 2009 11:34 pm

Debugging under Codewarrior?

Post 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.
User avatar
Ian Blackbird
Space Cadet
Posts: 3
Joined: Wed Feb 24, 2021 7:27 am
Location: Germany

Re: Debugging under Codewarrior?

Post 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
„Conspiracies are hard. Never assume conspiracy when ignorance or stupidity will do.“
kanjitalk755
Mac Mechanic
Posts: 193
Joined: Thu Nov 09, 2017 12:06 pm

Re: Debugging under Codewarrior?

Post 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.
User avatar
Ian Blackbird
Space Cadet
Posts: 3
Joined: Wed Feb 24, 2021 7:27 am
Location: Germany

Re: Debugging under Codewarrior?

Post 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.
„Conspiracies are hard. Never assume conspiracy when ignorance or stupidity will do.“
kanjitalk755
Mac Mechanic
Posts: 193
Joined: Thu Nov 09, 2017 12:06 pm

Re: Debugging under Codewarrior?

Post 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.
User avatar
adespoton
Forum All-Star
Posts: 3383
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Debugging under Codewarrior?

Post by adespoton »

Can SheepShaver use the BII debugger environment? Sure, it's not the CW debugger, but it can see things CW can't.
kanjitalk755
Mac Mechanic
Posts: 193
Joined: Thu Nov 09, 2017 12:06 pm

Re: Debugging under Codewarrior?

Post by kanjitalk755 »

The latest source can use cxmon with configure flag --with-mon.
ronr
Space Cadet
Posts: 1
Joined: Thu Jun 10, 2021 8:43 pm

Re: Debugging under Codewarrior?

Post 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.
User avatar
adespoton
Forum All-Star
Posts: 3383
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Debugging under Codewarrior?

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