public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* [python] fix python breakpoint-saving bug
@ 2009-07-02 22:38 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2009-07-02 22:38 UTC (permalink / raw)
  To: Project Archer

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-02 22:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-02 22:38 [python] fix python breakpoint-saving bug Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).