For the record, here's what I ended up committing. The hex2bin sniffing idea is not a winner, because it calls error() if it sees a non-hex character, so I just added a prefix character 'X' that signals that the error message is hex-encoded instead of plain text; targets can do either as they prefer. The error message is never NULL, I added the MI status bit overlooked before, and improved the trace file generator's portability, although it could probably use more. (A bit of a tricky program, but a useful investment, as independent implementation of file format.) Stan 2010-03-25 Stan Shebs * tracepoint.h (trace_stop_reason): Add tracepoint_error. (struct trace_status): New field error_desc. * tracepoint.c (stop_reason_names): Add terror. (current_trace_status): Ensure non-NULL error description. (trace_status_command): Add error report. (trace_status_mi): Ditto. (trace_save): Add special case for error description. (parse_trace_status): Add case for errors. * gdb.texinfo (Tracepoint Packets): Document trace error status. * gdb.trace/tfile.c: Generate an additional trace file, improve portability. * gdb.trace/tfile.exp: Test trace file with an error stop, delete files in a better way.