Bug 485825 - User defined labels have no DW_TAG_label
Summary: User defined labels have no DW_TAG_label
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.2
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-16 21:20 UTC by Stan Cox
Modified: 2009-02-17 16:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-17 14:00:00 UTC
Target Upstream Version:
Embargoed:


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

Description Stan Cox 2009-02-16 21:20:11 UTC
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 21:21:44 UTC
Created attachment 332119 [details]
test program

test program

Comment 2 Jakub Jelinek 2009-02-17 14:00:00 UTC
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 15:51:05 UTC
If we find cases where 4.4 doesn't work, we should reopen this, right?

Comment 4 Jakub Jelinek 2009-02-17 15:53:01 UTC
Yes.

Comment 5 Mark Wielaard 2009-02-17 16:08:41 UTC
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.