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 python breakpoint-saving bug


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


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