[Lldb-commits] [PATCH] D46548: Really test type lookup in TestCppTypeLookup.py

2018-05-07 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: clayborg, jingham. ... and fix one bug found this way. Currently, the test works not because types are looked up correctly, but because by injecting local variables we also materialize the types for Clang. If we disable the local variable

[Lldb-commits] [PATCH] D46551: Inject only relevant local variables in the expression evaluation context

2018-05-07 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: jingham, clayborg. In r259902, LLDB started injecting all the locals in every expression evaluation. This fixed a bunch of issues, but also caused others, mostly performance regressions on some codebases. The regressions were bad enough that we

[Lldb-commits] [PATCH] D46548: Really test type lookup in TestCppTypeLookup.py

2018-05-07 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331719: Really test type lookup in TestCppTypeLookup.py (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46548 Files:

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:1046-1047 + { +static std::mutex do_dlopen_mutex; +std::lock_guard lock(do_dlopen_mutex); + clayborg wrote: > We should put the mutex, or better yet a

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added a reviewer: jingham. Herald added a subscriber: emaste. Multiple threads could be calling into DoLoadImage concurrently, only one should be allowed to create the UtilityFunction. https://reviews.llvm.org/D46733 Files:

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-11 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332115: Add a lock to PlatformPOSIX::DoLoadImage (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[Lldb-commits] [PATCH] D46736: HostInfoMacOSX: Share the clang resource directory with Swift.

2018-05-11 Thread Frederic Riss via Phabricator via lldb-commits
friss accepted this revision. friss added inline comments. This revision is now accepted and ready to land. Comment at: source/Host/macosx/HostInfoMacOSX.mm:288 + // Fall back to the Clang resource directory inside the framework. + raw_path.resize(rev_it - r_end);

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 146268. friss added a comment. I heted the idea of hosting the once_flag in Process but using it in PlatformPOSIX. I did a bigger refactoring where platforms pass a factory lambda to the accessor and the thread-safe init is done in the Process class itself

[Lldb-commits] [PATCH] D48303: Don't take the address of an xvalue when printing an expr result

2018-06-19 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: packages/Python/lldbsuite/test/expression_command/xvalue/TestXValuePrinting.py:32 +self.assertTrue(value.GetError().Success()) +self.assertEqual(value.GetValueAsUnsigned(), 0) + Could you use a different

[Lldb-commits] [PATCH] D48393: Make DWARFParsing more thread-safe

2018-06-20 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: clayborg, labath, jingham. Herald added subscribers: JDevlieghere, aprantl. Debug information is read lazily so a lot of the state of the reader is constructred incrementally. There's also nothing preventing symbol queries to be performed at the

[Lldb-commits] [PATCH] D48393: Make DWARFParsing more thread-safe

2018-06-20 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. In https://reviews.llvm.org/D48393#1138398, @zturner wrote: > Long term I think one potentially interesting possibility for solving a lot > of these threading and lazy evaluation issues is to make a task queue that > runs all related operations on a single thread and

[Lldb-commits] [PATCH] D43546: Fix TestMultithreaded when specifying an alternative debugserver.

2018-02-20 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. This test launches a helper that uses the debugserver. The environment variable sepcifying the debug server wasn't passed to this helper, thus it was using the default one. I'd love to hear if anyone has a nicer idea how to get access to the alternative server passed

[Lldb-commits] [PATCH] D43592: [DWARFASTParserClang] Always complete types read from a module/PCH AST context.

2018-02-22 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. Note that this code path is only triggered when importing debug info from a different AST context, it is not the common codepath. The issue in this case is that LLDB is crashing when using the incomplete Decl as the DeclContext for another one. I guess I could add calls

[Lldb-commits] [PATCH] D43577: Fix TestUbsanBasic

2018-02-22 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325859: Fix TestUbsanBasic (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43577?vs=135263=135590#toc Repository: rL

[Lldb-commits] [PATCH] D43546: Fix TestMultithreaded when specifying an alternative debugserver.

2018-02-22 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325858: Fix TestMultithreaded when specifying an alternative debugserver. (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[Lldb-commits] [PATCH] D43577: Fix TestUbsanBasic

2018-02-21 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added a reviewer: vsk. Herald added a subscriber: kubamracek. Potentially due to the recent testuite refactorings, this test now reports a full absolute path but expect just the filename. For some reason this test is skipped on GreenDragon so we've never seen

[Lldb-commits] [PATCH] D43592: [DWARFASTParserClang] Always complete types read from a module/PCH AST context.

2018-02-21 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added a reviewer: clayborg. Herald added subscribers: JDevlieghere, aprantl. The modified test would just crash without the code change. The reason is that we would try to extend the Foo type imported from the PCH debug info when adding the Foo::Bar definitiion

[Lldb-commits] [PATCH] D50536: Fix: ConstString::GetConstCStringAndSetMangledCounterPart() should update the value if the key exists already

2018-08-10 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: source/Utility/ConstString.cpp:123-126 + assert((map.find(demangled) == map.end() || strlen(map[demangled]) == 0 || + map[demangled] == mangled_ccstr) && + "The demangled string must have a unique

[Lldb-commits] [PATCH] D51245: Allow IRInterpreter to deal with non-power-of-2 sized types to support some bitfield accesses.

2018-08-24 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: jingham, clayborg. For some bitfield patterns (like the one added by this commit), Clang will generate non-regular data types like i24 or i48. This patch follows a pretty naive approach of just bumping the type size to the next power of 2.

[Lldb-commits] [PATCH] D51387: Allow Template argument accessors to automatically unwrap parameter packs

2018-08-28 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: jingham, clayborg. Herald added a subscriber: JDevlieghere. When looking at template arguments in LLDB, we usually care about what the user passed in his code, not whether some of those arguments where passed as a variadic parameter pack. This

[Lldb-commits] [PATCH] D51245: Allow IRInterpreter to deal with non-power-of-2 sized types to support some bitfield accesses.

2018-08-28 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340880: Allow IRInterpreter to deal with non-power-of-2 sized types to support some… (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[Lldb-commits] [PATCH] D51245: Allow IRInterpreter to deal with non-power-of-2 sized types to support some bitfield accesses.

2018-08-28 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB340880: Allow IRInterpreter to deal with non-power-of-2 sized types to support some… (authored by friss, committed by ). Herald added a subscriber: abidh. Changed prior to commit:

[Lldb-commits] [PATCH] D49612: Use LLVM's new ItaniumPartialDemangler in LLDB

2018-07-20 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. Stefan, you should always add lldb-commits to the subscribers of your phab reviews. I added it now, but IIRC there are issues with adding subscribers after the fact. https://reviews.llvm.org/D49612 ___ lldb-commits mailing

[Lldb-commits] [PATCH] D51387: Allow Template argument accessors to automatically unwrap parameter packs

2018-08-30 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 163399. friss added a comment. Address feedback https://reviews.llvm.org/D51387 Files: include/lldb/Symbol/ClangASTContext.h include/lldb/Symbol/CompilerType.h include/lldb/Symbol/TypeSystem.h

[Lldb-commits] [PATCH] D51387: Allow Template argument accessors to automatically unwrap parameter packs

2018-08-30 Thread Frederic Riss via Phabricator via lldb-commits
friss marked 2 inline comments as done. friss added inline comments. Comment at: include/lldb/Symbol/ClangASTContext.h:284 + ((bool)pack_name == (bool)packed_args) && + (!packed_args || !packed_args->args.empty()); } friss wrote: >

[Lldb-commits] [PATCH] D51387: Allow Template argument accessors to automatically unwrap parameter packs

2018-08-30 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: source/Symbol/ClangASTContext.cpp:7664 + + assert(args.size() && + "We shouldn't have a template specialization without any args"); friss wrote: > shafik wrote: > > The asset before we do math making this

[Lldb-commits] [PATCH] D51387: Allow Template argument accessors to automatically unwrap parameter packs

2018-08-29 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: include/lldb/Symbol/ClangASTContext.h:284 + ((bool)pack_name == (bool)packed_args) && + (!packed_args || !packed_args->args.empty()); } shafik wrote: > Is this saying that an empty parameter

[Lldb-commits] [PATCH] D45298: [debugserver] Fix LC_BUILD_VERSION load command handling.

2018-04-04 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: jasonmolenda, labath. In one of the 2 places the LC_BUILD_VERSION load command is handled, there is a bug preventing us from actually handling them (the address where to read the load command was not updated). This patch factors reading the

[Lldb-commits] [PATCH] D45298: [debugserver] Fix LC_BUILD_VERSION load command handling.

2018-04-05 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329374: [debugserver] Fix LC_BUILD_VERSION load command handling. (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[Lldb-commits] [PATCH] D45298: [debugserver] Fix LC_BUILD_VERSION load command handling.

2018-04-05 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py:16-18 +sim_devices_str = subprocess.check_output(['xcrun', 'simctl', 'list', '-j', + 'devices']) +

[Lldb-commits] [PATCH] D45011: Prevent double release of mach ports

2018-03-28 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added a reviewer: jasonmolenda. When a MIG routine returns KERN_FAILURE, the demux function will release any OOL resources like ports. In this case, task_port and thread_port will be released twice, potentially resulting in use after free of the ports. I

[Lldb-commits] [PATCH] D45011: Prevent double release of mach ports

2018-03-28 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328761: Prevent double release of mach ports (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45011 Files:

[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-04-02 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328984: Support template template parameters (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44613 Files:

[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-04-01 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. Ping https://reviews.llvm.org/D44613 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D43592: [DWARFASTParserClang] Always complete types read from a module/PCH AST context.

2018-03-16 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 138733. friss added a comment. I experimented quite a bit with different approches to fix this bug without always completing the types right after importing them from the external AST. This is the most principled approach I came up with. I applied the new

[Lldb-commits] [PATCH] D43592: [DWARFASTParserClang] Always complete types read from a module/PCH AST context.

2018-03-16 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 138734. friss added a comment. Adding back a hunk I didn't mean to delete. https://reviews.llvm.org/D43592 Files: packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp

[Lldb-commits] [PATCH] D43592: [DWARFASTParserClang] Always complete types read from a module/PCH AST context.

2018-03-16 Thread Frederic Riss via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL327750: [DWARFASTParserClang] Complete external record types before using them as a… (authored by friss, committed by ).

[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-03-19 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2043 +is_template_template_argument = true; +[[clang::fallthrough]]; case DW_TAG_template_type_parameter: clayborg wrote: > Shouldn't we be using a

[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-03-18 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: clayborg, jingham. Herald added a subscriber: JDevlieghere. We would fail to resolve (and thus display the value of) any templated type which contained a template template argument even though we don't really use template arguments. This patch

[Lldb-commits] [PATCH] D44613: Support template template parameters

2018-03-23 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 139619. friss added a comment. Use LLVM macro for fallthrough https://reviews.llvm.org/D44613 Files: include/lldb/Symbol/ClangASTContext.h packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py

[Lldb-commits] [PATCH] D48393: Make DWARFParsing more thread-safe

2018-09-25 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. In https://reviews.llvm.org/D48393#1245049, @clayborg wrote: > In https://reviews.llvm.org/D48393#1244649, @labath wrote: > > > I agree with Greg that it would be best to restrict things such that there > > is only one instance of parsing going on at any given time for a

[Lldb-commits] [PATCH] D51387: Allow Template argument accessors to automatically unwrap parameter packs

2018-09-13 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. @jingham ping https://reviews.llvm.org/D51387 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits