Installing and Using the MinGW Cross-Compiler on Mac OS X

07 Dec 2004, 15:13 PST

MinGW supplies header files, import libraries, and a compiler tool-chain based on GNU cc and binutils for building native Windows executables and libraries with no dependencies on third party libraries.

I am using the MinGW tool-chain to compile the Win32 port of OpenDarwin libFoundation. To cross-compile the library on my Mac OS X machine, I created DarwinPorts Portfiles for the MinGW tool-chain.

In this article I'll document how to install the MinGW ports, build a "Hello, World" example, and run the result on a x86 machine using Wine.

Read more ...

Fixing ptrace(pt_deny_attach, ...)

10 Oct 2004, 13:13 PDT

NOTE: For information on Mac OS X Tiger, refer to this article.

In Mac OS X, Apple introduced an additional, non-standard request type to the ptrace() system call - PT_DENY_ATTACH. While an understandable addition, especially in terms of providing plausible defense for their DRM applications, PT_DENY_ATTACH has come to be used by a number of third party developers in an attempt to provide further copy protection.

This is unfortunate for those of us with a genuine need to attach a debugger; There are several circumstances when this ability is necessary, including working with libSystem, writing a runtime patch with APE, writing a kext, writing an input manager, or software auditing.

There are several possible ways to work around this behavior; breaking on ptrace(2) in gdb, recompiling your kernel, or writing a kext. I choose to write a kext that hooks ptrace(2).

Read more ...

Accessing My Sources Using Arch

12 Sep 2004, 21:43 PDT

GNU Arch, while incredibly obtuse, has a relatively unique featureset that I've come to appreciate. As such, I've begun using it for my externally available source code. There are two projects currently available in my arch repository - the project containing this web log, and TclObjC, a Tcl<->Obj-C bridge that I have been working on.

If you want to browse my arch repository, just point your web browser at my ArchZoom interface. To access the repository directly, you'll need the arch client, tla. If you're using Mac OS X or Darwin, you can use DarwinPorts to install it. Once you have arch installed, use the commands below to access my archive.

Read more ...

Introduction / Implementation

07 Jul 2004, 12:44 PDT

For quite some time I have wanted an easy means of sharing information in a semi-attractive format while expending the least possible effort. To this end, I have finally assembled a web log based on Blosxom, Arch, and duct tape.

All my modifications to blosxom and various blosxom plugins can be accessed via my arch repository. See this post for details on accessing the arch repository.