[python] fix python breakpoint-saving bug

Tom Tromey tromey@redhat.com
Thu Jul 2 22:38:00 GMT 2009


Roland pointed out a goof in the breakpoint-saving command.

When restoring a disabled breakpoint, the number may have changed.
So, we use $bpnum in this case.

Tom

diff --git a/gdb/python/lib/gdb/command/save_breakpoints.py b/gdb/python/lib/gdb/command/save_breakpoints.py
index 90e07db..6143187 100644
--- a/gdb/python/lib/gdb/command/save_breakpoints.py
+++ b/gdb/python/lib/gdb/command/save_breakpoints.py
@@ -50,7 +50,7 @@ The breakpoints can be restored using the 'source' command."""
                     print >> f, " if", bp.condition,
                 print >> f
                 if not bp.enabled:
-                    print >> f, "disable %d" % bp.number
+                    print >> f, "disable $bpnum"
                 # Note: we don't save the ignore count; there doesn't
                 # seem to be much point.
                 commands = bp.commands



More information about the Archer mailing list