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: PR11067 patch


On 02/08/10 16:54, Tom Tromey wrote:
"Chris" == Chris Moller<cmoller@redhat.com> writes:

Chris> The attached patch fixes bug 11067 "p<enum constant> should print the Chris> constant's value" by providing a means of setting a format string to Chris> be used in printing enums. The string is set with

Chris> set enum-fmt<string>

I would rather not introduce a new option for this, particularly a
formatting option.  We don't have this sort of thing elsewhere in gdb --
we just pick a printing format or two.

I re-read the thread on the archer list.  I propose having it print
like:

$2 = ENUMERATOR = (enum tag) 23

However, i would suppress the extra stuff in structs and when printing
in summary mode.

Okay. I'll have to figure out how to determine if I'm in structs (or, I suppose, unions, arrays, and any other high-data-volume circumstance that might occur.


cm

Tom


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