public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/11067] New: p <enum constant> should print the constant's value
@ 2009-12-08 21:48 jyasskin at gmail dot com
  2009-12-08 21:51 ` [Bug gdb/11067] " ppluzhnikov at google dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jyasskin at gmail dot com @ 2009-12-08 21:48 UTC (permalink / raw)
  To: gdb-prs

$ cat test.c
enum E {
Val1,
Val2
};
int main() {
    enum E e = Val1;
    return e;
}

...
Temporary breakpoint 1, main () at test.c:6
6           enum E e = Val1;
(gdb) n
7           return e;
(gdb) p e
$1 = Val1
(gdb) p Val1
$2 = Val1
(gdb) p (int)Val1
$3 = 0


When I print a variable, printing the symbolic name for its value is right, but 
when I print the symbolic name, gdb should print its numeric value instead (or 
in addition).

There's an easy workaround, of course, but gdb should DTRT in the first place.

-- 
           Summary: p <enum constant> should print the constant's value
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jyasskin at gmail dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11067] p <enum constant> should print the constant's value
  2009-12-08 21:48 [Bug gdb/11067] New: p <enum constant> should print the constant's value jyasskin at gmail dot com
@ 2009-12-08 21:51 ` ppluzhnikov at google dot com
  2010-02-06 13:26 ` cmoller at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ppluzhnikov at google dot com @ 2009-12-08 21:51 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppluzhnikov at google dot
                   |                            |com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=11067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11067] p <enum constant> should print the constant's value
  2009-12-08 21:48 [Bug gdb/11067] New: p <enum constant> should print the constant's value jyasskin at gmail dot com
  2009-12-08 21:51 ` [Bug gdb/11067] " ppluzhnikov at google dot com
@ 2010-02-06 13:26 ` cmoller at redhat dot com
  2010-02-16  2:49 ` cmoller at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cmoller at redhat dot com @ 2010-02-06 13:26 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware dot|cmoller at redhat dot com
                   |org                         |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=11067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11067] p <enum constant> should print the constant's value
  2009-12-08 21:48 [Bug gdb/11067] New: p <enum constant> should print the constant's value jyasskin at gmail dot com
  2009-12-08 21:51 ` [Bug gdb/11067] " ppluzhnikov at google dot com
  2010-02-06 13:26 ` cmoller at redhat dot com
@ 2010-02-16  2:49 ` cmoller at redhat dot com
  2010-02-16  3:58 ` ppluzhnikov at google dot com
  2010-02-16  5:17 ` jyasskin at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cmoller at redhat dot com @ 2010-02-16  2:49 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From cmoller at redhat dot com  2010-02-16 02:49 -------
Lacking any consensus on the utility, implementation, or display format for this
enhancement, and the evolving mutually exclusive requirements, there's no way to
make this enhancement work.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |WONTFIX


http://sourceware.org/bugzilla/show_bug.cgi?id=11067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11067] p <enum constant> should print the constant's value
  2009-12-08 21:48 [Bug gdb/11067] New: p <enum constant> should print the constant's value jyasskin at gmail dot com
                   ` (2 preceding siblings ...)
  2010-02-16  2:49 ` cmoller at redhat dot com
@ 2010-02-16  3:58 ` ppluzhnikov at google dot com
  2010-02-16  5:17 ` jyasskin at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ppluzhnikov at google dot com @ 2010-02-16  3:58 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From ppluzhnikov at google dot com  2010-02-16 03:58 -------
For those not following the discussion, Chris attempted two
separate patches:
http://sourceware.org/ml/gdb-patches/2010-02/msg00179.html
http://sourceware.org/ml/gdb-patches/2010-02/msg00279.html

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gdb/11067] p <enum constant> should print the constant's value
  2009-12-08 21:48 [Bug gdb/11067] New: p <enum constant> should print the constant's value jyasskin at gmail dot com
                   ` (3 preceding siblings ...)
  2010-02-16  3:58 ` ppluzhnikov at google dot com
@ 2010-02-16  5:17 ` jyasskin at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jyasskin at gmail dot com @ 2010-02-16  5:17 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jyasskin at gmail dot com  2010-02-16 05:17 -------
Thanks, Chris, for your work on this. I guess such a simple change was just asking 
to be bikeshedded into oblivion.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11067

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-16  5:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-08 21:48 [Bug gdb/11067] New: p <enum constant> should print the constant's value jyasskin at gmail dot com
2009-12-08 21:51 ` [Bug gdb/11067] " ppluzhnikov at google dot com
2010-02-06 13:26 ` cmoller at redhat dot com
2010-02-16  2:49 ` cmoller at redhat dot com
2010-02-16  3:58 ` ppluzhnikov at google dot com
2010-02-16  5:17 ` jyasskin at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).