This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/15978] New: support weakref for all python classes
- From: "b.r.longbons at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 24 Sep 2013 20:37:56 +0000
- Subject: [Bug python/15978] New: support weakref for all python classes
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=15978
Bug ID: 15978
Summary: support weakref for all python classes
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: b.r.longbons at gmail dot com
IWBN if all of gdb's classes allowed weak references, via python's weakref
module. This provides a much better lifetime model than events.
Most python objects (that have __dict__) automatically support weakref. If a
classes uses __slots__, it must include '__weakref__'. I have no clue how to
implement this for classes created in C though.
test code for a -gdb.py file is:
import gdb
import weakref
print(weakref.ref(gdb.current_objfile()))
--
You are receiving this mail because:
You are on the CC list for the bug.