This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 1/9]#2 Rename `enum target_signal' to target_signal_t


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]