fix BufferIterator gdb pretty printer
This commit is contained in:
parent
91d2cc38e5
commit
9effba2c66
|
@ -50,8 +50,8 @@ class BufferIterator:
|
||||||
self.val = val
|
self.val = val
|
||||||
|
|
||||||
def to_string(self):
|
def to_string(self):
|
||||||
if self.val['m_buffer'] != 0:
|
if self.val['m_buffer']['m_ptr'] != 0:
|
||||||
return "buffer<%s>@(%s, %s)" % (self.val['m_buffer'].dereference()['m_name'], self.val['m_coord']['line'], self.val['m_coord']['column'])
|
return "buffer<%s>@(%s, %s)" % (self.val['m_buffer']['m_ptr'].dereference()['m_name'], self.val['m_coord']['line'], self.val['m_coord']['column'])
|
||||||
else:
|
else:
|
||||||
return "buffer<none>@(%s, %s)" % (self.val['m_coord']['line'], self.val['m_coord']['column'])
|
return "buffer<none>@(%s, %s)" % (self.val['m_coord']['line'], self.val['m_coord']['column'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user