I don't know if we want to get into this amount of private APIs and modifying OS-private structures, especially for something that's just a debugging aid.
Is it possible to move away from the Mach thread port usage but also stick with public APIs (even if that doesn't allow cross-thread naming)?