public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/10676] New: Would like an equality compare method for gdb.Type
@ 2009-09-21  8:28 alexl at redhat dot com
  2009-09-21 16:24 ` [Bug python/10676] " tromey at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: alexl at redhat dot com @ 2009-09-21  8:28 UTC (permalink / raw)
  To: gdb-prs

I'm doing quite a lot of type comparison in e.g. pretty printers. It would be
nice if i could compare types with ==, rather than having to manually stringify
the types and compare that. This may even be both more efficient and possibly
allow a more "correct" implementation of type comparison if multiple different
types with the same name are in use in the inferior.

-- 
           Summary: Would like an equality compare method for gdb.Type
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: alexl at redhat dot com
                CC: gdb-prs at sourceware dot org


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

------- 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] 5+ messages in thread

* [Bug python/10676] Would like an equality compare method for gdb.Type
  2009-09-21  8:28 [Bug python/10676] New: Would like an equality compare method for gdb.Type alexl at redhat dot com
@ 2009-09-21 16:24 ` tromey at redhat dot com
  2009-11-10 15:02 ` tromey at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2009-09-21 16:24 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-09-21 16:24:19
               date|                            |


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

------- 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] 5+ messages in thread

* [Bug python/10676] Would like an equality compare method for gdb.Type
  2009-09-21  8:28 [Bug python/10676] New: Would like an equality compare method for gdb.Type alexl at redhat dot com
  2009-09-21 16:24 ` [Bug python/10676] " tromey at redhat dot com
@ 2009-11-10 15:02 ` tromey at redhat dot com
  2010-08-20 20:39 ` tromey at redhat dot com
  2010-08-23 20:31 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2009-11-10 15:02 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-11-10 15:01 -------
Ideally we'd memoize Type objects instead of creating new ones
all the time.  That probably requires the type GC patch.

-- 


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

------- 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] 5+ messages in thread

* [Bug python/10676] Would like an equality compare method for gdb.Type
  2009-09-21  8:28 [Bug python/10676] New: Would like an equality compare method for gdb.Type alexl at redhat dot com
  2009-09-21 16:24 ` [Bug python/10676] " tromey at redhat dot com
  2009-11-10 15:02 ` tromey at redhat dot com
@ 2010-08-20 20:39 ` tromey at redhat dot com
  2010-08-23 20:31 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2010-08-20 20:39 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2010-08-20 20:39 -------
Testing a patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware dot|tromey at redhat dot com
                   |org                         |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-09-21 16:24:19         |2010-08-20 20:39:06
               date|                            |


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

------- 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] 5+ messages in thread

* [Bug python/10676] Would like an equality compare method for gdb.Type
  2009-09-21  8:28 [Bug python/10676] New: Would like an equality compare method for gdb.Type alexl at redhat dot com
                   ` (2 preceding siblings ...)
  2010-08-20 20:39 ` tromey at redhat dot com
@ 2010-08-23 20:31 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2010-08-23 20:31 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2010-08-23 20:26 -------
Subject: Bug 10676

CVSROOT:	/cvs/src
Module name:	src
Changes by:	tromey@sourceware.org	2010-08-23 20:26:10

Modified files:
	gdb            : ChangeLog 
	gdb/python     : py-type.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.python: py-type.exp 

Log message:
	gdb
	PR python/10676:
	* python/py-type.c: Include bcache.h, vec.h.
	(struct type_equality_entry): New.
	(compare_strings): New function.
	(check_types_equal): Likewise.
	(check_types_worklist): Likewise.
	(typy_richcompare): Likewise.
	(type_object_type): Set tp_richcompare field.
	gdb/testsuite
	PR python/10676:
	* gdb.python/py-type.exp (test_fields): Add tests for type
	equality.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12107&r2=1.12108
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-type.c.diff?cvsroot=src&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2426&r2=1.2427
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-type.exp.diff?cvsroot=src&r1=1.8&r2=1.9


------- Additional Comments From tromey at redhat dot com  2010-08-23 20:30 -------
I checked in the fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|6.8                         |7.3


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

------- 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] 5+ messages in thread

end of thread, other threads:[~2010-08-23 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21  8:28 [Bug python/10676] New: Would like an equality compare method for gdb.Type alexl at redhat dot com
2009-09-21 16:24 ` [Bug python/10676] " tromey at redhat dot com
2009-11-10 15:02 ` tromey at redhat dot com
2010-08-20 20:39 ` tromey at redhat dot com
2010-08-23 20:31 ` tromey at redhat 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).