#include <stdlib.h> int main (void) { exit (0); } ------------------------------------------------------------------------------- gcc -g ------------------------------------------------------------------------------- (gdb) start Temporary breakpoint 1, main () at exit0.c:5 5 exit (0); (gdb) next [Inferior 1 (process 2428) exited normally] warning: Error removing breakpoint 0 warning: Error removing breakpoint 0 warning: Error removing breakpoint 0 ------------------------------------------------------------------------------- 625c318cdc3f4cda81d28a76878827b3930de728 is the first bad commit commit 625c318cdc3f4cda81d28a76878827b3930de728 Author: Tom Tromey <tromey@redhat.com> Date: Thu Dec 9 16:09:49 2010 +0000 gdb PR c++/9593: from the thread: RFC: next/finish/etc -vs- exceptions http://sourceware.org/ml/gdb-patches/2010-10/msg00109.html
Testing a fix.
CVSROOT: /cvs/src Module name: src Changes by: palves@sourceware.org 2012-03-02 19:26:10 Modified files: gdb : ChangeLog breakpoint.c breakpoint.h target.c thread.c Log message: 2012-03-02 Tom Tromey <tromey@redhat.com> Pedro Alves <palves@redhat.com> PR breakpoints/13776: * breakpoint.c (breakpoint_init_inferior): Delete step-resume breakpoints. (delete_longjmp_breakpoint_at_next_stop): New. * breakpoint.h (delete_longjmp_breakpoint_at_next_stop): Declare. * target.c (generic_mourn_inferior): Call mark_breakpoints_out before deleting the inferior. Add comments. * thread.c (clear_thread_inferior_resources): Don't delete lonjmp breakpoints immediately, but only on next stop. Move that code next to where we mark other breakpoints for deletion. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13938&r2=1.13939 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&r1=1.659&r2=1.660 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.h.diff?cvsroot=src&r1=1.175&r2=1.176 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/target.c.diff?cvsroot=src&r1=1.300&r2=1.301 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/thread.c.diff?cvsroot=src&r1=1.145&r2=1.146
Fixed.