gdb/1933: When calling a function from gdb, unexpected SIGTRAPs are received

prw@ceiriog1.demon.co.uk prw@ceiriog1.demon.co.uk
Sun May 1 09:48:00 GMT 2005


>Number:         1933
>Category:       gdb
>Synopsis:       When calling a function from gdb, unexpected SIGTRAPs are received
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun May 01 09:48:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     Peter Wainwright
>Release:        gdb-6.1post-1.20040607.43
>Organization:
>Environment:
Fedora Core 3
>Description:
Sometimes, when calling a function from gdb, repeated
SIGTRAPs will be received which do not correspond to any
breakpoint set by the user.  I cannot consistently
reproduce this problem.  I attach the log of a session
in which this happened.
>How-To-Repeat:
I don't know - the problem seems to be sporadic.  It occurred
in the above session when I was debugging GCC 4.0.0.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="session"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="session"

W3Byd0BjZWlyaW9nMSB0bXBdJCBnZGIgfi9zcmMvZ2NjLTQuMC4wL0JVSUxEL2djYy9jYzFwbHVz
CkdOVSBnZGIgUmVkIEhhdCBMaW51eCAoNi4xcG9zdC0xLjIwMDQwNjA3LjQzcmgpCkNvcHlyaWdo
dCAyMDA0IEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgpHREIgaXMgZnJlZSBzb2Z0d2Fy
ZSwgY292ZXJlZCBieSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB5b3UgYXJl
CndlbGNvbWUgdG8gY2hhbmdlIGl0IGFuZC9vciBkaXN0cmlidXRlIGNvcGllcyBvZiBpdCB1bmRl
ciBjZXJ0YWluIGNvbmRpdGlvbnMuClR5cGUgInNob3cgY29weWluZyIgdG8gc2VlIHRoZSBjb25k
aXRpb25zLgpUaGVyZSBpcyBhYnNvb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