From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32512 invoked by alias); 1 Sep 2010 18:38:12 -0000 Received: (qmail 32497 invoked by uid 22791); 1 Sep 2010 18:38:11 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 18:38:05 +0000 Received: (qmail 29972 invoked from network); 1 Sep 2010 18:38:03 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Sep 2010 18:38:03 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 1/9]#2 Rename `enum target_signal' to target_signal_t Date: Wed, 01 Sep 2010 18:38:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Jan Kratochvil , Joel Brobecker , Eli Zaretskii , Mark Kettenis References: <20100901181830.GB2986@adacore.com> <20100901182943.GA23673@host1.dyn.jankratochvil.net> In-Reply-To: <20100901182943.GA23673@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201009011938.02189.pedro@codesourcery.com> 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: 2010-09/txt/msg00040.txt.bz2 On Wednesday 01 September 2010 19:29:43, Jan Kratochvil wrote: > I found target_signal_t to be more convenient than `struct target_signal'. > Some coding styles never use the `struct' types and always use typedef for any > struct defined (more matching C++). target_signal operations are mostly fully > encapsulated in the patch so it does not have to be clear to its user it is in > fact a dereferencable struct. > > Another point I was tracking with these changes is to make the patching > easier=automatic. I can do s/\benum target_signal\b/target_signal_t/g and be > done with it as strlen rhs is smaller than strlen of lhs. > `struct target_signal' is longer and thus causing line wrapping requiring many > adjustments of GNU coding style 78 columns compliance by hand. Weren't you proposing to end up with something like "typedef struct target_signal target_signal"? Then you'd do "s/enum target_signal/target_signal/g" , which is shorter. > (This reindentation affects also the typedef name `gdb_target_signal_t' > although it would not affect `gdb_target_signal'. Still there would be less > reindentation cases than in the `struct gdb_target_signal' case.) Everything that's behind the debug API abstraction is currently called target_... (mostly target_ops and its methods), which is I think the reason `enum target_signal' is called what it is called. But, if you guys want to rename the type, I won't stand in the way, thought I'd suggest simply gdb_signal. One of "gdb or "target" in "gdb_target" appears redundant to me. -- Pedro Alves