From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10676 invoked by alias); 20 Jun 2014 08:00:19 -0000 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 Received: (qmail 10663 invoked by uid 89); 20 Jun 2014 08:00:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jun 2014 08:00:17 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wxtk5-0006j2-Ha from Yao_Qi@mentor.com ; Fri, 20 Jun 2014 01:00:13 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 20 Jun 2014 01:00:13 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Fri, 20 Jun 2014 01:00:12 -0700 Message-ID: <53A3E9A8.4080305@codesourcery.com> Date: Fri, 20 Jun 2014 08:00:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tom Tromey , Subject: Re: [RFC] auto-generate most target debug methods References: <1403208237-27023-1-git-send-email-tromey@redhat.com> In-Reply-To: <1403208237-27023-1-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00725.txt.bz2 On 06/20/2014 04:03 AM, Tom Tromey wrote: > +static void > +target_debug_print_unsigned_char_p (unsigned char *sigs) > +{ > + fputs_unfiltered ("{", gdb_stdlog); > + if (sigs != NULL) > + { > + int i; > + > + for (i = 0; i < GDB_SIGNAL_LAST; i++) > + if (sigs[i]) > + fprintf_unfiltered (gdb_stdlog, " %s", gdb_signal_to_name (i)); > + } > + fputs_unfiltered (" }", gdb_stdlog); > +} This function should be renamed to target_debug_print_signal, for example, and typedef unsigned char * signal, if I understand your script correctly. > +/* Printers for the debug target. Each prints an object of a given > + type to a string that needn't be freed. In a few cases, a new > + typedef is introduced just to override the normal printing approach > + for the underlying type; see target.h for those. Most printers are > + macros, for brevity, but a few are static functions where more > + complicated behavior is needed. > + > + References to these printers are automatically generated by > + make-target-delegates. See the generated file target-delegates.c. > + > + A few methods are still handled explicitly in target.c: > + target_fetch_registers target_store_registers target_xfer_partial This isn't valid to me. I do see debug_fetch_registers, debug_store_registers and debug_xfer_partial are generated. > + target_fileio_* target_close target_info_proc > + > + In most cases this is because target delegation hasn't been done for > + the method. */ Otherwise, this patch looks good. -- Yao (齐尧)