public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg
@ 2003-09-30 9:45 kaos at ocs dot com dot au
2003-09-30 9:50 ` [Bug c/12455] " gnb at sgi dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: kaos at ocs dot com dot au @ 2003-09-30 9:45 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12455
Summary: Invalid ia64 unwind data when compiling with -pg
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kaos at ocs dot com dot au
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux
GCC host triplet: ia64-unknown-linux
GCC target triplet: ia64-unknown-linux
gcc version 3.4 20030929 (experimental). Compile hello.c without and with -pg.
-pg adds two bundles to the start of main but the unwind data for main is not
changed.
objdump and readelf -u without -pg
<main>:
00 08 15 08 80 05 [MII] alloc r33=ar.pfs,5,4,0
20 02 30 00 42 60 mov r34=r12
04 08 00 84 mov r35=r1
01 00 00 00 01 00 [MII] nop.m 0x0
00 02 00 62 00 80 mov r32=b0
84 0c 00 90 addl r36=72,r1;;
1c 20 01 48 18 10 [MFB] ld8 r36=[r36]
00 00 00 02 00 00 nop.f 0x0
08 fe ff 58 br.call.sptk.many
b0=4000000000000440 <_init+0x150>
02 08 00 46 00 21 [MII] mov r1=r35
e0 00 00 00 42 00 mov r14=r0;;
01 70 00 84 mov r8=r14
00 00 00 00 01 00 [MII] nop.m 0x0
00 08 01 55 00 00 mov.i ar.pfs=r33
00 0a 00 07 mov b0=r32
1d 60 00 44 00 21 [MFB] mov r12=r34
00 00 00 02 00 80 nop.f 0x0
08 00 84 00 br.ret.sptk.many b0;;
<main>: [0x4000000000000620-0x4000000000000680), info at +0x828
v1, flags=0x0 ( ), len=16 bytes
R2:prologue_gr(mask=[rp,ar.pfs,psp],grsave=r32,rlen=5)
P7:pfs_when(t=0)
P7:mem_stack_v(t=1)
P7:rp_when(t=4)
R1:body(rlen=13)
B2:epilogue(t=2,ecount=0)
R1:prologue(rlen=0)
R1:prologue(rlen=0)
R1:prologue(rlen=0)
R1:prologue(rlen=0)
objdump and readelf -u with -pg
02 40 31 10 80 05 [MII] alloc r40=ar.pfs,12,8,0
b0 42 07 00 48 20 addl r43=104,r1;;
05 08 00 84 mov r41=r1
11 00 00 00 01 00 [MIB] nop.m 0x0
a0 02 00 62 00 00 mov r42=b0
38 fd ff 58 br.call.sptk.many
b0=40000000000005a0 <_init+0x1a0>;;
00 08 15 08 80 05 [MII] alloc r33=ar.pfs,5,4,0
20 02 30 00 42 60 mov r34=r12
04 08 00 84 mov r35=r1
01 00 00 00 01 00 [MII] nop.m 0x0
00 02 00 62 00 80 mov r32=b0
04 0f 00 90 addl r36=112,r1;;
1c 20 01 48 18 10 [MFB] ld8 r36=[r36]
00 00 00 02 00 00 nop.f 0x0
e8 fc ff 58 br.call.sptk.many
b0=4000000000000580 <_init+0x180>
02 08 00 46 00 21 [MII] mov r1=r35
e0 00 00 00 42 00 mov r14=r0;;
01 70 00 84 mov r8=r14
00 00 00 00 01 00 [MII] nop.m 0x0
00 08 01 55 00 00 mov.i ar.pfs=r33
00 0a 00 07 mov b0=r32
1d 60 00 44 00 21 [MFB] mov r12=r34
00 00 00 02 00 80 nop.f 0x0
08 00 84 00 br.ret.sptk.many b0;;
<main>: [0x4000000000000860-0x40000000000008e0), info at +0xb30
v1, flags=0x0 ( ), len=16 bytes
R2:prologue_gr(mask=[rp,ar.pfs,psp],grsave=r32,rlen=5)
P7:pfs_when(t=0)
P7:mem_stack_v(t=1)
P7:rp_when(t=4)
R1:body(rlen=13)
B2:epilogue(t=2,ecount=0)
R1:prologue(rlen=0)
R1:prologue(rlen=0)
R1:prologue(rlen=0)
R1:prologue(rlen=0)
Despite the fact that -pg added two bundles to the start of main which changes
the state or ar.pfs and b0, this is not reflected in the unwind data. Backtrace
from mcount() or an interrupt while executing the -pg prologue will terminate
early. -pg cannot be used with profiling tools that rely on interrupts.
The body length in the -pg case does not take account of the two extra bundles.
Any error in the last two bundles of the modified body will appear to be outside
the body of the procedure and will use the default unwind data for leaf
functions. Any error in the last two bundles will get an incorrect backtrace.
My best guess at what the unwind data should look like for the second case, it
may be possible to shrink this a bit. Untested.
<main>: [0x4000000000000860-0x40000000000008e0), info at +0xb30
v1, flags=0x0 ( ), len=?? bytes
R1:prologue(rlen=6)
P3:pfs_gr(reg=r40)
P7:pfs_when(t=0)
P3:rp_gr(reg=r42)
P7:rp_when(t=5)
R1:body(rlen=0)
B2:epilogue(t=0,ecount=0)
R2:prologue_gr(mask=[rp,ar.pfs,psp],grsave=r32,rlen=5)
P7:pfs_when(t=0)
P7:mem_stack_v(t=1)
P7:rp_when(t=4)
R1:body(rlen=13)
B2:epilogue(t=2,ecount=0)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/12455] Invalid ia64 unwind data when compiling with -pg
2003-09-30 9:45 [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg kaos at ocs dot com dot au
@ 2003-09-30 9:50 ` gnb at sgi dot com
2003-09-30 17:30 ` [Bug target/12455] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gnb at sgi dot com @ 2003-09-30 9:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12455
gnb at sgi dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gnb at sgi dot com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/12455] Invalid ia64 unwind data when compiling with -pg
2003-09-30 9:45 [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg kaos at ocs dot com dot au
2003-09-30 9:50 ` [Bug c/12455] " gnb at sgi dot com
@ 2003-09-30 17:30 ` pinskia at gcc dot gnu dot org
2003-09-30 18:15 ` kaos at ocs dot com dot au
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-30 17:30 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12455
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Component|c |target
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-30 17:21 -------
Can you attach this hello.c and maybe the preprocessed source file also?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/12455] Invalid ia64 unwind data when compiling with -pg
2003-09-30 9:45 [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg kaos at ocs dot com dot au
2003-09-30 9:50 ` [Bug c/12455] " gnb at sgi dot com
2003-09-30 17:30 ` [Bug target/12455] " pinskia at gcc dot gnu dot org
@ 2003-09-30 18:15 ` kaos at ocs dot com dot au
2003-09-30 18:34 ` rth at gcc dot gnu dot org
2005-06-08 19:38 ` rth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kaos at ocs dot com dot au @ 2003-09-30 18:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12455
------- Additional Comments From kaos at ocs dot com dot au 2003-09-30 17:46 -------
(From update of attachment 4865)
This is the .s output without -pg
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/12455] Invalid ia64 unwind data when compiling with -pg
2003-09-30 9:45 [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg kaos at ocs dot com dot au
` (2 preceding siblings ...)
2003-09-30 18:15 ` kaos at ocs dot com dot au
@ 2003-09-30 18:34 ` rth at gcc dot gnu dot org
2005-06-08 19:38 ` rth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2003-09-30 18:34 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12455
rth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-09-30 17:59:38
date| |
------- Additional Comments From rth at gcc dot gnu dot org 2003-09-30 17:59 -------
The problem is with the FUNCTION_PROFILER macro. IA-64 should be using something
like PROFILE_HOOK, which emits rtl that the unwind-info generator can see, rather
than emitting assembly text directly.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/12455] Invalid ia64 unwind data when compiling with -pg
2003-09-30 9:45 [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg kaos at ocs dot com dot au
` (3 preceding siblings ...)
2003-09-30 18:34 ` rth at gcc dot gnu dot org
@ 2005-06-08 19:38 ` rth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-06-08 19:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-06-08 19:38 -------
Fixed here: http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00809.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12455
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-08 19:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-30 9:45 [Bug c/12455] New: Invalid ia64 unwind data when compiling with -pg kaos at ocs dot com dot au
2003-09-30 9:50 ` [Bug c/12455] " gnb at sgi dot com
2003-09-30 17:30 ` [Bug target/12455] " pinskia at gcc dot gnu dot org
2003-09-30 18:15 ` kaos at ocs dot com dot au
2003-09-30 18:34 ` rth at gcc dot gnu dot org
2005-06-08 19:38 ` rth 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).