This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[python] fix a buglet in _format_children
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Wed, 22 Oct 2008 13:47:01 -0600
- Subject: [python] fix a buglet in _format_children
- Reply-to: Tom Tromey <tromey at redhat dot com>
This fixes a buglet in _format_children.
It was not properly handling the "set print elements" parameter.
Tom
b/gdb/ChangeLog:
2008-10-22 Tom Tromey <tromey@redhat.com>
* python/python.c (_initialize_python) <_format_children>: Handle
"print elements" properly.
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 3541712..83bce4d 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1058,7 +1058,7 @@ def _format_children(obj, val):\n\
(name, val) = elt\n\
result.append('%s = %s' % (name, str(val)))\n\
i = i + 1\n\
- if max == 0 or i == max:\n\
+ if max != None and i == max:\n\
break\n\
return '\\n'.join(result)\n\
\n\