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]

backtrace/1685: Backtrace for Sun C -O compiled programs does'n work


>Number:         1685
>Category:       backtrace
>Synopsis:       Backtrace for Sun C -O compiled programs does'n work
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 23 15:28:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     m.mueller99@kay-mueller.de
>Release:        gdb 6.1.1
>Organization:
>Environment:
Solaris SPARC
  Sun WorkShop 6 update 2 C 5.3 2001/05/15 (64 bit)
  Sun WorkShop 6 2000/04/07 C 5.1 (64 bit)
  probably 64 bit only
  cc -xarch=v9 -O p5.c -o p5
>Description:
Some Sun C compilers produce prolog code that gdb doesn't
understand. This confuses the bt command.
>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) b fun
Breakpoint 1 at 0x1000009a8
(gdb) run
Starting program: /export/home/michaelm/gdb/gdb-6.1.patch/tst/p5.O.64.51
(no debugging symbols found)...(no debugging symbols found)...(no debugging symb
ols found)...
Breakpoint 1, 0x00000001000009a8 in fun ()
(gdb) x/10i fun
0x1000009a8 <fun>:      sethi  %hi(0), %g2
0x1000009ac <fun+4>:    sethi  %hi(0x800), %g3
0x1000009b0 <fun+8>:    or  %g2, 1, %g2
0x1000009b4 <fun+12>:   or  %g3, 0x340, %g3
0x1000009b8 <fun+16>:   sllx  %g2, 0x20, %g2
0x1000009bc <fun+20>:   save  %sp, -192, %sp
0x1000009c0 <fun+24>:   or  %g3, %g2, %o0
0x1000009c4 <fun+28>:   ld  [ %fp + 0x7f7 ], %g2
0x1000009c8 <fun+32>:   mov  0xf, %i1
0x1000009cc <fun+36>:   sra  %g2, 0, %o1
(gdb) bt
#0  0x00000001000009a8 in fun ()
#1  0x0000000100000a24 in main ()
(gdb) b *0x1000009c0
Breakpoint 2 at 0x1000009c0
(gdb) c
Continuing.

Breakpoint 2, 0x00000001000009c0 in fun ()
(gdb) bt
#0  0x00000001000009c0 in fun ()
#1  0x0000000000000008 in ?? ()
Previous frame identical to this frame (corrupt stack?)
>Fix:
fix proposal sent to gdb-patches
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="p5.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="p5.c"

I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGZ1bihpbnQgaykKewoJaW50IGEsIGI7CgoJcHJpbnRm
KCJmdW4gJWQgJWRcbiIsIGEsIGIpOwoJYSA9IDEwOwoJYiA9IDIwOwoJYSA9IChhICsgYikgLyAy
OwoJcHJpbnRmKCJmdW4gJWQgJWRcbiIsIGEsIGIpOwp9Cgp2b2lkIG1haW4oKQp7CglmdW4oMTAp
OwoJcHJpbnRmKCJmaW5pc2hlZFxuIik7Cn0K


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