This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: patch for sparc-tdep.c for NetBSD/sparc.


>>>>> "Michael" == Michael Snyder <msnyder@cygnus.com> writes:
>> It's better, but I think the suggestions were to add the following
>> macros.
>> 
>> #define GDB_GREGSET_T   struct reg
>> #define GDB_FPREGSET_T  struct fpreg
>> 
>> as that is a more direct way of defining the types.

Michael> I really like typedefs better.  They are debuggable, 
Michael> #defines are not.

I don't see that this is much different than the GDB_{G,FP}REGSET_T
macro definitions in gregset.h.  Those definitions are set to types
by default, but they are only used in to define gdb_{g,fp}regset_t,
the types which are actually used throughought the rest of the code.

It seems wrong to not define GDB_{G,FP}REGSET_T explicitly, but rather
to define the {g,fp}regset_t types which are only used to define the
type of gdb_{g,fp}regset_t if GDB_{G,FP}REGSET_T is not defined.

I'm not clear to me what added debuggability the extra layer of
obfucation provides.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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