This is the mail archive of the gdb-prs@sources.redhat.com 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/1286: stack trace screwed on ia64


>Number:         1286
>Category:       gdb
>Synopsis:       stack trace screwed on ia64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 17 14:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     david@streamline-computing.com
>Release:        gdb-5.3
>Organization:
>Environment:
ia-64  linux 2.4.19 Redhat (and also SGI ia64 Altix)
>Description:
gdb gets wrong stack trace in simple code (attached)
stack shows 
 
#0  hello.c:12
#1  hello.c:10

but there is no function call in line 10, and certainly not to line 12!

Changing line 10 to be an array of 1000 instead of 10000 clears the problem!
             

>How-To-Repeat:
.   gcc -O0 -g hello.c

break main
run
next
bt

stack show is then incorrect
>Fix:

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

I2luY2x1ZGUgPHN0ZGxpYi5oPgoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqKiBhcmd2KQp7Cgl2
b2lkICAgKiB0MjsKCWludCBwOwkKICAgICAgICBpbnQgYmlnQXJyYXlbMTAwMDBdOwoKCgl0MiA9
IG1hbGxvYyg0KTsKCiAgICAgICAgZm9yKHA9MDtwPDEwMDtwKyspCiAgICAgICAgICAgIGJpZ0Fy
cmF5W3BdPTgwMDAwK3A7Cn0K


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