This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/11391] New: gdb.Value does not support truth testing
- From: "chrisj at rtems dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 17 Mar 2010 02:26:47 -0000
- Subject: [Bug python/11391] New: gdb.Value does not support truth testing
- Reply-to: sourceware-bugzilla at sourceware dot org
I wish to demand load from a target in a common class. Given RTEMS is embedded
the targets are often remote so loading only when the data is needed makes
sense. If I code in Python:
class my_class:
id_encoding = ('target_var1', 'target_var2')
def __init__(self, id):
self.id = id
self.data_var = None
def data(self):
if not self.data_var:
self.data_var = gdb.parse_and_eval(self.is_encoding[self.id])
return self.data_var
On the second call to 'data' the following error is reported:
TypeError: Attempted truth testing on invalid gdb.Value type.
I think gdb.Value supporting this feature would be useful.
--
Summary: gdb.Value does not support truth testing
Product: gdb
Version: 7.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
AssignedTo: unassigned at sourceware dot org
ReportedBy: chrisj at rtems dot org
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11391
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.