This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/2164: Single stepping partially broken for Solaris


>Number:         2164
>Category:       gdb
>Synopsis:       Single stepping partially broken for Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 30 20:58:01 UTC 2006
>Closed-Date:
>Last-Modified:
>Originator:     Gordon Priur
>Release:        GNU gdb 6.4
>Organization:
>Environment:
Solaris 10 (both x86 and Sparc): "i386-pc-solaris2.10"
>Description:
If I step into a libc function (printf in my test case) gdb
doesn't realize there is no debug information and shows a
corrupt stack. Subsequent steps will eventualy get back to
debuggable source code.

I'm one of the developers of the gdb module for the NetBeans
IDE (netbeans.org). This is somewhat more serious in our IDE
because the *real* stack goes away and is replaced by the
corrupted stack.

I also tried this with several older versions of gdb (6.2.1
I think). I got the same behavior. 
>How-To-Repeat:
Set a breakpoint on line 36 (printf in case the version of
args.c I attached is different than the one I'm looking
at). Run to it ("run 111 222 333"). Now do a step command
followed by a where (the IDE always updates the stack after
each stop, so we always do this (although via the mi
command)).

The stack is corrupted in ti_bind_quard. Several more
steps and I'm back to the "real" stack. But since the IDE
shows the stack always, the user sees the corrupted stack
(as well as the IDE having to deal with the error msgs
returned by gdb/mi).
>Fix:

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

I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPHN0ZGxpYi5o
PgoKaW50IGkgPSAwOwoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqKmFyZ3YpIHsKICAgIGkrKzsK
ICAgIGkrKzsKICAgIGkrKzsKICAgIGkrKzsKICAgIGkrKzsKICAgIHJldHVybiBhcmdzMChhcmdj
LCBhcmd2KTsKfQoKaW50IGFyZ3MwKGludCBhcmdjLCBjaGFyKiphcmd2KSB7CiAgICBpKys7CiAg
ICBpKys7CiAgICBpKys7CiAgICBpKys7CiAgICByZXR1cm4gYXJnczEoYXJnYywgYXJndik7Cn0K
CmludCBhcmdzMShpbnQgYXJnYywgY2hhcioqYXJndikgewogICAgaSsrOwogICAgaSsrOwogICAg
aSsrOwogICAgaSsrOwogICAgcmV0dXJuIGFyZ3MyKGFyZ2MsIGFyZ3YpOwp9CgppbnQgYXJnczIo
aW50IGFyZ2MsIGNoYXIqKmFyZ3YpIHsKICAgIGludCBqOwogICAgCiAgICAvLyBQcmludHMgYXJn
dW1lbnRzCiAgICBwcmludGYoIkFyZ3VtZW50czpcbiIpOwogICAgZm9yIChpID0gMDsgaSA8IGFy
Z2M7IGkrKykgewogICAgICAgIHByaW50ZigiJWk6ICVzXG4iLCBpLCBhcmd2W2ldKTsKICAgIH0K
ICAgIAogICAgcmV0dXJuIDA7Cn0K


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]