This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gdb generates location list without DW_AT_frame_base
On Thu, Dec 30, 2004 at 12:23:46PM -0800, H. J. Lu wrote:
> On Thu, Dec 30, 2004 at 03:07:20PM -0500, Daniel Jacobowitz wrote:
> > On Thu, Dec 30, 2004 at 11:56:42AM -0800, H. J. Lu wrote:
> > > DW_AT_frame_base may be needed for location lists of local variables.
> > > But in case of tls_symbolic_operand, there is no local variable.
> > > Location lists are used for function parameters.
> >
> > Then why is GDB calling get_frame_base? It is only called for
> > DW_OP_fbreg. If we don't have a frame base, we don't know what
> > DW_OP_fbreg refers to.
>
> Gcc generates:
>
> <1><28c955>: Abbrev Number: 47 (DW_TAG_subprogram)
> DW_AT_sibling : <28c98f>
> DW_AT_external : 1
> DW_AT_name : (indirect string, offset: 0x3875d):
> tls_symbolic_operand
> DW_AT_decl_file : 1
> DW_AT_decl_line : 471
> DW_AT_prototyped : 1
> DW_AT_type : <2887cb>
> DW_AT_low_pc : 0x826c1d0
> DW_AT_high_pc : 0x826c1fc
> <2><28c96f>: Abbrev Number: 48 (DW_TAG_formal_parameter)
> DW_AT_name : op
> DW_AT_decl_file : 1
> DW_AT_decl_line : 470
> DW_AT_type : <288a7b>
> DW_AT_location : 120fbf (location list)
> <2><28c97e>: Abbrev Number: 49 (DW_TAG_formal_parameter)
> DW_AT_name : (indirect string, offset: 0x3db66): mode
> DW_AT_decl_file : 1
> DW_AT_decl_line : 470
> DW_AT_type : <288e5d>
> DW_AT_location : 121018 (location list)
>
> for
>
> int
> tls_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
> {
> return ((GET_CODE (op) == SYMBOL_REF) && (SYMBOL_REF_TLS_MODEL (op)
> != 0)) && (mode == VOIDmode || GET_MODE (op) == mode);
> }
>
> It may be a gcc bug after all.
And what's in the location lists? If it's DW_OP_fbreg, then I presume
it's a GCC bug. According to my reading of the DWARF spec, anyway.
--
Daniel Jacobowitz