This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] fix a buglet in _format_children


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\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]