public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/18655] New: Incorrect data in  .debug_frame  section for PowerPC
@ 2004-11-24 19:42 pett at ca dot ibm dot com
  2004-11-24 19:57 ` [Bug target/18655] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pett at ca dot ibm dot com @ 2004-11-24 19:42 UTC (permalink / raw)
  To: gcc-bugs

The output generated in the .debug_frame section is incorrect, as follows:

1. The return_address_register in the CIE is given as 65.  In the ABI 
supplement for the PowerPC, this is the ID of the Floating Point Status and 
Control Register.  This should probably have been 108, the ID of the Link 
Register.

2. In the body of the FDE, the return address is put into in register 108.  
Since the CIE specifies that the return is in register 65, this value is lost 
when traversing the stack

These two register IDs should be the same. (They were both 65 in the 3.2 
version of the compiler).  The simple test case provided generates one CIE, and 
three FDE entries.  The FDEs for main and sub2 are both inconsistent with the 
CIE.

Results from gcc -v:

Reading specs from /usr/lib/gcc/ppc64-redhat-linux/3.4.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-
checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-
exceptions --enable-languages=c,c++,objc,java,f77 --enable-java-awt=gtk --
host=ppc64-redhat-linux --build=ppc64-redhat-linux --target=ppc64-redhat-linux -
-with-cpu=default32
Thread model: posix
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)


command line:
g++ -v x.cpp

Original source file (x.cpp):
//#include <stdio.h>
int sub1(int x)
{
  return x + 1;
}
int sub2(int x)
{
  for (int i = 0; i < 10; i++)
    x = sub1(x + i);
  return 0;
}
int main(int argc, char** argv)
{
  return sub2(argc);
}
//------------------------------------------------------------------------------

Preprocessed file x.ii:
# 1 "x.cpp"
# 1 "/home/pett/dev/test//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "x.cpp"

int sub1(int x)
{
  return x + 1;
}
int sub2(int x)
{
  for (int i = 0; i < 10; i++)
    x = sub1(x + i);
  return 0;
}
int main(int argc, char** argv)
{
  return sub2(argc);
}

-- 
           Summary: Incorrect data in  .debug_frame  section for PowerPC
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pett at ca dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
@ 2004-11-24 19:57 ` pinskia at gcc dot gnu dot org
  2004-11-24 20:09 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-24 19:57 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|debug                       |target
           Keywords|                            |wrong-debug


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
  2004-11-24 19:57 ` [Bug target/18655] " pinskia at gcc dot gnu dot org
@ 2004-11-24 20:09 ` pinskia at gcc dot gnu dot org
  2004-11-30 12:39 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-24 20:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-24 20:09 -------
http://gcc.gnu.org/ml/gcc/2004-01/msg00016.html
is relevant.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
  2004-11-24 19:57 ` [Bug target/18655] " pinskia at gcc dot gnu dot org
  2004-11-24 20:09 ` pinskia at gcc dot gnu dot org
@ 2004-11-30 12:39 ` pinskia at gcc dot gnu dot org
  2005-05-06 23:52 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-30 12:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-30 12:39 -------
*** Bug 18736 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jcownie at etnus dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (2 preceding siblings ...)
  2004-11-30 12:39 ` pinskia at gcc dot gnu dot org
@ 2005-05-06 23:52 ` pinskia at gcc dot gnu dot org
  2005-05-07  0:31 ` amodra at bigpond dot net dot au
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-06 23:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|                            |powerpc-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (3 preceding siblings ...)
  2005-05-06 23:52 ` pinskia at gcc dot gnu dot org
@ 2005-05-07  0:31 ` amodra at bigpond dot net dot au
  2005-05-07  0:33 ` amodra at bigpond dot net dot au
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-05-07  0:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-07 00:31:32
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (4 preceding siblings ...)
  2005-05-07  0:31 ` amodra at bigpond dot net dot au
@ 2005-05-07  0:33 ` amodra at bigpond dot net dot au
  2005-05-09 20:20 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-05-07  0:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2005-05-07 00:33 -------
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00551.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (5 preceding siblings ...)
  2005-05-07  0:33 ` amodra at bigpond dot net dot au
@ 2005-05-09 20:20 ` cvs-commit at gcc dot gnu dot org
  2005-05-09 20:33 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-09 20:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-09 20:20 -------
Subject: Bug 18655

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-05-09 20:20:26

Modified files:
	gcc            : ChangeLog dwarf2out.c 

Log message:
	PR 18655
	* dwarf2out.c (output_call_frame_info): Use DWARF2_FRAME_REG_OUT
	before outputting DWARF_FRAME_RETURN_COLUMN.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8692&r2=2.8693
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.592&r2=1.593



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (6 preceding siblings ...)
  2005-05-09 20:20 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-09 20:33 ` mmitchel at gcc dot gnu dot org
  2005-05-16  4:33 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-09 20:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-05-09 20:33 -------
Fixed in 4.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (7 preceding siblings ...)
  2005-05-09 20:33 ` mmitchel at gcc dot gnu dot org
@ 2005-05-16  4:33 ` cvs-commit at gcc dot gnu dot org
  2005-05-16 11:31 ` pinskia at gcc dot gnu dot org
  2005-06-08  2:45 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-16  4:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-16 04:32 -------
Subject: Bug 18655

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	mmitchel@gcc.gnu.org	2005-05-16 04:32:38

Modified files:
	gcc            : ChangeLog dwarf2out.c 

Log message:
	Backport:
	2005-05-09  Mark Mitchell  <mark@codesourcery.com>
	PR 18655
	* dwarf2out.c (output_call_frame_info): Use DWARF2_FRAME_REG_OUT
	before outputting DWARF_FRAME_RETURN_COLUMN.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.246&r2=2.7592.2.247
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.570.2.7&r2=1.570.2.8



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (8 preceding siblings ...)
  2005-05-16  4:33 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-16 11:31 ` pinskia at gcc dot gnu dot org
  2005-06-08  2:45 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-16 11:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.0.1 4.1.0
   Target Milestone|4.1.0                       |4.0.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug target/18655] Incorrect data in  .debug_frame  section for PowerPC
  2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
                   ` (9 preceding siblings ...)
  2005-05-16 11:31 ` pinskia at gcc dot gnu dot org
@ 2005-06-08  2:45 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-08  2:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-08 02:45 -------
Subject: Bug 18655

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	csl-3_4_3-linux-branch
Changes by:	mmitchel@gcc.gnu.org	2005-06-08 02:44:59

Modified files:
	.              : ChangeLog.csl 
	gcc            : dwarf2out.c 

Log message:
	PR 18655
	* dwarf2out.c (output_call_frame_info): Use DWARF2_FRAME_REG_OUT
	before outputting DWARF_FRAME_RETURN_COLUMN.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.csl.diff?cvsroot=gcc&only_with_tag=csl-3_4_3-linux-branch&r1=1.1.6.3&r2=1.1.6.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=csl-3_4_3-linux-branch&r1=1.461.2.12.2.1&r2=1.461.2.12.2.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18655


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-06-08  2:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-24 19:42 [Bug debug/18655] New: Incorrect data in .debug_frame section for PowerPC pett at ca dot ibm dot com
2004-11-24 19:57 ` [Bug target/18655] " pinskia at gcc dot gnu dot org
2004-11-24 20:09 ` pinskia at gcc dot gnu dot org
2004-11-30 12:39 ` pinskia at gcc dot gnu dot org
2005-05-06 23:52 ` pinskia at gcc dot gnu dot org
2005-05-07  0:31 ` amodra at bigpond dot net dot au
2005-05-07  0:33 ` amodra at bigpond dot net dot au
2005-05-09 20:20 ` cvs-commit at gcc dot gnu dot org
2005-05-09 20:33 ` mmitchel at gcc dot gnu dot org
2005-05-16  4:33 ` cvs-commit at gcc dot gnu dot org
2005-05-16 11:31 ` pinskia at gcc dot gnu dot org
2005-06-08  2:45 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).