[Lldb-commits] [PATCH] D67376: [DWARF] Evaluate DW_OP_entry_value

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk planned changes to this revision. vsk added a comment. TODO: - Split out llvm change. - Add a test to validate that lldb skips inline frames when evaluating DW_OP_entry_value. Comment at:

[Lldb-commits] [PATCH] D67376: [DWARF] Evaluate DW_OP_entry_value

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk updated this revision to Diff 219462. vsk marked 7 inline comments as done. vsk added a comment. - Partially address review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67376/new/ https://reviews.llvm.org/D67376 Files: lldb/include/lldb/Symbol/Function.h

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added a comment. Looks good overall, especially the testing. Comment at: lldb/include/lldb/Utility/Scalar.h:107 + /// Return the most efficient Scalar::Type for the requested size. + static Type GetBestType(size_t bit_size, bool sign); + JDevlieghere

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371474: [Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit` (authored by JDevlieghere, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[Lldb-commits] [lldb] r371474 - [Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit`

2019-09-09 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Mon Sep 9 17:20:50 2019 New Revision: 371474 URL: http://llvm.org/viewvc/llvm-project?rev=371474=rev Log: [Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit` This removes the CleanUp class and replaces its usages with llvm's ScopeExit, which has similar

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks a lot! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67378/new/ https://reviews.llvm.org/D67378 ___ lldb-commits mailing list

[Lldb-commits] [lldb] r371472 - [Expression] Remove unused header from LLVMUserExpression

2019-09-09 Thread Alex Langford via lldb-commits
Author: xiaobai Date: Mon Sep 9 16:59:54 2019 New Revision: 371472 URL: http://llvm.org/viewvc/llvm-project?rev=371472=rev Log: [Expression] Remove unused header from LLVMUserExpression Modified: lldb/trunk/source/Expression/LLVMUserExpression.cpp Modified:

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D67378#1664070 , @jingham wrote: > This pattern repeated a couple of times north or the one you fixed. Can you > get those too? Thanks, I missed those. I believe I covered all the cases that were multi-line

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 219457. JDevlieghere added a comment. Add more comments to keep the original formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67378/new/ https://reviews.llvm.org/D67378 Files: lldb/include/lldb/Utility/CleanUp.h

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. This pattern repeated a couple of times north or the one you fixed. Can you get those too? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67378/new/ https://reviews.llvm.org/D67378 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:2571 + if (stack.size() < 1) { +if (error_ptr) + error_ptr->SetErrorString( aprantl wrote: > JDevlieghere wrote: > > Can we wrap this in a lambda? >

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 219454. JDevlieghere added a comment. Add a comment so you can easily break on the cleanup code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67378/new/ https://reviews.llvm.org/D67378 Files: lldb/include/lldb/Utility/CleanUp.h

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:2571 + if (stack.size() < 1) { +if (error_ptr) + error_ptr->SetErrorString( JDevlieghere wrote: > Can we wrap

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/include/lldb/Utility/Scalar.h:107 + /// Return the most efficient Scalar::Type for the requested size. + static Type GetBestType(size_t bit_size, bool sign); + How about `GetTypeForBitSize`?

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jim Ingham via Phabricator via lldb-commits
jingham added inline comments. Comment at: lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:901-902 // Make sure we deallocate the buffer memory: -buffer_cleanup.emplace([process, buffer_addr] { -process->DeallocateMemory(buffer_addr); -}); +

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 219449. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67378/new/ https://reviews.llvm.org/D67378 Files: lldb/include/lldb/Utility/CleanUp.h lldb/source/Host/macosx/objcxx/Host.mm lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp

[Lldb-commits] [PATCH] D67378: [Utility] Replace Cleanup by llvm::scope_exit

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: vsk, davide, teemperor, labath. JDevlieghere added a project: LLDB. Herald added subscribers: abidh, mgorny, emaste. JDevlieghere updated this revision to Diff 219449. This removes the CleanUp class and replaces its usages with

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/source/Utility/Scalar.cpp:423 +if (bit_size <= sizeof(int)*8) return Scalar::e_sint; +if (bit_size <= sizeof(long)*8) return Scalar::e_slong; +if (bit_size <= sizeof(long

[Lldb-commits] [lldb] r371470 - [Symbol] Give ClangASTContext a PersistentExpressionState instead of a ClangPersistentVariables

2019-09-09 Thread Alex Langford via lldb-commits
Author: xiaobai Date: Mon Sep 9 16:11:43 2019 New Revision: 371470 URL: http://llvm.org/viewvc/llvm-project?rev=371470=rev Log: [Symbol] Give ClangASTContext a PersistentExpressionState instead of a ClangPersistentVariables ClangASTContext doesn't use m_persistent_variables in a way specific

[Lldb-commits] [PATCH] D67376: [DWARF] Evaluate DW_OP_entry_value

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. This is very exciting! Comment at: lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values/Makefile:4 +include $(LEVEL)/Makefile.rules +CXXFLAGS += -g -O1 -glldb -Xclang -femit-debug-entry-values The -g

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lldb/source/Utility/Scalar.cpp:423 +if (bit_size <= sizeof(int)*8) return Scalar::e_sint; +if (bit_size <= sizeof(long)*8) return Scalar::e_slong; +if (bit_size <= sizeof(long

[Lldb-commits] [PATCH] D67376: [DWARF] Evaluate DW_OP_entry_value

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk updated this revision to Diff 219442. vsk added a comment. - Clean up the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67376/new/ https://reviews.llvm.org/D67376 Files: lldb/include/lldb/Symbol/Function.h lldb/packages/Python/lldbsuite/test/decorators.py

[Lldb-commits] [PATCH] D67376: [DWARF] Evaluate DW_OP_entry_value

2019-09-09 Thread Vedant Kumar via Phabricator via lldb-commits
vsk created this revision. vsk added reviewers: aprantl, friss, jasonmolenda, jingham. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Add support for evaluating DW_OP_entry_value. This involves: - Teaching clang to emit debug entry values when the debugger

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. LGTM, nice job with the test case, I see myself copying that in the future. :) Comment at: lldb/source/Utility/Scalar.cpp:423 +if (bit_size <= sizeof(int)*8)

[Lldb-commits] [lldb] r371460 - Revert "[Reproducer] Add a `cont` to ModuleCXX.test"

2019-09-09 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Mon Sep 9 15:07:45 2019 New Revision: 371460 URL: http://llvm.org/viewvc/llvm-project?rev=371460=rev Log: Revert "[Reproducer] Add a `cont` to ModuleCXX.test" This should no longer be necessary after r371459. Modified:

[Lldb-commits] [lldb] r371459 - [Reproducer] Disconnect when the replay server is out of packets.

2019-09-09 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Mon Sep 9 15:05:48 2019 New Revision: 371459 URL: http://llvm.org/viewvc/llvm-project?rev=371459=rev Log: [Reproducer] Disconnect when the replay server is out of packets. This is a fix for the issue described in r371144. > On more than one occasion I've found this

[Lldb-commits] [PATCH] D67370: Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz

2019-09-09 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. $ git llvm push Pushing 1 monorepo commit: f54a49a8133 Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz Sending lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py

[Lldb-commits] [PATCH] D67370: Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz

2019-09-09 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371457: Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz (authored by gclayton, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[Lldb-commits] [lldb] r371457 - Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz

2019-09-09 Thread Greg Clayton via lldb-commits
Author: gclayton Date: Mon Sep 9 14:45:49 2019 New Revision: 371457 URL: http://llvm.org/viewvc/llvm-project?rev=371457=rev Log: Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz Prior to this fix, ELF files might contain PT_LOAD program headers that had a valid

[Lldb-commits] [PATCH] D67370: Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz

2019-09-09 Thread Greg Clayton via Phabricator via lldb-commits
clayborg created this revision. clayborg added reviewers: labath, aprantl. Prior to this fix, ELF files might contain PT_LOAD program headers that had a valid p_vaddr, and a valid file p_offset, but the p_filesz would be zero. For example in

[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

2019-09-09 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl created this revision. aprantl added reviewers: jasonmolenda, davide, labath, clayborg. Herald added a project: LLDB. aprantl added a reviewer: jakubjelinek. This patch adds basic support for DW_OP_convert[1] for integer types. Recent versions of LLVM's optimizer may insert this opcode

[Lldb-commits] [PATCH] D65677: [VirtualFileSystem] Make the RedirectingFileSystem hold on to its own working directory.

2019-09-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 219398. JDevlieghere added a comment. Implement Sam's suggestion for changing the external file system's working directory. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65677/new/ https://reviews.llvm.org/D65677 Files:

[Lldb-commits] [PATCH] D67022: Enhance SymbolFileDWARF::ParseDeclsForContext performance

2019-09-09 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. LGTM. Test seems about as good as we can do. Pavel, you ok with this now? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67022/new/ https://reviews.llvm.org/D67022 ___

[Lldb-commits] [PATCH] D67022: Enhance SymbolFileDWARF::ParseDeclsForContext performance

2019-09-09 Thread Guilherme Andrade via Phabricator via lldb-commits
guiandrade added a comment. Maybe we could use the previous workaround until we find something better? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67022/new/ https://reviews.llvm.org/D67022 ___

[Lldb-commits] [PATCH] D67022: Enhance SymbolFileDWARF::ParseDeclsForContext performance

2019-09-09 Thread Guilherme Andrade via Phabricator via lldb-commits
guiandrade updated this revision to Diff 219372. guiandrade edited the summary of this revision. guiandrade added a comment. Herald added subscribers: kadircet, ilya-biryukov. Falling back to the previous workaround to test EnsureAllDIEsInDeclContextHaveBeenParsed. Repository: rG LLVM Github

[Lldb-commits] [PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-09-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk added a comment. @labath I have greatly improved the set and hit breakpoint test. Thank you again @jankratochvil for bringing my attention to `-Wl,--dynamic-list`. That helped to put one symbol in `.dynsym` explicitly. I will see if I can utilize that knowledge to separate out the patch

[Lldb-commits] [PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-09-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 219369. kwk added a comment. - Remove -x from %lldb because that expands to the command which already includes it - Improve and fix the minidebuginfo-set-and-hit-breakpoint.test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [lldb] r371417 - LLDB - Simplify GetProgramFileSpec

2019-09-09 Thread David Carlier via lldb-commits
Author: devnexen Date: Mon Sep 9 09:10:14 2019 New Revision: 371417 URL: http://llvm.org/viewvc/llvm-project?rev=371417=rev Log: LLDB - Simplify GetProgramFileSpec Reviewers: zturner, emaste Reviewed By: emaste Differential Revision: https://reviews.llvm.org/D46518 Modified:

[Lldb-commits] [PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-09-09 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments. Comment at: lldb/source/Host/common/LZMA.cpp:124 + llvm::SmallVectorImpl ) { + if (InputBuffer.size() == 0) +return llvm::createStringError(llvm::inconvertibleErrorCode(), empty Comment

[Lldb-commits] [PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-09-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk marked an inline comment as done. kwk added inline comments. Comment at: lldb/lit/Breakpoint/minidebuginfo-set-and-hit-breakpoint.test:50 + +# RUN: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%T %lldb -x -b -o 'b multiplyByThree' -o 'b multiplyByFour' -o 'breakpoint list -v' -o 'run'

[Lldb-commits] [PATCH] D67347: [Windows] Use information from the PE32 exceptions directory to construct unwind plans

2019-09-09 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. At the object file level I would love to see much less of this specific unwind info making it into the ObjectFile interface. Why can't we just ask the ObjectFile to provide an UnwindPlan for a given address. There is so much complexity within the UnwindPlan where it

[Lldb-commits] [PATCH] D67347: [Windows] Use EH info from the PE32 exceptions directory to construct unwind plans

2019-09-09 Thread Aleksandr Urakov via Phabricator via lldb-commits
aleksandr.urakov created this revision. Herald added subscribers: llvm-commits, lldb-commits, JDevlieghere, MaskRay, arichardson, aprantl, mgorny, emaste. Herald added a reviewer: espindola. Herald added projects: LLDB, LLVM. This patch adds an implementation of reconstructing of unwind plans

[Lldb-commits] [PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-09-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk marked an inline comment as done. kwk added a comment. labath, please see my answer to your question and maybe help me out why you think I don't test what I want to test. Comment at: lldb/lit/Breakpoint/minidebuginfo-set-and-hit-breakpoint.test:50 + +# RUN:

[Lldb-commits] [PATCH] D65677: [VirtualFileSystem] Make the RedirectingFileSystem hold on to its own working directory.

2019-09-09 Thread Sam McCall via Phabricator via lldb-commits
sammccall added a comment. BTW, This approach does look much better to me, it fits well into the VFS abstraction and I'd argue is fixing a bug in RedirectingFileSystem. We do need to be careful about introducing new bugs, though. (or avoid the generality and just implement the parts LLDB needs,

[Lldb-commits] [PATCH] D65677: [VirtualFileSystem] Make the RedirectingFileSystem hold on to its own working directory.

2019-09-09 Thread Sam McCall via Phabricator via lldb-commits
sammccall added a subscriber: benlangmuir. sammccall added inline comments. Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1051 std::error_code RedirectingFileSystem::setCurrentWorkingDirectory(const Twine ) { + // Don't change the working directory if the path doesn't