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]
Other format: [Raw text]

Re: [RFA] Arm: change #defines to enums


Richard Earnshaw wrote:
> 
> > >
> > > I also can't really see how
> > >
> > > ! enum gdb_arm_const {
> > > !   INT_REGISTER_RAW_SIZE = 4,
> > > !   INT_REGISTER_VIRTUAL_SIZE = 4,
> > > !
> > > ...
> > >
> > > will make debugging easier, in fact I would say it would be more
> > > confusing, since gdb won't know which one to use when displaying a value.
> >
> > The idea is just that, if I'm debugging and I see
> > INT_REGISTER_RAW_SIZE in an expression, I can find out
> > what its value is.
> 
> (Well, dwarf2 debug info should be able to tell you (if you've turned the
> level up enough to add that detail :-)
> 
> However, The main problem I have with the above, is that ..._RAW_SIZE and
> .._VIRTUAL_SIZE should be in different enums.
> 
> Just because C doesn't apply a strict typing model to enums (sadly), is no
> reason to abuse these.  A variable holding a RAW_SIZE value shouldn't also
> be holding a VIRTUAL_SIZE, the two are different and hence the enums
> describing them should be also.

OK then -- I've committed only the regnums.

Michael


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