[Dwarf-Discuss] Regarding concrete inlined and out-of-line inlined instances

Ramana ramana.venkat83@gmail.com
Thu Jun 12 11:00:34 GMT 2014


Hi Cary,

Thanks for your comments.

> Is this a recursive inlined call?

No, it is not a recursive call.

> It appears that the subprogram is defined at line 58 in the source
> file, and the inlined call also occurs at line 58, so something looks
> fishy. What does the source code look like?

You are right that ext2_lookup is defined at line 58 but there is no
call at the same line. Other than that, ext2_lookup is referenced as
follows in the same C file.

At line 383

const struct inode_operations ext2_dir_inode_operations = {
        .create         = ext2_create,
        .lookup         = ext2_lookup,
...............
...............
}

At line 126
        if (!root->d_inode ||
            !root->d_inode->i_op ||
            !root->d_inode->i_op->lookup ||
            ...................)

At line 782
        if (!subdir->d_inode->i_op ||
            ..........
            !subdir->d_inode->i_op->lookup ||
            .........)

At line 1317
        old = dir->i_op->lookup(dir, dentry, flags);

Also, if we closely look at the debug information tables (pasted below
again), the DW_AT_location attribute is not generated either for all
formal parameters in the concrete inlined instance tree OR for all
function local variables in the out-of-line inlined instance tree.
Isn't that something abnormal?

Following is the relevant piece of ext2_lookup definition to know the
arguments and local variables.

static struct dentry *ext2_lookup(struct inode * dir, struct dentry
*dentry, unsigned int flags)
{
        struct inode * inode;
        ino_t ino;
        .............
}

 <1><10397ce>: Abbrev Number: 92 (DW_TAG_subprogram)
    <10397cf>   DW_AT_abstract_origin: <0x1038302>
    <10397d3>   DW_AT_low_pc      : 0xc0000000001b4980
    <10397db>   DW_AT_high_pc     : 0xc0000000001b4a60
    <10397e3>   DW_AT_frame_base  : 0x53243a    (location list)
    <10397e7>   DW_AT_GNU_all_call_sites: 1
    <10397e8>   DW_AT_sibling     : <0x10398eb>
 <2><10397ec>: Abbrev Number: 70 (DW_TAG_formal_parameter)
    <10397ed>   DW_AT_abstract_origin: <0x1038313>
    <10397f1>   DW_AT_location    : 0x5324c5    (location list)
 <2><10397f5>: Abbrev Number: 70 (DW_TAG_formal_parameter)
    <10397f6>   DW_AT_abstract_origin: <0x103831e>
    <10397fa>   DW_AT_location    : 0x53254d    (location list)
 <2><10397fe>: Abbrev Number: 70 (DW_TAG_formal_parameter)
    <10397ff>   DW_AT_abstract_origin: <0x1038329>
    <1039803>   DW_AT_location    : 0x5325e8    (location list)
 <2><1039807>: Abbrev Number: 93 (DW_TAG_variable)
    <1039808>   DW_AT_abstract_origin: <0x1038334>
 <2><103980c>: Abbrev Number: 93 (DW_TAG_variable)
    <103980d>   DW_AT_abstract_origin: <0x103833f>
 <2><1039811>: Abbrev Number: 94 (DW_TAG_variable)
    <1039812>   DW_AT_abstract_origin: <0x103834a>
    <1039816>   DW_AT_location    : 9 byte block: 3 c0 0 0 0 0 79 3e
a0         (DW_OP_addr: c000000000793ea0)
<2><1039820>: Abbrev Number: 95 (DW_TAG_inlined_subroutine)
    <1039821>   DW_AT_abstract_origin: <0x1038302>
    <1039825>   DW_AT_entry_pc    : 0xc0000000001b49d0
    <103982d>   DW_AT_ranges      : 0x14a0c0
    <1039831>   DW_AT_call_file   : 1
    <1039832>   DW_AT_call_line   : 58
 <3><1039833>: Abbrev Number: 96 (DW_TAG_formal_parameter)
    <1039834>   DW_AT_abstract_origin: <0x103831e>
 <3><1039838>: Abbrev Number: 70 (DW_TAG_formal_parameter)
    <1039839>   DW_AT_abstract_origin: <0x1038313>
    <103983d>   DW_AT_location    : 0x53264a    (location list)
 <3><1039841>: Abbrev Number: 86 (DW_TAG_lexical_block)
    <1039842>   DW_AT_ranges      : 0x14a0f0
 <4><1039846>: Abbrev Number: 87 (DW_TAG_variable)
    <1039847>   DW_AT_abstract_origin: <0x1038334>
    <103984b>   DW_AT_location    : 0x532696    (location list)
 <4><103984f>: Abbrev Number: 87 (DW_TAG_variable)
    <1039850>   DW_AT_abstract_origin: <0x103833f>
    <1039854>   DW_AT_location    : 0x5326f4    (location list)
 <4><1039858>: Abbrev Number: 96 (DW_TAG_formal_parameter)
    <1039859>   DW_AT_abstract_origin: <0x1038329>
 <4><103985d>: Abbrev Number: 94 (DW_TAG_variable)
    <103985e>   DW_AT_abstract_origin: <0x103834a>
    <1039862>   DW_AT_location    : 9 byte block: 3 c0 0 0 0 0 79 3e
a0         (DW_OP_addr: c000000000793ea0)


Thank you,
Venkata Ramanaiah N



More information about the Dwarf-discuss mailing list