Bug 13776 - Regression: warning: Error removing breakpoint 0
Summary: Regression: warning: Error removing breakpoint 0
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 7.5
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 21:48 UTC by Jan Kratochvil
Modified: 2012-03-02 19:32 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2012-02-27 21:48:30 UTC
#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
Comment 1 Tom Tromey 2012-02-28 17:14:41 UTC
Testing a fix.
Comment 2 Sourceware Commits 2012-03-02 19:26:27 UTC
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
Comment 3 Tom Tromey 2012-03-02 19:32:12 UTC
Fixed.