From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32638 invoked by alias); 3 Dec 2012 09:31:29 -0000 Received: (qmail 32629 invoked by uid 22791); 3 Dec 2012 09:31:29 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-bk0-f41.google.com (HELO mail-bk0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Dec 2012 09:31:19 +0000 Received: by mail-bk0-f41.google.com with SMTP id jg9so977943bkc.0 for ; Mon, 03 Dec 2012 01:31:18 -0800 (PST) Received: by 10.204.4.145 with SMTP id 17mr2687471bkr.34.1354527078280; Mon, 03 Dec 2012 01:31:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.32.12 with HTTP; Mon, 3 Dec 2012 01:30:38 -0800 (PST) In-Reply-To: References: <50AC3217.6040608@mentor.com> From: Hui Zhu Date: Mon, 03 Dec 2012 09:31:00 -0000 Message-ID: Subject: Re: [PATCH] Add CTF support to GDB [1/4] Add "-ctf" to tsave command To: "Abid, Hafiz" Cc: "Zhu, Hui" , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00017.txt.bz2 On Wed, Nov 21, 2012 at 2:47 PM, Abid, Hafiz wrote: > >> -----Original Message----- >> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- >> owner@sourceware.org] On Behalf Of Zhu, Hui >> Sent: Wednesday, November 21, 2012 1:45 AM >> To: gdb-patches@sourceware.org >> Subject: [PATCH] Add CTF support to GDB [1/4] Add "-ctf" to tsave >> command >> >> This patch is for the CTF write. >> It add "-ctf" to tsave command. With this option, tsave can save >> current trace frame to CTF file format. >> >> Thanks, >> Hui >> >> 2012-11-20 Hui Zhu >> >> * Makefile.in (REMOTE_OBS): Add ctf.o. >> (SFILES): Add ctf.c. >> (HFILES_NO_SRCDIR): Add ctf.h. >> * ctf.c, ctf.h: New files. > Some more comments in these file will help understand the code better. Most of the function don't have any comments in the start so it is difficult to follow. > >>+ case TYPE_CODE_INT: >>+ /* XXX: didn't check !TYPE_NOSIGN (t->type) because char is >>+ signed in C. */ > This statement is not completely true. I think it is left to implementation to decide the signed-ness of char. I think type struct already include all the info of this type. I think it because this comment is not clear. I will make it clear in the new patch. > >>+ /* XXX: no sure about variable_length >>+ and need set is_variable_length if need. */ > This comment is confusing. I will update it. Thanks, Hui > >>+ warning (_("\ >>+Traceframe %d is dropped because try to get the value of \"%s\" got error: %s"), > >>+ warning (_("\ >>+Not save \"%s\" of tracepoint %d to ctf file because get its value fail: %s"), > Many error and warning messages need some improvement. > >> * mi/mi-main.c (ctf.h): New include. >> (mi_cmd_trace_save): Add "-ctf". >> * tracepoint.c (ctf.h): New include. >> (collect_pseudocommand): Remove static. >> (trace_save_command): Add "-ctf". >> (_initialize_tracepoint): Ditto. >> * tracepoint.h (collect_pseudocommand): Add extern.