[Lldb-commits] [PATCH] D47539: [Platform] Accept arbitrary kext variants

2018-05-30 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. LGTM. If we added more knowledge specifically about kext bundle layouts, we could restrict which files we test to see if they are valid binaries - but we'd need to parse the Info.plist at the top (to get the CFBundleExecutable name, and look for variations on that

[Lldb-commits] [PATCH] D47551: [IRMemoryMap] Fix the alignment adjustment in Malloc

2018-05-30 Thread Lang Hames via Phabricator via lldb-commits
lhames added a comment. LGTM. I haven't looked at process memory management. How hard would your FIXME be to implement? - Lang. https://reviews.llvm.org/D47551 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[Lldb-commits] [PATCH] D47551: [IRMemoryMap] Fix the alignment adjustment in Malloc

2018-05-30 Thread Vedant Kumar via Phabricator via lldb-commits
vsk updated this revision to Diff 149198. vsk added a reviewer: lhames. vsk added a comment. - Don't insert extra padding bytes when `alignment` = 1. - + Lang https://reviews.llvm.org/D47551 Files: lit/Expr/Inputs/ir-memory-map-basic.test lit/Expr/Inputs/ir-memory-map-overlap1.test lit/Ex

[Lldb-commits] [lldb] r333585 - [lldb-test] ir-memory-map: Avoid accessing a bad iterator

2018-05-30 Thread Vedant Kumar via lldb-commits
Author: vedantk Date: Wed May 30 12:46:47 2018 New Revision: 333585 URL: http://llvm.org/viewvc/llvm-project?rev=333585&view=rev Log: [lldb-test] ir-memory-map: Avoid accessing a bad iterator Do not access Probe.start() when Probe is at the end of the interval map. Modified: lldb/trunk/tools

[Lldb-commits] [PATCH] D47508: [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333583: [lldb-test] Add a testing harness for the JIT's IRMemoryMap (authored by vedantk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D4750

[Lldb-commits] [lldb] r333583 - [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Vedant Kumar via lldb-commits
Author: vedantk Date: Wed May 30 12:39:10 2018 New Revision: 333583 URL: http://llvm.org/viewvc/llvm-project?rev=333583&view=rev Log: [lldb-test] Add a testing harness for the JIT's IRMemoryMap This teaches lldb-test how to launch a process, set up an IRMemoryMap, and issue memory allocations in

[Lldb-commits] [PATCH] D47551: [IRMemoryMap] Fix the alignment adjustment in Malloc

2018-05-30 Thread Vedant Kumar via Phabricator via lldb-commits
vsk created this revision. vsk added reviewers: labath, zturner, jingham, aprantl. vsk edited the summary of this revision. This prevents Malloc from allocating the same chunk of memory twice, as a byproduct of an alignment adjustment which gave the client access to unallocated memory. Prior to t

[Lldb-commits] [PATCH] D47508: [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Thank you for making the changes. This looks fine to me. The more testing, the better. Comment at: tools/lldb-test/lldb-test.cpp:532 + // Print the result of the allocation

[Lldb-commits] [PATCH] D47508: [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Vedant Kumar via Phabricator via lldb-commits
vsk updated this revision to Diff 149173. vsk edited the summary of this revision. vsk added a comment. - Really fix the allocation overlap test. The previous version of this patch would not detect overlaps in which the end of the new allocation is contained within an existing allocation. > The

[Lldb-commits] [PATCH] D47508: [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added inline comments. Comment at: tools/lldb-test/lldb-test.cpp:503 + uint8_t Alignment; + int Matches = sscanf(Line.data(), "malloc %lu %hhu", &Size, &Alignment); + if (Matches != 2) labath wrote: > is `Line` null-terminated here? Also a size_t arg shoul

[Lldb-commits] [PATCH] D47508: [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Vedant Kumar via Phabricator via lldb-commits
vsk updated this revision to Diff 149159. vsk edited the summary of this revision. vsk added a comment. - Use %zu, and improve detection of overlapping allocations. https://reviews.llvm.org/D47508 Files: lit/Expr/TestIRMemoryMap.test source/Target/Process.cpp tools/lldb-test/lldb-test.cpp

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere abandoned this revision. JDevlieghere added a comment. Alright, let's abandon this and replace the existing uses with llvm iterators. Repository: rL LLVM https://reviews.llvm.org/D47535 ___ lldb-commits mailing list lldb-commits@list

[Lldb-commits] [PATCH] D47539: [Platform] Accept arbitrary kext variants

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 149143. JDevlieghere added a comment. Don't use `EnumerateDirectory` https://reviews.llvm.org/D47539 Files: source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h Index: source/Plugins/Platfo

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a subscriber: JDevlieghere. zturner added a comment. +1 I’d like to get rid of all EnumerateXXX with callback functions and replace with iterator based equivalents. Given that in this case the iterator version already exists, I definitely think we should try to use it instead Repos

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In https://reviews.llvm.org/D47535#1116430, @labath wrote: > In https://reviews.llvm.org/D47535#1116392, @JDevlieghere wrote: > > > In https://reviews.llvm.org/D47535#1116364, @labath wrote: > > > > > Actually, I wonder if we shouldn't just deprecate this function >

Re: [Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Zachary Turner via lldb-commits
+1 I’d like to get rid of all EnumerateXXX with callback functions and replace with iterator based equivalents. Given that in this case the iterator version already exists, I definitely think we should try to use it instead On Wed, May 30, 2018 at 9:30 AM Pavel Labath via Phabricator < revi...@revi

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath added a reviewer: zturner. labath added a comment. In https://reviews.llvm.org/D47535#1116392, @JDevlieghere wrote: > In https://reviews.llvm.org/D47535#1116364, @labath wrote: > > > Actually, I wonder if we shouldn't just deprecate this function altogether. > > What was your motivation f

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In https://reviews.llvm.org/D47535#1116364, @labath wrote: > Actually, I wonder if we shouldn't just deprecate this function altogether. > What was your motivation for this patch? It seems we already have > `llvm::fs::(recursive_)directory_iterator` for this purpos

[Lldb-commits] [PATCH] D47539: [Platform] Accept arbitrary kext variants

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: jasonmolenda, labath. When loading kexts in `PlatformDarwinKernel`, we use the BundleID as the filename to to create shared modules. In `GetSharedModule` we call `ExamineKextForMatchingUUID` for any BundleID it finds that is a mat

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Actually, I wonder if we shouldn't just deprecate this function altogether. What was your motivation for this patch? It seems we already have `llvm::fs::(recursive_)directory_iterator` for this purpose. It would be great if we could use that for all new code. Have you lo

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In https://reviews.llvm.org/D47535#1116274, @labath wrote: > Could we just get rid of the baton version? It's the only way the function is used currently. How about just phasing it out when we touch the relevant code? Repository: rL LLVM https://reviews.llvm.

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Could we just get rid of the baton version? Repository: rL LLVM https://reviews.llvm.org/D47535 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D47535: [FileSpec] Add support for lambdas to EnumerateDirectory. NFC

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: clayborg, labath. Herald added a subscriber: llvm-commits. Support both lambda's and function pointers as arguments to EnumerateDirectory. Repository: rL LLVM https://reviews.llvm.org/D47535 Files: include/lldb/Utility/FileS

[Lldb-commits] [PATCH] D47495: [FileSpec] Re-implmenet removeLastPathComponent

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333540: [FileSpec] Re-implmenet removeLastPathComponent (authored by JDevlieghere, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D47495?vs=14

[Lldb-commits] [lldb] r333540 - [FileSpec] Re-implmenet removeLastPathComponent

2018-05-30 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere Date: Wed May 30 06:03:16 2018 New Revision: 333540 URL: http://llvm.org/viewvc/llvm-project?rev=333540&view=rev Log: [FileSpec] Re-implmenet removeLastPathComponent When reading DBGSourcePathRemapping from a dSYM, we remove the last two path components to make the source loo

[Lldb-commits] [PATCH] D47495: [FileSpec] Re-implmenet removeLastPathComponent

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added inline comments. Comment at: unittests/Utility/FileSpecTest.cpp:342 + EXPECT_FALSE(fs_posix_relative.RemoveLastPathComponent()); + EXPECT_STREQ("foo", fs_posix_relative.GetCString()); + JDevlieghere wrote: > labath wr

[Lldb-commits] [PATCH] D47495: [FileSpec] Re-implmenet removeLastPathComponent

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: unittests/Utility/FileSpecTest.cpp:342 + EXPECT_FALSE(fs_posix_relative.RemoveLastPathComponent()); + EXPECT_STREQ("foo", fs_posix_relative.GetCString()); + labath wrote: > Is this the behavior you want here? I wa

[Lldb-commits] [PATCH] D47495: [FileSpec] Re-implmenet removeLastPathComponent

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: unittests/Utility/FileSpecTest.cpp:342 + EXPECT_FALSE(fs_posix_relative.RemoveLastPathComponent()); + EXPECT_STREQ("foo", fs_posix_relative.GetCString()); + Is this the behavior you want here? I was thinking we could fo

[Lldb-commits] [PATCH] D47495: Support relative paths with less than two components in DBGSourcePathRemapping

2018-05-30 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 149083. JDevlieghere marked an inline comment as done. JDevlieghere added a comment. - Replace custom logic with LLVM's path logic. - Add tests. https://reviews.llvm.org/D47495 Files: include/lldb/Utility/FileSpec.h source/Utility/FileSpec.cpp un

Re: [Lldb-commits] [lldb] r333465 - [ObjC] Fix the formatter for NSOrderedSet.

2018-05-30 Thread Pavel Labath via lldb-commits
I've added a @skipUnlessDarwin to the new test. Right now we don't have the ability to build or run ObjC tests on other platforms. On Tue, 29 May 2018 at 23:57, Davide Italiano via lldb-commits wrote: > > I would like to apologize, I forgot to `git add `the Makefile and this > broke the bots. It s

[Lldb-commits] [lldb] r333526 - @skipUnlessDarwin TestOrderedSet

2018-05-30 Thread Pavel Labath via lldb-commits
Author: labath Date: Wed May 30 03:04:32 2018 New Revision: 333526 URL: http://llvm.org/viewvc/llvm-project?rev=333526&view=rev Log: @skipUnlessDarwin TestOrderedSet Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py Modified: lldb/trunk/packages/Pyt

[Lldb-commits] [PATCH] D47508: [lldb-test] Add a testing harness for the JIT's IRMemoryMap

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. The idea that came to me while looking at this is testing this gdb-client style. This would allow you to mock the server responses to allocation and e.g. test handling of allocation failures. However, the problem is these tests sit on top of SBAPI and there seems to be

[Lldb-commits] [PATCH] D46810: 3/3: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

2018-05-30 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked an inline comment as done. jankratochvil added a comment. FYI I also checked in a regression (just looking at the source code) https://reviews.llvm.org/rL333517. Repository: rL LLVM https://reviews.llvm.org/D46810 ___ lldb-c

[Lldb-commits] [lldb] r333517 - Fix return value of DWARFUnit::ExtractDIEsIfNeeded()

2018-05-30 Thread Jan Kratochvil via lldb-commits
Author: jankratochvil Date: Wed May 30 01:54:46 2018 New Revision: 333517 URL: http://llvm.org/viewvc/llvm-project?rev=333517&view=rev Log: Fix return value of DWARFUnit::ExtractDIEsIfNeeded() This is a leftover regression from: https://reviews.llvm.org/D46810 Modified: lldb/trunk/source/Plu

[Lldb-commits] [PATCH] D47495: Support relative paths with less than two components in DBGSourcePathRemapping

2018-05-30 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I was also thinking whether this behavior needs to be conditional. If nothing depends on this, then I'm all for changing the condition. However, my question is whether "." is the only path we should treat this way. I'm thinking it would be more consistent to give the roo