[Bug debug/15860] New: [3.3/3.4/3.5 regression] No DW_AT_location debug info is emitted for formal arguments to a function that uses "register" qualifiers

tausq at debian dot org gcc-bugzilla@gcc.gnu.org
Mon Jun 7 18:25:00 GMT 2004


Compile the attached code with "gcc -g -c structs2.c" [structs2.c comes from 
the gdb testsuite]

The arguments to param_reg() are not described in the dwarf debug info. e.g.:
$ readelf -wi structs2.o
[...]
 <2><69>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_name        : (indirect string, offset: 0x27): pr_char
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 28
     DW_AT_type        : <96>

No DW_AT_location information is given.

With gcc-3.0, I see:
 <2><82>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_name        : pr_char
     DW_AT_decl_file   : 1
     DW_AT_decl_line   : 28
     DW_AT_type        : <cf>
     DW_AT_location    : 2 byte block: 91 b     (DW_OP_fbreg: 11)

param_reg() is defined as:
static void param_reg (register signed char pr_char,
                       register unsigned char pr_uchar,
                       register short pr_short,
                       register unsigned short pr_ushort);

if the "register" qualifier is removed, the correct debug information is 
emitted.

Dan Jacobowitz tells me that on i386/mips, with gcc-3.3, he does not see this 
problem. On hppa-linux i see this with gcc-3.3/3.4/3.5

This was also observed by Corinna Vinschen (sh target):
http://sources.redhat.com/ml/gdb/2004-03/msg00043.html

-- 
           Summary: [3.3/3.4/3.5 regression] No DW_AT_location debug info is
                    emitted for formal arguments to a function that uses
                    "register" qualifiers
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tausq at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa-unknown-linux
  GCC host triplet: hppa-unknown-linux
GCC target triplet: hppa-unknown-linux


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



More information about the Gcc-bugs mailing list