breakpoints/1909: Assertion failure in insert_step_resume_breakpoint_at_sal.

dgraham@nortelnetworks.com dgraham@nortelnetworks.com
Sat Apr 9 09:08:00 GMT 2005


>Number:         1909
>Category:       breakpoints
>Synopsis:       Assertion failure in insert_step_resume_breakpoint_at_sal.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 09 09:08:01 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     Doug Graham
>Release:        GDB 6.3
>Organization:
>Environment:
Fedora Core 3 and RHEL 3.
>Description:
Message is
../../gdb-6.3/gdb/infrun.c:2642: internal-error: insert_step_resume_breakpoint_at_sal: Assertion `step_resume_breakpoint == NULL' failed.

This occurs fairly frequently when using the "next" or single step commands on a program (a user-level threads package actually) that uses lots of signals.

This problem occurs when two signals are taken in rapid
succession without the mainline making any progress in between.  GDB tries to insert a second step-resume breakpoint without removing the first one first.
>How-To-Repeat:
Hard to say, as it probabably depends on the speed of the machine and other factors that are hard to reproduce.  In
my case, I frequently get two SIGALRMs (used for the scheduling tick in a user-level threads package) in quick succession after "nexting" over a line of code.
>Fix:
See attached file.  This patch just checks to see if a second
step-resume BP is being set at the same address as an existing
one, and quietly does nothing if that is the case.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="gdb-6.3-infrun.c.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gdb-6.3-infrun.c.patch"

KioqIGluZnJ1bi5jCTIwMDUvMDQvMDggMDQ6MDE6MTMJMS4xCi0tLSBpbmZydW4uYwkyMDA1LzA0
LzA5IDA4OjQxOjQ5CioqKioqKioqKioqKioqKgoqKiogOTM2LDk0MSAqKioqCi0tLSA5MzYsOTQy
IC0tLS0KICAKICBzdGF0aWMgdm9pZCBzdGVwX2ludG9fZnVuY3Rpb24gKHN0cnVjdCBleGVjdXRp
b25fY29udHJvbF9zdGF0ZSA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