This is the mail archive of the gdb-prs@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]

[Bug c++/19552] New: useless output from "whatis" with an enum


https://sourceware.org/bugzilla/show_bug.cgi?id=19552

            Bug ID: 19552
           Summary: useless output from "whatis" with an enum
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

While debugging firefox I tried asking gdb:

(gdb) whatis nsresult
type = nsresult

This result is not very helpful.

"ptype" is there but in this case it prints a lot of output,
about 20K of text.

The real answer is that nsresult is an enum.

This can be reproduced using a simple c++ example:

enum E { A,B, C};

E e;


Here I get:

(gdb) whatis E
type = E


Perhaps gdb could be more verbose in C++.
For example it could print the tag, so "enum E" or "class E".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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