This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: PR 11067


On 02/03/10 17:48, Tom Tromey wrote:
"Roland" == Roland McGrath<roland@redhat.com> writes:

Roland> I think it should use a format consistent with p/c, e.g.: Roland> (gdb) p 'a' Roland> $1 = 97 'a' Roland> (gdb) p ENUM1 Roland> $2 = (enum frobozz) 1 ENUM1

Works for me. Chris, please do it this way, thanks.

Okay, a whole 5-line patch yields


   (gdb) p e
   $1 = (enum E) 56 Val1
   (gdb) p Val1
   $2 = (enum E) 56 Val1
   (gdb)

(The enum, BTW, is

   num E {
      Val1 = 56,
      Val2
   };

because you can find a 0 any old place.)

Personally, I think

$2 = (enum E) 56 Val1

is a bit hard to read. I'd vote for something like

$2 = (enum E)56 'Val1'

But whatever...


Tom


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