This patch is another step towards the promised land of accurately-restored tracepoint definitions. For those just tuning in, the problem is that in both the disconnected tracing and the trace file cases, it's very difficult to use tracepoints if the definitions in GDB do not match up with what was used to create the trace frames on the target or in the file. This patch takes a more audacious approach that seems to work well in practice; it literally downloads and uploads the original source form of the tracepoint, whitespace and all. As freaky as it sounds, it works because if the source strings don't parse (because the executable has changed, for instance), then there is almost no chance that the trace frame data is going to be meaningful at the symbolic level. This is not quite the end of the story, the heuristic matchup of new/old tracepoints still needs work, and there are some minor patches still queued up. For testing, I'll add to the tfile.exp test after incorporating Pedro's feedback from the previous patch. I'll hold off committing this for a couple days in case anybody has comments. Stan 2010-03-25 Stan Shebs * tracepoint.h (struct uploaded_string): New struct. (struct uploaded_tp): New fields for source strings. * breakpoint.c (this_utp, next_cmd): New globals. (read_uploaded_action): New function. (create_tracepoint_from_upload): Fill in more parts of a tracepoint. * tracepoint.c (encode_source_string): New function. (trace_save): Write out source strings, fix error checks. (parse_tracepoint_definition): Add source string parsing. * remote.c (PACKET_TracepointSource): New packet type. (remote_download_command_source): New function. (remote_download_tracepoint): Download source pieces also. (_initialize_remote): Add packet config command. * gdb.texinfo (Tracepoint Packets): Describe QTDPsrc. (General Query Packets): Describe TracepointSource.