Page MenuHomePhabricator

SouraVX (Sourabh Singh Tomar)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 27 2019, 11:05 PM (7 w, 2 d)

Recent Activity

Yesterday

SouraVX added a comment to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

Hi @probinson @dblaikie @aprantl , I've was investigating and working on your inputs regarding the problem with DW_at_defaulted once. I think clang has also some issues. Though I'm not able to precisely point out. I ranned into some problems in CFE while marking out_of_class functions. i.e consider this for instance "debug-info-defaulted-out_of_class.cpp" FIXME:. Causing too much trouble and possibly can introduce some bugs in clang/llvm.
May be we'll reconsider this in future. Thanks for putting time in reviewing and discussing this.

Thu, Oct 17, 10:56 PM · debug-info, Restricted Project, Restricted Project

Tue, Oct 15

SouraVX updated the diff for D68697: [DWARF5] Added support for DW_AT_noreturn attribute to be emitted for C++ class member functions..

Added test case in CFE for checking expected LLVM IR emission.

Tue, Oct 15, 10:13 PM · Restricted Project, Restricted Project, debug-info
SouraVX added inline comments to D68697: [DWARF5] Added support for DW_AT_noreturn attribute to be emitted for C++ class member functions..
Tue, Oct 15, 8:56 AM · Restricted Project, Restricted Project, debug-info
SouraVX added a comment to D68697: [DWARF5] Added support for DW_AT_noreturn attribute to be emitted for C++ class member functions..

Thanks Adrian for review!
Addressing your review comments.

Tue, Oct 15, 8:56 AM · Restricted Project, Restricted Project, debug-info
SouraVX updated the diff for D68697: [DWARF5] Added support for DW_AT_noreturn attribute to be emitted for C++ class member functions..

Thanks Adrian for review!
Addressing your review comments.

Tue, Oct 15, 8:56 AM · Restricted Project, Restricted Project, debug-info
SouraVX added a comment to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

We really do want to pack the four mutually exclusive cases into two bits. I have tried to give more explicit comments inline to explain how you would do this. It really should work fine, recognizing that the "not defaulted" case is not explicitly represented in the textual IR because it uses a zero value in the defaulted/deleted subfield of SPFlags.

Thanks Paul, for suggesting this. Your approach works fine. But as I was working on some lvm-dwarfdump test cases. We seems to miss one corner case --
Consider this test case;
class foo{

foo() = default;
~foo() = default;
 void not_special() {}

};
void not_a_member_of_foo(){}

Now I'm getting DW_AT_defaulted getting emitted with value DW_DEFAULTED_no, for functions "not_special" and "not_a_member_of_foo". This behavior is undesirable since, DW_AT_defaulted attributes is only valid for C++ special member functions{Constructors/Destructors, ...}.

Please correct me if I'm wrong -- Now This attributes to- implicitly defined "0" NotDefaulted bit. which is getting checked{that's fine as long as we have a dedicated bits for distinguishing} and true for every subprogram or function in a CU.
void DwarfUnit::applySubprogramAttributes( ...
...
else if (SP->isNotDefaulted())

addUInt(SPDie, dwarf::DW_AT_defaulted, dwarf::DW_FORM_data1,
        dwarf::DW_DEFAULTED_no);

...

Perhaps we should only emit DEFAULTED_yes, and assume anything that's not DEFAULTED_yes, is... not defaulted?

Also: What features is anyone planning to build with this information? I'm sort of inclined not to implement features without some use-case in mind/planned.

Hi David, thanks for your suggestion. But, if we do that way, we may not be able to capture it's location and, whether that function was defaulted in or out of class.

Not sure I follow - for an out-of-class defaulting, I'd expect the non-defining (declaration) DW_TAG_subprogram inside the class to not have the DW_AT_defaulted attribute - and then the out of line definition would have DW_AT_defaulted = DEFAULTED_yes. For an inline defaulted definition, the non-defining DW_TAG_subprogram would have DW_AT_defaulted= DEFAULTED_yes, and the defining DW_TAG_subprogram would have no DW_AT_defaulted, it would inherit it from the declaration via DW_AT_specification.

Regarding the intent behind doing this, we have an initial internal requirement for 100% compliance towards DWARF-5 from producer{Clang} side.

I'd like to discuss that requirement a bit further - obviously I'm not your management/customers/etc, so I may not be able to sway you, but I don't believe absence of DW_AT_defaulted would classify as DWARFv5 non-conformance to me.

Producing, say, debug_ranges instead of debug_rnglists (both in terms of teh section used, and the format of the bytes in that section) would be non-conformant. But DWARF only suggests what some forms/attributes/etc might be useful for, it doesn't require them by any means.

Any idea what the particular motivation for compliance is? So you/we could evaluate whether this feature is meeting a need or not?

Tue, Oct 15, 7:49 AM · debug-info, Restricted Project, Restricted Project

Mon, Oct 14

SouraVX added a comment to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

We really do want to pack the four mutually exclusive cases into two bits. I have tried to give more explicit comments inline to explain how you would do this. It really should work fine, recognizing that the "not defaulted" case is not explicitly represented in the textual IR because it uses a zero value in the defaulted/deleted subfield of SPFlags.

Thanks Paul, for suggesting this. Your approach works fine. But as I was working on some lvm-dwarfdump test cases. We seems to miss one corner case --
Consider this test case;
class foo{

foo() = default;
~foo() = default;
 void not_special() {}

};
void not_a_member_of_foo(){}

Now I'm getting DW_AT_defaulted getting emitted with value DW_DEFAULTED_no, for functions "not_special" and "not_a_member_of_foo". This behavior is undesirable since, DW_AT_defaulted attributes is only valid for C++ special member functions{Constructors/Destructors, ...}.

Please correct me if I'm wrong -- Now This attributes to- implicitly defined "0" NotDefaulted bit. which is getting checked{that's fine as long as we have a dedicated bits for distinguishing} and true for every subprogram or function in a CU.
void DwarfUnit::applySubprogramAttributes( ...
...
else if (SP->isNotDefaulted())

addUInt(SPDie, dwarf::DW_AT_defaulted, dwarf::DW_FORM_data1,
        dwarf::DW_DEFAULTED_no);

...

Perhaps we should only emit DEFAULTED_yes, and assume anything that's not DEFAULTED_yes, is... not defaulted?

Also: What features is anyone planning to build with this information? I'm sort of inclined not to implement features without some use-case in mind/planned.

Mon, Oct 14, 8:43 AM · debug-info, Restricted Project, Restricted Project

Sun, Oct 13

SouraVX added a comment to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

We really do want to pack the four mutually exclusive cases into two bits. I have tried to give more explicit comments inline to explain how you would do this. It really should work fine, recognizing that the "not defaulted" case is not explicitly represented in the textual IR because it uses a zero value in the defaulted/deleted subfield of SPFlags.

Sun, Oct 13, 11:32 AM · debug-info, Restricted Project, Restricted Project

Wed, Oct 9

Herald added a project to D68697: [DWARF5] Added support for DW_AT_noreturn attribute to be emitted for C++ class member functions.: Restricted Project.
Wed, Oct 9, 5:40 AM · Restricted Project, Restricted Project, debug-info
SouraVX created D68697: [DWARF5] Added support for DW_AT_noreturn attribute to be emitted for C++ class member functions..
Wed, Oct 9, 5:22 AM · Restricted Project, Restricted Project, debug-info

Tue, Oct 8

SouraVX added inline comments to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..
Tue, Oct 8, 3:58 PM · debug-info, Restricted Project, Restricted Project
SouraVX added inline comments to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..
Tue, Oct 8, 3:45 PM · debug-info, Restricted Project, Restricted Project
SouraVX updated the diff for D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

Addressed comments, regarding flags.

Tue, Oct 8, 3:45 PM · debug-info, Restricted Project, Restricted Project
Herald added a project to D54597: [DebugInfo] DISubprogram flags get their own flags word. NFC: Restricted Project.
Tue, Oct 8, 12:12 PM · Restricted Project, debug-info

Fri, Oct 4

SouraVX added inline comments to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..
Fri, Oct 4, 10:16 AM · debug-info, Restricted Project, Restricted Project
SouraVX updated the diff for D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..
Fri, Oct 4, 10:02 AM · debug-info, Restricted Project, Restricted Project

Tue, Oct 1

SouraVX added a comment to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

Will be adding llvm-dwarfdump tests soon.

Tue, Oct 1, 2:11 PM · debug-info, Restricted Project, Restricted Project
SouraVX updated the diff for D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

Added test cases for debug info Clang frontend.

Tue, Oct 1, 2:08 PM · debug-info, Restricted Project, Restricted Project

Sat, Sep 28

SouraVX added a comment to D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

This needs a lot more test coverage: The frontend cases aren't all covered by frontend checks and neither is the dwarf output.

Sat, Sep 28, 12:57 AM · debug-info, Restricted Project, Restricted Project
SouraVX updated the diff for D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

Minor refactor for context.

Sat, Sep 28, 12:57 AM · debug-info, Restricted Project, Restricted Project

Thu, Sep 26

SouraVX updated the diff for D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..

Minor refactor.

Thu, Sep 26, 10:02 PM · debug-info, Restricted Project, Restricted Project
SouraVX created D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions..
Thu, Sep 26, 9:50 PM · debug-info, Restricted Project, Restricted Project

Tue, Sep 24

SouraVX added a comment to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.

/srv/llvm-buildbot-srcatch/llvm-build-dir/clang-x86_64-debian-fast/llvm.src/tools/clang/tools/extra/modularize/Modularize.cpp:583:13: warning: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Wswitch]
1 warning generated.

We also get that warning when compiling with clang 8:

../../clang-tools-extra/modularize/Modularize.cpp:583:13: error: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Werror,-Wswitch]
    switch (D->getLanguage()) {
            ^
1 error generated.
Tue, Sep 24, 2:58 AM · Restricted Project, Restricted Project, debug-info

Mon, Sep 23

SouraVX added a comment to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.

Please be sure the watch the lldb (and other debugger) bots after committing this..

Mon, Sep 23, 9:22 AM · Restricted Project, Restricted Project, debug-info

Wed, Sep 18

SouraVX added a comment to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.

Please be sure the watch the lldb (and other debugger) bots after committing this..

Thanks a lot!

Wed, Sep 18, 11:04 PM · Restricted Project, Restricted Project, debug-info
SouraVX added a comment to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.

Please be sure the watch the lldb (and other debugger) bots after committing this..

Wed, Sep 18, 10:54 PM · Restricted Project, Restricted Project, debug-info

Sep 17 2019

SouraVX updated the diff for D67613: [DWARF-5] Support for DWARF-5 C++ language tags.

Updated AST to use DWARF language enums.

Sep 17 2019, 10:35 PM · Restricted Project, Restricted Project, debug-info
SouraVX added inline comments to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.
Sep 17 2019, 10:52 AM · Restricted Project, Restricted Project, debug-info
SouraVX added inline comments to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.
Sep 17 2019, 9:19 AM · Restricted Project, Restricted Project, debug-info
SouraVX updated the diff for D67613: [DWARF-5] Support for DWARF-5 C++ language tags.

Removed underscores from names.

Sep 17 2019, 4:37 AM · Restricted Project, Restricted Project, debug-info

Sep 16 2019

SouraVX updated the diff for D67613: [DWARF-5] Support for DWARF-5 C++ language tags.
Sep 16 2019, 11:31 PM · Restricted Project, Restricted Project, debug-info
SouraVX added inline comments to D67613: [DWARF-5] Support for DWARF-5 C++ language tags.
Sep 16 2019, 11:23 PM · Restricted Project, Restricted Project, debug-info
SouraVX created D67613: [DWARF-5] Support for DWARF-5 C++ language tags.
Sep 16 2019, 5:20 AM · Restricted Project, Restricted Project, debug-info