[Lldb-commits] [PATCH] D72597: [lldb][DWARF] Added support for new forms in DWARFv5 macro.

2020-01-13 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a reviewer: shafik. shafik added inline comments. Comment at: lldb/test/Shell/Commands/dwarf5-macro.test:1 +# REQUIRES: x86 +# This test checks lldb macro expansion when macro section Is there a reason why we would only want to test this feature on x

[Lldb-commits] [PATCH] D72694: [lldb] Mark the implicit copy constructor as deleted when a move constructor is provided.

2020-01-17 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Comment at: lldb/packages/Python/lldbsuite/test/commands/expression/deleting-implicit-copy-constructor/main.cpp:14 + // should have propagated to this record and Clang

[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF

2020-01-17 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik created this revision. shafik added reviewers: aprantl, teemperor, jingham. We ran into an assert when debugging clang and performing an expression on a class derived from `DeclContext`. The assert was indicating we were getting the offsets wrong for `RecordDeclBitfields`. We were getting

[Lldb-commits] [PATCH] D73121: [lldb/Initializers] Move all ObjC initializers into AppleObjCRuntime

2020-01-21 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp:58 +void AppleObjCRuntime::Initialize() { + AppleObjCRuntimeV2::Initialize(); + AppleObjCRuntimeV1::Initialize(); I am curious does order m

[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF

2020-01-22 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik updated this revision to Diff 239732. shafik marked 14 inline comments as done. shafik added a comment. Realized that the assert that I was hitting in some cases only reproduced using C++ for example one case we needed to use a class w/ private members. So created a new bit-field test wh

[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF

2020-01-22 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2393 lldb_private::ClangASTImporter::LayoutInfo &layout_info, -BitfieldInfo &last_field_info) { +FieldInfo &last_bitfield_info, FieldInfo &last_field_info) { Mod

[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF

2020-01-23 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik updated this revision to Diff 239995. shafik marked an inline comment as done. shafik added a comment. - Addressing minor comments - Adding fix for TestObjCIvarOffsets.py we need to guard `last_field_info.NextBitfieldOffsetIsValid(...)` with a check to make sure we have a bit-field. Objec

[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF

2020-01-23 Thread Shafik Yaghmour via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfcaf5f6c01a0: [LLDB] Fix the handling of unnamed bit-fields when parsing DWARF (authored by shafik). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D72953?vs=239995&id=2

[Lldb-commits] [PATCH] D72953: Fix the handling of unnamed bit-fields when parsing DWARF

2020-01-24 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik marked 2 inline comments as done. shafik added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp:76 + lbd.arr[1] = 'b'; + lbd.arr[2] = 'c'; + lbd.a = 5; labath wrote: > BTW, I've changed this to '\0' because th

[Lldb-commits] [PATCH] D73345: [lldb] Don't create duplicate declarations when completing a forward declaration with a definition from another source

2020-01-27 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73345/new/ https://reviews.llvm.org/D73345 ___ lldb-commits

[Lldb-commits] [PATCH] D73024: [lldb] Complete return types of CXXMethodDecls to prevent crashing due to covariant return types

2020-01-27 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. LGTM Comment at: lldb/source/Symbol/ClangASTImporter.cpp:1006 +/// Takes a CXXMethodDecl and completes the return type if necessary. This +/// is currently only necessary for

[Lldb-commits] [PATCH] D73661: [lldb] Move clang-based files out of Symbol

2020-01-31 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. Making this a plugin makes sense. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73661/new/ https://reviews.llvm.org/D73661 ___ lldb-commits mailing list lldb-commits@

[Lldb-commits] [PATCH] D73148: [lldb/Value] Avoid reading more data than the host has available

2020-01-31 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. In D73148#1850978 , @vsk wrote: > Yikes, this version seems to break TestClassTemplateParameterPack.py (and > probably other tests as well). Maybe we expect to be able to read past the > end of the buffer inside of a ValueObjectCh

[Lldb-commits] [PATCH] D73913: [lldb/DataExtractor] Fix UB shift in GetMaxS64Bitfield

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. I wish I had caught that one when I did D70992 , might be worth checking out more of the code for similar issues. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73913/new/ https://reviews.llvm.org/D73913 __

[Lldb-commits] [PATCH] D73913: [lldb/DataExtractor] Fix UB shift in GetMaxS64Bitfield

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/source/Utility/DataExtractor.cpp:610 int64_t sval64 = GetMaxS64(offset_ptr, size); if (bitfield_bit_size > 0) { int32_t lsbcount = bitfield_bit_offset; We could do an early exit if `bitfield_bit_size` is z

[Lldb-commits] [PATCH] D73921: Assert that a subprogram should have a name when parsing DWARF

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik created this revision. shafik added reviewers: aprantl, jingham, labath, JDevlieghere. This is just an enforcement of the DWARF requirement that a `DW_TAG_subprogram` should have a `DW_AT_name`. This came up when updating how we generating some debug info and one of the possible change c

[Lldb-commits] [PATCH] D73860: [lldb/StringPrinter] Avoid reading garbage in uninitialized strings

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. Is this missing additions to `TestDataFormatterLibcxxString.py`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73860/new/ https://reviews.llvm.org/D73860 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http

[Lldb-commits] [PATCH] D73860: [lldb/StringPrinter] Avoid reading garbage in uninitialized strings

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp:29 +if (sizeof(std::string) == sizeof(garbage_string_sso)) + memcpy((void *)&garbage1, &garbage_string_sso, sizeof(std:

[Lldb-commits] [PATCH] D73808: [lldb/TypeSystemClang] Supply trivial TypeSourceInfo to NonTypeTemplateParmDecl::Create

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/source/Symbol/TypeSystemClang.cpp:1283 + identifier_info, template_param_type, parameter_pack, + ast.getTrivialTypeSourceInfo(template_param_type))); } else { There is another `push_back` with

[Lldb-commits] [PATCH] D73860: [lldb/StringPrinter] Avoid reading garbage in uninitialized strings

2020-02-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp:29 +if (sizeof(std::string) == sizeof(garbage_string_sso)) + memcpy((void *)&garbage1, &garbage_string_sso, sizeof(std:

[Lldb-commits] [PATCH] D73921: Assert that a subprogram should have a name when parsing DWARF

2020-02-04 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik planned changes to this revision. shafik added a comment. Everyone has brought up great feedback, let me go back and revise this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73921/new/ https://reviews.llvm.org/D73921 ___ lldb-commi

[Lldb-commits] [PATCH] D73969: [LLDB] Let DataExtractor deal with two-byte addresses

2020-02-04 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. Since we are doing the same test all over `m_addr_size >= 1 && m_addr_size <= 8` can we just make it a function and avoid the repetition and potential erroneous updating later on that does not fix them all? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73969/new

[Lldb-commits] [PATCH] D73860: [lldb/StringPrinter] Avoid reading garbage in uninitialized strings

2020-02-04 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp:23 +}; +static struct { + uint64_t cap = 5; This is much nicer then the previous raw arrays and self-documents

<    3   4   5   6   7   8