Provides a little more info on enums for simple 'p<enum>' cases;
keeps the old format for complex cases like structs and arrays:
I feel really bad about this, and I really apologize - I am just only
suddenly wondering why this is considered a good idea, was that discussed?
Please understand that this is not an objection, but I just had a look
at the PR, and I happen to disagree with the reporter. According to me,
he said:
1. If I print 'e', GDB prints 'Val1' and that's OK.
2. If I print 'Val1', GDB prints also prints 'Val1' and he says
that, instead, GDB should print its numerical value.
I disagree on (2) because, if he wanted the numerical value, he should
have told GDB. For instance:
(gdb) p GREEN
$1 = GREEN
(gdb) p /d GREEN
$2 = 1
If people still think that this suggestion is a good one, I looked at
the patch (the least I could do)...