thread-specific breakpoints not saved properly by save-breakpoint
authorJoel Brobecker <brobecker@gnat.com>
Sun, 2 Oct 2011 02:13:13 +0000 (02:13 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Sun, 2 Oct 2011 02:13:13 +0000 (02:13 +0000)
commitdd11a36cfed586c986916fa8ae3a087af6408fb3
treea6238eb102c351626e48880c889e5d44b2835a96
parent2fed52b14d501f43023fe5d167ee4c7b4cf9e0d6
thread-specific breakpoints not saved properly by save-breakpoint

Initially, I noticed that the save command was often missing
new lines in the file that it generated.  For instance, consider:

        % gdb save-bp
        (gdb) b break_me
        (gdb) b save-bp.c:27
        (gdb) save breakpoints bps

The contents of the bps file would be:

        % cat bps
        break break_mebreak save-bp.c:27

Looking further into the problem, I realized that the missing newlines
are just a consequence of a missing call to print_recreate_thread.
After having generated the breakpoint location in the break command,
we cannot put a new line until we have looked at whether we need to
add a 'thread NUM' argument.

gdb/ChangeLog:

        * breakpoint.c (bkpt_print_recreate): Add call to
        print_recreate_thread.

gdb/testsuite/ChangeLog:

        * gdb.base/save-bp.exp, gdb.base/save-bp.c: New files.
gdb/ChangeLog
gdb/breakpoint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/save-bp.c [new file with mode: 0644]
gdb/testsuite/gdb.base/save-bp.exp [new file with mode: 0644]