Bug 485825 - User defined labels have no DW_TAG_label
User defined labels have no DW_TAG_label
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
5.2
All Linux
low Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-16 16:20 EST by Stan Cox
Modified: 2009-02-17 11:08 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-17 09:00:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test program (1.82 KB, text/plain)
2009-02-16 16:21 EST, Stan Cox
no flags Details

  None (edit)
Description Stan Cox 2009-02-16 16:20:11 EST
Description of problem:
User defined labels often do not have an associated DW_TAG_label.  Systemtap would like to use DW_TAG_label as a means to locating probes at a particular location.

Version-Release number of selected component (if applicable):
gcc version 4.3.2 20081105
gcc version 4.4.0 (seems to work okay)


How reproducible:


Steps to Reproduce:
1.for i in g++ ; do $i -v 2>&1|grep version ; $i label.cc -g -O1 -c ; readelf --debug-dump ./label.o | awk '/DW_AT_.*stapprobe/ {print $2 " " $8}'; done
2.
3.
  
Actual results:
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) 

Expected results:
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
DW_AT_name _stapprobe1_label2_16
DW_AT_name _stapprobe1_label3_25
DW_AT_name _stapprobe1_label0_22
DW_AT_name _stapprobe1_label4_31


Additional info:
Comment 1 Stan Cox 2009-02-16 16:21:44 EST
Created attachment 332119 [details]
test program

test program
Comment 2 Jakub Jelinek 2009-02-17 09:00:00 EST
If this works in 4.4.0, then WONTFIX for 4.3.x, we are going to rebase gcc43 in RHEL5.3 to gcc44 in RHEL5.4.
Comment 3 Frank Ch. Eigler 2009-02-17 10:51:05 EST
If we find cases where 4.4 doesn't work, we should reopen this, right?
Comment 4 Jakub Jelinek 2009-02-17 10:53:01 EST
Yes.
Comment 5 Mark Wielaard 2009-02-17 11:08:41 EST
Luckily it seems the system compiler (gcc 4.1.2) does get this right:
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
 <2><5b>: Abbrev Number: 4 (DW_TAG_label)
     DW_AT_name        : (indirect string, offset: 0x77): _stapprobe1_label2_16
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 8	
     DW_AT_low_pc      : 0xe	
--
 <2><d0>: Abbrev Number: 4 (DW_TAG_label)
     DW_AT_name        : (indirect string, offset: 0x97): _stapprobe1_label0_22
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 23	
     DW_AT_low_pc      : 0x18	
 <2><df>: Abbrev Number: 4 (DW_TAG_label)
     DW_AT_name        : (indirect string, offset: 0x3b): _stapprobe1_label3_25
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 36	
     DW_AT_low_pc      : 0x30	
--
 <2><183>: Abbrev Number: 4 (DW_TAG_label)
     DW_AT_name        : (indirect string, offset: 0xad): _stapprobe1_label4_31
     DW_AT_decl_file   : 1	
     DW_AT_decl_line   : 53	
     DW_AT_low_pc      : 0x4a

Note You need to log in before you can comment on or make changes to this bug.