backtrace/1688: Backtrace -O compiled programs does'n work after some stepi's

m.mueller99@kay-mueller.de m.mueller99@kay-mueller.de
Wed Jun 23 15:48:00 GMT 2004


>Number:         1688
>Category:       backtrace
>Synopsis:       Backtrace -O compiled programs does'n work after some stepi's
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 23 15:48:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     m.mueller99@kay-mueller.de
>Release:        gdb 6.1.1
>Organization:
>Environment:
Solaris SPARC
>Description:
After hitting a breakpoint at the start address of a function
the bt commans outputs a correct stack trace. After some 
stepi's the stack trace becomes wrong.

This seems to be a different problem than PR gdb/1685. The
prolog code of the function is simple.
>How-To-Repeat:
GNU gdb 6.1.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...(no debugging symbols found)
...
(gdb) x/10i fun
(gdb) x/10i fun
0x100000894 <fun>:      save  %sp, -192, %sp
0x100000898 <fun+4>:    sethi  %hi(0), %i5
0x10000089c <fun+8>:    sethi  %hi(0x800), %i3
0x1000008a0 <fun+12>:   ld  [ %fp + 0x7f7 ], %i1
0x1000008a4 <fun+16>:   or  %i5, 1, %i5
0x1000008a8 <fun+20>:   sethi  %hi(0), %l7
0x1000008ac <fun+24>:   ld  [ %fp + 0x7f3 ], %i0
0x1000008b0 <fun+28>:   sllx  %i5, 0x20, %i4
0x1000008b4 <fun+32>:   or  %l7, 1, %l6
0x1000008b8 <fun+36>:   or  %i4, %i3, %i2
(gdb) b *0x100000894
Breakpoint 1 at 0x100000894
(gdb) run
Starting program: /export/home/michaelm/gdb/gdb-6.1.patch/tst/p6
(no debugging symbols found)...(no debugging symbols found)...(no debugging symb
ols found)...
Breakpoint 1, 0x0000000100000894 in fun ()
(gdb) stepi
0x0000000100000898 in fun ()
(gdb)
0x000000010000089c in fun ()
(gdb)
0x00000001000008a0 in fun ()
(gdb) bt
#0  0x00000001000008a0 in fun ()
#1  0x0000000000000008 in ?? ()
Previous frame identical to this frame (corrupt stack?)
>Fix:

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

I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGZ1bihpbnQgaykKewoJaW50IGEsIGI7CgoJcHJpbnRm
KCJmdW4gJWQgJWRcbiIsIGEsIGIpOwoJYSA9IDEwOwoJYiA9IDIwOwoJYSA9IChhICsgYikgLyAy
OwoJcHJpbnRmKCJmdW4gJWQgJWRcbiIsIGEsIGIpOwp9Cgp2b2lkIG1haW4oKQp7CglmdW4oMTAp
OwoJcHJpbnRmKCJmaW5pc2hlZFxuIik7Cn0K



More information about the Gdb-prs mailing list