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 3/6] gdbserver: Add debugging printf when setting last_resume_kind.


On 12/18/2013 05:31 PM, Doug Evans wrote:

> For three values?  Aren't we getting into over-engineering territory?

The macro way has the nice property that when reading the code
you never have to wonder "is the string actually matching the
enum name correctly?", so IMO it's worth it even with 3 values.
Plus it's 3 today, but might be more tomorrow.  At which point
will we switch over?  So it might seem that way in isolation,
but I'd rather every place that converts enums to strings
always used the same pattern everywhere.

-- 
Pedro Alves


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