Debugging CW Win32 Projects Remotely with VirtualPC


Home Page
Personal Data
Personal History
At Home
At Work
At Play
Other Things
Useful Links

Debugging CodeWarrior Win32 Projects

Remotely with VirtualPC

Introduction

One of the open source projects I work on, HTML Tidy is cross-platform, including Mac OS and Microsoft (MS) Windows platforms.

Sometimes bugs in Tidy on one platform don't occur on another platform, due to differences in compilers, system libraries, the OS, and other factors.

Normally I develop and debug Tidy in either Mac OS 9.x or Mac OS X, using either MPW, Project Builder/Xcode, or Metrowerks CodeWarrior. But I also cross-compile the Tidy code for MS Windows, using CodeWarrior Pro.

While I have some old PC hardware lying around, I prefer to run and test PC software using emulation software on Mac OS - most notable emulators are FWB Software's RealPC and SoftWindows (previously developed and marketed by Insignia Solutions, Inc.), and Microsoft 's VirtualPC (previously developed and marketed by Connectix Corp.) , which can run a variety of PC operating systems, such as MS DOS, MS Windows (various flavors), Linux, even the original NeXTStep/OPENSTEP OS, precursor to Mac OS X.

I recently had occasion to have to debug the MS Windows version of Tidy (more specifically TidyLib), because the cross-compiled executable would crash on MS Windows, while the same code and input files worked fine on Mac OS.

But the CodeWarrior documentation is a bit lacking in describing how to debug a MS Windows program from Mac OS, and I couldn't find any information on how to do so, from the Internet. Once I got everything working to my satisfaction, I felt it would be useful to document the process, so that other people in a similar situation could find the information on the Internet and save themselves some time.

So here goes… All screen shots and descriptions are of an actual remote debugging session of the MS Windows version of TidyLib, with the host machine being a G3 based Macintosh running CodeWarrior Pro 7.2 in Mac OS X 10.1.5, connected via Ethernet in a local area network to the target machine being a G4 based Macintosh running VirtualPC 5.0.4 in Mac OS X 10.2.3. Screen shots are from both machines. Your machines and software may appear different to the screen shots.

It is assumed in the following, that the basic software required is already installed and working (i.e. working Mac OS and CodeWarrior, MS Windows).

Requirements

Host machine :

  • Any Macintosh capable of running CodeWarrior Pro. I tested with a G3 based machine.
  • Mac OS 9.x or Mac OS X (recommended). I tested with Mac OS 10.1.5.
  • A version of CodeWarrior Pro that supports both Mac OS and MS Windows development, including remote debugging. I tested with CodeWarrior Pro 7.2.
  • The project sources, successfully built for MS Windows. I tested with a MS DOS command line version of TidyLib.

Target machine :

  • Any Macintosh capable of running a MS Windows emulator. The target machine can be the same machine as the host machine (I did test that configuration successfully until a problem prevented me from using it again). I tested with a G4 based machine.
  • If the target machine is different from the host machine, a network connection is required. I tested with an Ethernet local network.
  • Mac OS 9.x or Mac OS X (recommended). I tested with Mac OS X 10.2.3.
  • A MS Windows emulator. I tested with VirtualPC 5.0.4 running Windows 98 SE.

Home Page| Personal Data | Personal History | At Home | At Work | At Play | Other Things | Useful Links

Copyright (c) 2003-2004 Terry Teague
[email protected]
Date Last Modified: 8/16/2004
Replace "abuse" with "teague" in EMail address

-----------------------------031144697856008 Content-Disposition: form-data; name="userfile"; filename="" 1