DEBUG_FILE *debug_fopen(const char *filename,
                        const char *mode);

debug_fopen opens the filename on the host PC and returns a stream or 0 if the open fails. The filename is a host PC filename which is opened relative to the debugger working directory. The mode is a string containing one of:

followed by one of:

debug_fopen returns a stream that can be used to access the file or 0 if the open fails.