[Lldb-commits] [lldb] r283321 - Fixing new Minidump plugin tests
Author: dvlahovski Date: Wed Oct 5 09:35:30 2016 New Revision: 283321 URL: http://llvm.org/viewvc/llvm-project?rev=283321&view=rev Log: Fixing new Minidump plugin tests Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 (with props) lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed (with props) Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py?rev=283321&r1=283320&r2=283321&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py Wed Oct 5 09:35:30 2016 @@ -18,22 +18,20 @@ class MiniDumpNewTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True -@expectedFailureAll -def test_process_info_in_mini_dump(self): +def test_process_info_in_minidump(self): """Test that lldb can read the process information from the Minidump.""" # target create -c linux-x86_64.dmp -self.dbg.CreateTarget("") +self.dbg.CreateTarget(None) self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64.dmp") self.assertTrue(self.process, PROCESS_IS_VALID) self.assertEqual(self.process.GetNumThreads(), 1) self.assertEqual(self.process.GetProcessID(), 16001) -@expectedFailureAll -def test_thread_info_in_mini_dump(self): +def test_thread_info_in_minidump(self): """Test that lldb can read the thread information from the Minidump.""" # target create -c linux-x86_64.dmp -self.dbg.CreateTarget("") +self.dbg.CreateTarget(None) self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64.dmp") # This process crashed due to a segmentation fault in its @@ -44,11 +42,10 @@ class MiniDumpNewTestCase(TestBase): stop_description = thread.GetStopDescription(256) self.assertTrue("SIGSEGV" in stop_description) -@expectedFailureAll -def test_stack_info_in_mini_dump(self): +def test_stack_info_in_minidump(self): """Test that we can see a trivial stack in a breakpad-generated Minidump.""" -# target create -c linux-x86_64.dmp -self.dbg.CreateTarget("") +# target create linux-x86_64 -c linux-x86_64.dmp +self.dbg.CreateTarget("linux-x86_64") self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64.dmp") self.assertEqual(self.process.GetNumThreads(), 1) @@ -65,11 +62,10 @@ class MiniDumpNewTestCase(TestBase): self.assertTrue(eip.IsValid()) self.assertEqual(pc, eip.GetValueAsUnsigned()) -@expectedFailureAll def test_snapshot_minidump(self): """Test that if we load a snapshot minidump file (meaning the process did not crash) there is no stop reason.""" # target create -c linux-x86_64_not_crashed.dmp -self.dbg.CreateTarget("") +self.dbg.CreateTarget(None) self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp") self.assertEqual(self.process.GetNumThreads(), 1) @@ -78,11 +74,11 @@ class MiniDumpNewTestCase(TestBase): stop_description = thread.GetStopDescription(256) self.assertEqual(stop_description, None) -@expectedFailureAll -def test_deeper_stack_in_mini_dump(self): +def test_deeper_stack_in_minidump(self): """Test that we can examine a more interesting stack in a Minidump.""" # Launch with the Minidump, and inspect the stack. -target = self.dbg.CreateTarget(None) +# target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp +target = self.dbg.CreateTarget("linux-x86_64_not_crashed") process = target.LoadCore("linux-x86_64_not_crashed.dmp") thread = process.GetThreadAtIndex(0) @@ -94,11 +90,11 @@ class MiniDumpNewTestCase(TestBase): function_name = frame.GetFunctionName() self.assertTrue(name in function_name) -@expectedFailureAll -def test_local_variables_in_mini_dump(self): +def test_local_variables_in_minidump(self): """Test that we can examine local variables in a Minidump.""" # Launch with the Minidump, and inspect a local variable. -target = self.dbg.CreateTarget(None) +# target cr
[Lldb-commits] [lldb] r283324 - xfailing minidump tests again ... :(
Author: dvlahovski Date: Wed Oct 5 10:00:29 2016 New Revision: 283324 URL: http://llvm.org/viewvc/llvm-project?rev=283324&view=rev Log: xfailing minidump tests again ... :( Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py?rev=283324&r1=283323&r2=283324&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py Wed Oct 5 10:00:29 2016 @@ -18,6 +18,7 @@ class MiniDumpNewTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True +@expectedFailureAll def test_process_info_in_minidump(self): """Test that lldb can read the process information from the Minidump.""" # target create -c linux-x86_64.dmp @@ -28,6 +29,7 @@ class MiniDumpNewTestCase(TestBase): self.assertEqual(self.process.GetNumThreads(), 1) self.assertEqual(self.process.GetProcessID(), 16001) +@expectedFailureAll def test_thread_info_in_minidump(self): """Test that lldb can read the thread information from the Minidump.""" # target create -c linux-x86_64.dmp @@ -42,6 +44,7 @@ class MiniDumpNewTestCase(TestBase): stop_description = thread.GetStopDescription(256) self.assertTrue("SIGSEGV" in stop_description) +@expectedFailureAll def test_stack_info_in_minidump(self): """Test that we can see a trivial stack in a breakpad-generated Minidump.""" # target create linux-x86_64 -c linux-x86_64.dmp @@ -62,6 +65,7 @@ class MiniDumpNewTestCase(TestBase): self.assertTrue(eip.IsValid()) self.assertEqual(pc, eip.GetValueAsUnsigned()) +@expectedFailureAll def test_snapshot_minidump(self): """Test that if we load a snapshot minidump file (meaning the process did not crash) there is no stop reason.""" # target create -c linux-x86_64_not_crashed.dmp @@ -74,6 +78,7 @@ class MiniDumpNewTestCase(TestBase): stop_description = thread.GetStopDescription(256) self.assertEqual(stop_description, None) +@expectedFailureAll def test_deeper_stack_in_minidump(self): """Test that we can examine a more interesting stack in a Minidump.""" # Launch with the Minidump, and inspect the stack. @@ -90,6 +95,7 @@ class MiniDumpNewTestCase(TestBase): function_name = frame.GetFunctionName() self.assertTrue(name in function_name) +@expectedFailureAll def test_local_variables_in_minidump(self): """Test that we can examine local variables in a Minidump.""" # Launch with the Minidump, and inspect a local variable. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283324 - xfailing minidump tests again ... :(
If all the tests are being xfailed you should probably just revert the original patch until the tests are fixed On Wed, Oct 5, 2016 at 8:09 AM Dimitar Vlahovski via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: dvlahovski > Date: Wed Oct 5 10:00:29 2016 > New Revision: 283324 > > URL: http://llvm.org/viewvc/llvm-project?rev=283324&view=rev > Log: > xfailing minidump tests again ... :( > > Modified: > > lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py?rev=283324&r1=283323&r2=283324&view=diff > > == > --- > lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py > (original) > +++ > lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py > Wed Oct 5 10:00:29 2016 > @@ -18,6 +18,7 @@ class MiniDumpNewTestCase(TestBase): > > NO_DEBUG_INFO_TESTCASE = True > > +@expectedFailureAll > def test_process_info_in_minidump(self): > """Test that lldb can read the process information from the > Minidump.""" > # target create -c linux-x86_64.dmp > @@ -28,6 +29,7 @@ class MiniDumpNewTestCase(TestBase): > self.assertEqual(self.process.GetNumThreads(), 1) > self.assertEqual(self.process.GetProcessID(), 16001) > > +@expectedFailureAll > def test_thread_info_in_minidump(self): > """Test that lldb can read the thread information from the > Minidump.""" > # target create -c linux-x86_64.dmp > @@ -42,6 +44,7 @@ class MiniDumpNewTestCase(TestBase): > stop_description = thread.GetStopDescription(256) > self.assertTrue("SIGSEGV" in stop_description) > > +@expectedFailureAll > def test_stack_info_in_minidump(self): > """Test that we can see a trivial stack in a breakpad-generated > Minidump.""" > # target create linux-x86_64 -c linux-x86_64.dmp > @@ -62,6 +65,7 @@ class MiniDumpNewTestCase(TestBase): > self.assertTrue(eip.IsValid()) > self.assertEqual(pc, eip.GetValueAsUnsigned()) > > +@expectedFailureAll > def test_snapshot_minidump(self): > """Test that if we load a snapshot minidump file (meaning the > process did not crash) there is no stop reason.""" > # target create -c linux-x86_64_not_crashed.dmp > @@ -74,6 +78,7 @@ class MiniDumpNewTestCase(TestBase): > stop_description = thread.GetStopDescription(256) > self.assertEqual(stop_description, None) > > +@expectedFailureAll > def test_deeper_stack_in_minidump(self): > """Test that we can examine a more interesting stack in a > Minidump.""" > # Launch with the Minidump, and inspect the stack. > @@ -90,6 +95,7 @@ class MiniDumpNewTestCase(TestBase): > function_name = frame.GetFunctionName() > self.assertTrue(name in function_name) > > +@expectedFailureAll > def test_local_variables_in_minidump(self): > """Test that we can examine local variables in a Minidump.""" > # Launch with the Minidump, and inspect a local variable. > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283324 - xfailing minidump tests again ... :(
The tests are failing because, as I did not realize, there is no way for lldb (apart from the one on my machine) to find the debug symbols. So the only thing that lldb has are the Minidump files. And I think the unwinder gets confused because some of the frames are missing. For a temporary solution in I will add the binaries to the test folder so that lldb can have the debug symbols. (which will be my next CL) When (hopefully) I add Minidump write support, the binaries could be removed, and I can use Adrian's approach when testing - include the cpp source in the test folder, then the test compiles it, runs the binary, sets a breakpoint, writes Minidump, inspects the Minidump, etc. On Wed, Oct 5, 2016 at 4:38 PM, Zachary Turner wrote: > If all the tests are being xfailed you should probably just revert the > original patch until the tests are fixed > > On Wed, Oct 5, 2016 at 8:09 AM Dimitar Vlahovski via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> Author: dvlahovski >> Date: Wed Oct 5 10:00:29 2016 >> New Revision: 283324 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=283324&view=rev >> Log: >> xfailing minidump tests again ... :( >> >> Modified: >> lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py >> >> Modified: lldb/trunk/packages/Python/lldbsuite/test/ >> functionalities/postmortem/minidump-new/TestMiniDumpNew.py >> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/ >> Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py?rev=283324&r1=283323&r2=283324&view=diff >> >> == >> --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py (original) >> +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py Wed Oct 5 10:00:29 2016 >> @@ -18,6 +18,7 @@ class MiniDumpNewTestCase(TestBase): >> >> NO_DEBUG_INFO_TESTCASE = True >> >> +@expectedFailureAll >> def test_process_info_in_minidump(self): >> """Test that lldb can read the process information from the >> Minidump.""" >> # target create -c linux-x86_64.dmp >> @@ -28,6 +29,7 @@ class MiniDumpNewTestCase(TestBase): >> self.assertEqual(self.process.GetNumThreads(), 1) >> self.assertEqual(self.process.GetProcessID(), 16001) >> >> +@expectedFailureAll >> def test_thread_info_in_minidump(self): >> """Test that lldb can read the thread information from the >> Minidump.""" >> # target create -c linux-x86_64.dmp >> @@ -42,6 +44,7 @@ class MiniDumpNewTestCase(TestBase): >> stop_description = thread.GetStopDescription(256) >> self.assertTrue("SIGSEGV" in stop_description) >> >> +@expectedFailureAll >> def test_stack_info_in_minidump(self): >> """Test that we can see a trivial stack in a breakpad-generated >> Minidump.""" >> # target create linux-x86_64 -c linux-x86_64.dmp >> @@ -62,6 +65,7 @@ class MiniDumpNewTestCase(TestBase): >> self.assertTrue(eip.IsValid()) >> self.assertEqual(pc, eip.GetValueAsUnsigned()) >> >> +@expectedFailureAll >> def test_snapshot_minidump(self): >> """Test that if we load a snapshot minidump file (meaning the >> process did not crash) there is no stop reason.""" >> # target create -c linux-x86_64_not_crashed.dmp >> @@ -74,6 +78,7 @@ class MiniDumpNewTestCase(TestBase): >> stop_description = thread.GetStopDescription(256) >> self.assertEqual(stop_description, None) >> >> +@expectedFailureAll >> def test_deeper_stack_in_minidump(self): >> """Test that we can examine a more interesting stack in a >> Minidump.""" >> # Launch with the Minidump, and inspect the stack. >> @@ -90,6 +95,7 @@ class MiniDumpNewTestCase(TestBase): >> function_name = frame.GetFunctionName() >> self.assertTrue(name in function_name) >> >> +@expectedFailureAll >> def test_local_variables_in_minidump(self): >> """Test that we can examine local variables in a Minidump.""" >> # Launch with the Minidump, and inspect a local variable. >> >> >> ___ >> lldb-commits mailing list >> lldb-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >> > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283324 - xfailing minidump tests again ... :(
Agreed (don't forget the xcode changes too). Also, the binaries you've checked in trying to fix this are quite big (and now part of history forever). I think we'll have to come up with a different way to test this. BTW, the reason why tests are failing on the buildbot is most likely because the paths in the precompiled debug info, don't match the buildbot paths. I should've seen this coming. Sorry about that. pl On 5 October 2016 at 08:38, Zachary Turner via lldb-commits < lldb-commits@lists.llvm.org> wrote: > If all the tests are being xfailed you should probably just revert the > original patch until the tests are fixed > > On Wed, Oct 5, 2016 at 8:09 AM Dimitar Vlahovski via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> Author: dvlahovski >> Date: Wed Oct 5 10:00:29 2016 >> New Revision: 283324 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=283324&view=rev >> Log: >> xfailing minidump tests again ... :( >> >> Modified: >> lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py >> >> Modified: lldb/trunk/packages/Python/lldbsuite/test/ >> functionalities/postmortem/minidump-new/TestMiniDumpNew.py >> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/ >> Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py?rev=283324&r1=283323&r2=283324&view=diff >> >> == >> --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py (original) >> +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/ >> minidump-new/TestMiniDumpNew.py Wed Oct 5 10:00:29 2016 >> @@ -18,6 +18,7 @@ class MiniDumpNewTestCase(TestBase): >> >> NO_DEBUG_INFO_TESTCASE = True >> >> +@expectedFailureAll >> def test_process_info_in_minidump(self): >> """Test that lldb can read the process information from the >> Minidump.""" >> # target create -c linux-x86_64.dmp >> @@ -28,6 +29,7 @@ class MiniDumpNewTestCase(TestBase): >> self.assertEqual(self.process.GetNumThreads(), 1) >> self.assertEqual(self.process.GetProcessID(), 16001) >> >> +@expectedFailureAll >> def test_thread_info_in_minidump(self): >> """Test that lldb can read the thread information from the >> Minidump.""" >> # target create -c linux-x86_64.dmp >> @@ -42,6 +44,7 @@ class MiniDumpNewTestCase(TestBase): >> stop_description = thread.GetStopDescription(256) >> self.assertTrue("SIGSEGV" in stop_description) >> >> +@expectedFailureAll >> def test_stack_info_in_minidump(self): >> """Test that we can see a trivial stack in a breakpad-generated >> Minidump.""" >> # target create linux-x86_64 -c linux-x86_64.dmp >> @@ -62,6 +65,7 @@ class MiniDumpNewTestCase(TestBase): >> self.assertTrue(eip.IsValid()) >> self.assertEqual(pc, eip.GetValueAsUnsigned()) >> >> +@expectedFailureAll >> def test_snapshot_minidump(self): >> """Test that if we load a snapshot minidump file (meaning the >> process did not crash) there is no stop reason.""" >> # target create -c linux-x86_64_not_crashed.dmp >> @@ -74,6 +78,7 @@ class MiniDumpNewTestCase(TestBase): >> stop_description = thread.GetStopDescription(256) >> self.assertEqual(stop_description, None) >> >> +@expectedFailureAll >> def test_deeper_stack_in_minidump(self): >> """Test that we can examine a more interesting stack in a >> Minidump.""" >> # Launch with the Minidump, and inspect the stack. >> @@ -90,6 +95,7 @@ class MiniDumpNewTestCase(TestBase): >> function_name = frame.GetFunctionName() >> self.assertTrue(name in function_name) >> >> +@expectedFailureAll >> def test_local_variables_in_minidump(self): >> """Test that we can examine local variables in a Minidump.""" >> # Launch with the Minidump, and inspect a local variable. >> >> >> ___ >> lldb-commits mailing list >> lldb-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >> > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283335 - [RenderScript] reflow/reword some comments and normalize names
Author: ldrumm Date: Wed Oct 5 11:27:48 2016 New Revision: 283335 URL: http://llvm.org/viewvc/llvm-project?rev=283335&view=rev Log: [RenderScript] reflow/reword some comments and normalize names Pay more attention to comment alignement (Since _The Great Reformat_ (a015ff50) comments are no longer properly aligned) and variable naming conventions. - Manually reflow and cleanup comments and array literals - Be more economical with our naming conventions - Be internally consistent with regard to local variable/member function naming Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h?rev=283335&r1=283334&r2=283335&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.h Wed Oct 5 11:27:48 2016 @@ -27,13 +27,11 @@ #include "RenderScriptx86ABIFixups.h" // RenderScriptRuntimeModulePass is a simple llvm::ModulesPass that is used -// during expression evaluation to apply -// RenderScript-specific fixes for expression evaluation. -// In particular this is used to make expression IR conformant with the ABI -// generated by the slang frontend. This -// ModulePass is executed in ClangExpressionParser::PrepareForExecution whenever -// an expression's DWARF language is -// eLanguageTypeExtRenderscript +// during expression evaluation to apply RenderScript-specific fixes for +// expression evaluation. In particular this is used to make expression IR +// conformant with the ABI generated by the slang frontend. This ModulePass is +// executed in ClangExpressionParser::PrepareForExecution whenever an +// expression's DWARF language is eLanguageTypeExtRenderscript class RenderScriptRuntimeModulePass : public llvm::ModulePass { public: Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=283335&r1=283334&r2=283335&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Wed Oct 5 11:27:48 2016 @@ -48,8 +48,8 @@ using namespace lldb_renderscript; namespace { // The empirical_type adds a basic level of validation to arbitrary data -// allowing us to track if data has been discovered and stored or not. -// An empirical_type will be marked as valid only if it has been explicitly +// allowing us to track if data has been discovered and stored or not. An +// empirical_type will be marked as valid only if it has been explicitly // assigned to. template class empirical_type { public: @@ -116,7 +116,7 @@ struct GetArgsCtx { bool GetArgsX86(const GetArgsCtx &ctx, ArgItem *arg_list, size_t num_args) { Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE); - Error error; + Error err; // get the current stack pointer uint64_t sp = ctx.reg_ctx->GetSP(); @@ -129,13 +129,13 @@ bool GetArgsX86(const GetArgsCtx &ctx, A size_t arg_size = sizeof(uint32_t); // read the argument from memory arg.value = 0; -Error error; +Error err; size_t read = -ctx.process->ReadMemory(sp, &arg.value, sizeof(uint32_t), error); -if (read != arg_size || !error.Success()) { +ctx.process->ReadMemory(sp, &arg.value, sizeof(uint32_t), err); +if (read != arg_size || !err.Success()) { if (log) log->Printf("%s - error reading argument: %" PRIu64 " '%s'", -__FUNCTION__, uint64_t(i), error.AsCString()); +__FUNCTION__, uint64_t(i), err.AsCString()); return false; } } @@ -146,9 +146,9 @@ bool GetArgsX86_64(GetArgsCtx &ctx, ArgI Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE); // number of arguments passed in registers - static const uint32_t c_args_in_reg = 6; + static const uint32_t args_in_reg = 6; // register passing order - static const std::arra
Re: [Lldb-commits] [PATCH] D25246: Disable warnings in LLDBWrapPython.cpp when LLVM_ENABLE_WERROR is used
Just fyi, I'm planning to submit as-is for now. We can treat disabling specific warnings all the time orthogonally, since we would need to discuss what warnings specifically etc. In any case, in a Werror build turning everything off seems the most prudent. On Tue, Oct 4, 2016 at 1:20 PM Zachary Turner wrote: > zturner added a comment. > > In https://reviews.llvm.org/D25246#561323, @Eugene.Zelenko wrote: > > > You could use -Wno-error= instead. > > > Yes but it's a little bit annoying to track down every single one we get > in this file with all the different compilers. Since we can't really > control the generated code, there's not much we can do. Seems easier to > just turn them off. > > > https://reviews.llvm.org/D25246 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D24284: [lldb] Read modules from memory when a local copy is not available
wallace added a comment. I've run the tests and it's the same with and without this diff :) https://reviews.llvm.org/D24284 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283343 - Disable warnings in LLDBWrapPython.cpp with -Werror.
Author: zturner Date: Wed Oct 5 12:07:16 2016 New Revision: 283343 URL: http://llvm.org/viewvc/llvm-project?rev=283343&view=rev Log: Disable warnings in LLDBWrapPython.cpp with -Werror. When -Werror is used, we don't have control over the generated code from SWIG, and it often has warnings. Just disable them for this file when -Werror is used, they are usually not important anyway. Differential revision: https://reviews.llvm.org/D25246 Modified: lldb/trunk/source/API/CMakeLists.txt Modified: lldb/trunk/source/API/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=283343&r1=283342&r2=283343&view=diff == --- lldb/trunk/source/API/CMakeLists.txt (original) +++ lldb/trunk/source/API/CMakeLists.txt Wed Oct 5 12:07:16 2016 @@ -78,6 +78,14 @@ add_lldb_library(liblldb SHARED ${LLDB_WRAP_PYTHON} ) +if (LLVM_ENABLE_WERROR) + if (MSVC) +set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0") + else() +set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w") + endif() +endif() + # This should not be part of LLDBDependencies.cmake, because we don't # want every single library taking a dependency on the script interpreters. target_link_libraries(liblldb PRIVATE ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25246: Disable warnings in LLDBWrapPython.cpp when LLVM_ENABLE_WERROR is used
This revision was automatically updated to reflect the committed changes. Closed by commit rL283343: Disable warnings in LLDBWrapPython.cpp with -Werror. (authored by zturner). Changed prior to commit: https://reviews.llvm.org/D25246?vs=73510&id=73665#toc Repository: rL LLVM https://reviews.llvm.org/D25246 Files: lldb/trunk/source/API/CMakeLists.txt Index: lldb/trunk/source/API/CMakeLists.txt === --- lldb/trunk/source/API/CMakeLists.txt +++ lldb/trunk/source/API/CMakeLists.txt @@ -78,6 +78,14 @@ ${LLDB_WRAP_PYTHON} ) +if (LLVM_ENABLE_WERROR) + if (MSVC) +set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0") + else() +set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w") + endif() +endif() + # This should not be part of LLDBDependencies.cmake, because we don't # want every single library taking a dependency on the script interpreters. target_link_libraries(liblldb PRIVATE Index: lldb/trunk/source/API/CMakeLists.txt === --- lldb/trunk/source/API/CMakeLists.txt +++ lldb/trunk/source/API/CMakeLists.txt @@ -78,6 +78,14 @@ ${LLDB_WRAP_PYTHON} ) +if (LLVM_ENABLE_WERROR) + if (MSVC) +set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0") + else() +set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w") + endif() +endif() + # This should not be part of LLDBDependencies.cmake, because we don't # want every single library taking a dependency on the script interpreters. target_link_libraries(liblldb PRIVATE ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283345 - Convert some breakpoint code to use StringRef.
Author: zturner Date: Wed Oct 5 12:07:47 2016 New Revision: 283345 URL: http://llvm.org/viewvc/llvm-project?rev=283345&view=rev Log: Convert some breakpoint code to use StringRef. Differential revision: https://reviews.llvm.org/D25158 Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointID.h lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h lldb/trunk/source/Breakpoint/BreakpointID.cpp lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointID.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointID.h?rev=283345&r1=283344&r2=283345&view=diff == --- lldb/trunk/include/lldb/Breakpoint/BreakpointID.h (original) +++ lldb/trunk/include/lldb/Breakpoint/BreakpointID.h Wed Oct 5 12:07:47 2016 @@ -17,6 +17,8 @@ #include "lldb/lldb-private.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" namespace lldb_private { @@ -49,31 +51,24 @@ public: void GetDescription(Stream *s, lldb::DescriptionLevel level); - static bool IsRangeIdentifier(const char *str); - - static bool IsValidIDExpression(const char *str); - - static const char *g_range_specifiers[]; + static bool IsRangeIdentifier(llvm::StringRef str); + static bool IsValidIDExpression(llvm::StringRef str); + static llvm::ArrayRef GetRangeSpecifiers(); //-- /// Takes an input string containing the description of a breakpoint or - /// breakpoint and location - /// and returns the breakpoint ID and the breakpoint location id. + /// breakpoint and location and returns the a BreakpointID filled out with + /// the proper id and location. /// /// @param[in] input /// A string containing JUST the breakpoint description. - /// @param[out] break_id - /// This is the break id. - /// @param[out] break_loc_id - /// This is breakpoint location id, or LLDB_INVALID_BREAK_ID is no - /// location was specified. /// @return - /// \b true if the call was able to extract a breakpoint location from the - /// string. \b false otherwise. + /// If \p input was not a valid breakpoint ID string, returns + /// \b llvm::None. Otherwise returns a BreakpointID with members filled + /// out accordingly. //-- - static bool ParseCanonicalReference(const char *input, - lldb::break_id_t *break_id, - lldb::break_id_t *break_loc_id); + static llvm::Optional + ParseCanonicalReference(llvm::StringRef input); //-- /// Takes an input string and checks to see whether it is a breakpoint name. Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h?rev=283345&r1=283344&r2=283345&view=diff == --- lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h (original) +++ lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h Wed Oct 5 12:07:47 2016 @@ -12,6 +12,7 @@ // C Includes // C++ Includes +#include #include // Other libraries and framework includes @@ -28,6 +29,7 @@ namespace lldb_private { class BreakpointIDList { public: + // TODO: Convert this class to StringRef. typedef std::vector BreakpointIDArray; BreakpointIDList(); @@ -46,6 +48,7 @@ public: bool AddBreakpointID(const char *bp_id); + // TODO: This should take a const BreakpointID. bool FindBreakpointID(BreakpointID &bp_id, size_t *position) const; bool FindBreakpointID(const char *bp_id, size_t *position) const; @@ -53,9 +56,11 @@ public: void InsertStringArray(const char **string_array, size_t array_size, CommandReturnObject &result); - static bool StringContainsIDRangeExpression(const char *in_string, - size_t *range_start_len, - size_t *range_end_pos); + // Returns a pair consisting of the beginning and end of a breakpoint + // ID range expression. If the input string is not a valid specification, + // returns an empty pair. + static std::pair + SplitIDRangeExpression(llvm::StringRef in_string); static void FindAndReplaceIDRanges(Args &old_args, Target *target, bool allow_locations, Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointID.cpp?rev=283345&r1=283344&r2=283345&view=diff == --- lldb/trunk/source/Br
[Lldb-commits] [lldb] r283344 - Make lldb -Werror clean on Windows.
Author: zturner Date: Wed Oct 5 12:07:34 2016 New Revision: 283344 URL: http://llvm.org/viewvc/llvm-project?rev=283344&view=rev Log: Make lldb -Werror clean on Windows. Differential Revision: https://reviews.llvm.org/D25247 Modified: lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h lldb/trunk/include/lldb/Host/windows/PosixApi.h lldb/trunk/include/lldb/Utility/SelectHelper.h lldb/trunk/source/Core/Mangled.cpp lldb/trunk/source/Core/SourceManager.cpp lldb/trunk/source/DataFormatters/StringPrinter.cpp lldb/trunk/source/Host/common/NativeBreakpointList.cpp lldb/trunk/source/Host/common/ProcessRunLock.cpp lldb/trunk/source/Host/common/SocketAddress.cpp lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp lldb/trunk/source/Host/common/TCPSocket.cpp lldb/trunk/source/Host/common/UDPSocket.cpp lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp lldb/trunk/source/Host/windows/EditLineWin.cpp lldb/trunk/source/Host/windows/FileSystem.cpp lldb/trunk/source/Host/windows/Host.cpp lldb/trunk/source/Host/windows/LockFileWindows.cpp lldb/trunk/source/Host/windows/PipeWindows.cpp lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp lldb/trunk/source/Host/windows/ProcessRunLock.cpp lldb/trunk/source/Interpreter/Args.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.h lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.h lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/lldb-python.h lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/OCamlASTContext.cpp lldb/trunk/source/Target/Memory.cpp lldb/trunk/source/Target/StackFrame.cpp lldb/trunk/source/Utility/SelectHelper.cpp lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp lldb/trunk/tools/lldb-mi/Platform.h Modified: lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h?rev=283344&r1=283343&r2=283344&view=diff == --- lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h (original) +++ lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h Wed Oct 5 12:07:34 2016 @@ -25,11 +25,11 @@ public: void SetOwnsHandle(bool owns); - virtual Error Terminate(); - virtual Error GetMainModule(FileSpec &file_spec) const; + Error Terminate() override; + Error GetMainModule(FileSpec &file_spec) const override; - virtual lldb::pid_t GetProcessId() const; - virtual bool IsRunning() const; + lldb::pid_t GetProcessId() const override; + bool IsRunning() const override; HostThread StartMonitoring(const Host::MonitorChildProcessCallback &callback, bool monitor_signals) override; Modified: lldb/trunk/include/lldb/Host/windows/PosixApi.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/windows/PosixApi.h?rev=283344&r1=283343&r2=283344&view=diff == --- lldb/trunk/include/lldb/Host/windows/PosixApi.h (original) +++ lldb/trunk/include/lldb/Host/windows/PosixApi.h Wed Oct 5 12:07:34 2016 @@ -57,10 +57,9 @@ typedef unsigned short mode_t; // pyconfig.h typedefs this. We require python headers to be included before -// any -// LLDB headers, but there's no way to prevent python's pid_t definition from -// leaking, so this is the best option. -#ifndef Py_CONFIG_H +// any LLDB headers, but there's no way to prevent python's pid_t definition +// from leaking, so this is the best option. +#ifndef NO_PID_T typedef uint32_t pid_t; #endif @@ -69,7 +68,10 @@ typedef uint32_t pid_t; #define STDERR_FILENO 2 #define S_IFDIR _S_IFDIR + +#ifndef S_ISDIR #define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR) +#endif #endif // _MSC_VER Modified: lldb/trunk/include/lldb/Utility/SelectHelper.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SelectHelper.h?rev=283344&r1=283343&r2=283344&view=diff == --- lldb/trunk/include/lldb/Utility/SelectHelper.h (original) +++ lldb/trunk/include/lldb/Utility/SelectHelper.h Wed Oct 5 12:07:34 2016 @@ -37,17 +37,17 @@ public: // set the file d
[Lldb-commits] [PATCH] D25158: Convert some Breakpoint to StringRef
This revision was automatically updated to reflect the committed changes. Closed by commit rL283345: Convert some breakpoint code to use StringRef. (authored by zturner). Changed prior to commit: https://reviews.llvm.org/D25158?vs=73554&id=73667#toc Repository: rL LLVM https://reviews.llvm.org/D25158 Files: lldb/trunk/include/lldb/Breakpoint/BreakpointID.h lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h lldb/trunk/source/Breakpoint/BreakpointID.cpp lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Index: lldb/trunk/source/Breakpoint/BreakpointID.cpp === --- lldb/trunk/source/Breakpoint/BreakpointID.cpp +++ lldb/trunk/source/Breakpoint/BreakpointID.cpp @@ -26,34 +26,29 @@ BreakpointID::~BreakpointID() = default; -const char *BreakpointID::g_range_specifiers[] = {"-", "to", "To", "TO", - nullptr}; +static llvm::StringRef g_range_specifiers[] = {"-", "to", "To", "TO"}; // Tells whether or not STR is valid to use between two strings representing // breakpoint IDs, to // indicate a range of breakpoint IDs. This is broken out into a separate // function so that we can // easily change or add to the format for specifying ID ranges at a later date. -bool BreakpointID::IsRangeIdentifier(const char *str) { - int specifier_count = 0; - for (int i = 0; g_range_specifiers[i] != nullptr; ++i) -++specifier_count; - - for (int i = 0; i < specifier_count; ++i) { -if (strcmp(g_range_specifiers[i], str) == 0) +bool BreakpointID::IsRangeIdentifier(llvm::StringRef str) { + for (auto spec : g_range_specifiers) { +if (spec == str) return true; } return false; } -bool BreakpointID::IsValidIDExpression(const char *str) { - break_id_t bp_id; - break_id_t loc_id; - BreakpointID::ParseCanonicalReference(str, &bp_id, &loc_id); +bool BreakpointID::IsValidIDExpression(llvm::StringRef str) { + return BreakpointID::ParseCanonicalReference(str).hasValue(); +} - return (bp_id != LLDB_INVALID_BREAK_ID); +llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { + return g_range_specifiers; } void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) { @@ -78,33 +73,29 @@ s->Printf("%i.%i", bp_id, loc_id); } -bool BreakpointID::ParseCanonicalReference(const char *input, - break_id_t *break_id_ptr, - break_id_t *break_loc_id_ptr) { - *break_id_ptr = LLDB_INVALID_BREAK_ID; - *break_loc_id_ptr = LLDB_INVALID_BREAK_ID; +llvm::Optional +BreakpointID::ParseCanonicalReference(llvm::StringRef input) { + break_id_t bp_id; + break_id_t loc_id = LLDB_INVALID_BREAK_ID; - if (input == nullptr || *input == '\0') -return false; + if (input.empty()) +return llvm::None; - const char *format = "%i%n.%i%n"; - int chars_consumed_1 = 0; - int chars_consumed_2 = 0; - int n_items_parsed = ::sscanf( - input, format, - break_id_ptr, // %i parse the breakpoint ID - &chars_consumed_1, // %n gets the number of characters parsed so far - break_loc_id_ptr, // %i parse the breakpoint location ID - &chars_consumed_2); // %n gets the number of characters parsed so far - - if ((n_items_parsed == 1 && input[chars_consumed_1] == '\0') || - (n_items_parsed == 2 && input[chars_consumed_2] == '\0')) -return true; - - // Badly formatted canonical reference. - *break_id_ptr = LLDB_INVALID_BREAK_ID; - *break_loc_id_ptr = LLDB_INVALID_BREAK_ID; - return false; + // If it doesn't start with an integer, it's not valid. + if (input.consumeInteger(0, bp_id)) +return llvm::None; + + // period is optional, but if it exists, it must be followed by a number. + if (input.consume_front(".")) { +if (input.consumeInteger(0, loc_id)) + return llvm::None; + } + + // And at the end, the entire string must have been consumed. + if (!input.empty()) +return llvm::None; + + return BreakpointID(bp_id, loc_id); } bool BreakpointID::StringIsBreakpointName(llvm::StringRef str, Error &error) { Index: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp === --- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp +++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp @@ -57,19 +57,12 @@ } bool BreakpointIDList::AddBreakpointID(const char *bp_id_str) { - BreakpointID temp_bp_id; - break_id_t bp_id; - break_id_t loc_id; - - bool success = - BreakpointID::ParseCanonicalReference(bp_id_str, &bp_id, &loc_id); - - if (success) { -temp_bp_id.SetID(bp_id, loc_id); -m_breakpoint_ids.push_back(temp_bp_id); - } + auto bp_id = BreakpointID::ParseCanonicalReference(bp_id_str); + if (!bp_id.hasValue()) +return false; - return success; + m_breakpoint_ids.push_back(*bp_id); + return true; } bool BreakpointIDList::FindBreakpointID(Br
[Lldb-commits] [PATCH] D25247: Make LLDB -Werror clean under clang
This revision was automatically updated to reflect the committed changes. zturner marked an inline comment as done. Closed by commit rL283344: Make lldb -Werror clean on Windows. (authored by zturner). Changed prior to commit: https://reviews.llvm.org/D25247?vs=73515&id=73666#toc Repository: rL LLVM https://reviews.llvm.org/D25247 Files: lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h lldb/trunk/include/lldb/Host/windows/PosixApi.h lldb/trunk/include/lldb/Utility/SelectHelper.h lldb/trunk/source/Core/Mangled.cpp lldb/trunk/source/Core/SourceManager.cpp lldb/trunk/source/DataFormatters/StringPrinter.cpp lldb/trunk/source/Host/common/NativeBreakpointList.cpp lldb/trunk/source/Host/common/ProcessRunLock.cpp lldb/trunk/source/Host/common/SocketAddress.cpp lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp lldb/trunk/source/Host/common/TCPSocket.cpp lldb/trunk/source/Host/common/UDPSocket.cpp lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp lldb/trunk/source/Host/windows/EditLineWin.cpp lldb/trunk/source/Host/windows/FileSystem.cpp lldb/trunk/source/Host/windows/Host.cpp lldb/trunk/source/Host/windows/LockFileWindows.cpp lldb/trunk/source/Host/windows/PipeWindows.cpp lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp lldb/trunk/source/Host/windows/ProcessRunLock.cpp lldb/trunk/source/Interpreter/Args.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.h lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.h lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/lldb-python.h lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/OCamlASTContext.cpp lldb/trunk/source/Target/Memory.cpp lldb/trunk/source/Target/StackFrame.cpp lldb/trunk/source/Utility/SelectHelper.cpp lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp lldb/trunk/tools/lldb-mi/Platform.h Index: lldb/trunk/include/lldb/Host/windows/PosixApi.h === --- lldb/trunk/include/lldb/Host/windows/PosixApi.h +++ lldb/trunk/include/lldb/Host/windows/PosixApi.h @@ -57,19 +57,21 @@ typedef unsigned short mode_t; // pyconfig.h typedefs this. We require python headers to be included before -// any -// LLDB headers, but there's no way to prevent python's pid_t definition from -// leaking, so this is the best option. -#ifndef Py_CONFIG_H +// any LLDB headers, but there's no way to prevent python's pid_t definition +// from leaking, so this is the best option. +#ifndef NO_PID_T typedef uint32_t pid_t; #endif #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #define S_IFDIR _S_IFDIR + +#ifndef S_ISDIR #define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR) +#endif #endif // _MSC_VER Index: lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h === --- lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h +++ lldb/trunk/include/lldb/Host/windows/HostProcessWindows.h @@ -25,11 +25,11 @@ void SetOwnsHandle(bool owns); - virtual Error Terminate(); - virtual Error GetMainModule(FileSpec &file_spec) const; + Error Terminate() override; + Error GetMainModule(FileSpec &file_spec) const override; - virtual lldb::pid_t GetProcessId() const; - virtual bool IsRunning() const; + lldb::pid_t GetProcessId() const override; + bool IsRunning() const override; HostThread StartMonitoring(const Host::MonitorChildProcessCallback &callback, bool monitor_signals) override; Index: lldb/trunk/include/lldb/Utility/SelectHelper.h === --- lldb/trunk/include/lldb/Utility/SelectHelper.h +++ lldb/trunk/include/lldb/Utility/SelectHelper.h @@ -37,17 +37,17 @@ // set the file descriptors that we will watch for when calling // select. This will cause FD_SET() to be called prior to calling select // using the "fd" provided. - void FDSetRead(int fd); - void FDSetWrite(int fd); - void FDSetError(int fd); + void FDSetRead(lldb::socket_t fd); + void FDSetWrite(lldb::socket_t fd); + void FDSetError(lldb::socket_t fd); // Call the FDIsSet*() functions after calling SelectHelper::Select() // to check which file descriptors are ready for read/write/error. This // will contain the resul
Re: [Lldb-commits] [PATCH] D25158: Convert some Breakpoint to StringRef
It looks like there was a problem with this after all. Are your OSX buildbots failing? I only got notification from Linux buildbots. I'm pretty sure everything passes, but I'm going to test again real quick to confirm. On Wed, Oct 5, 2016 at 10:17 AM Zachary Turner wrote: > This revision was automatically updated to reflect the committed changes. > Closed by commit rL283345: Convert some breakpoint code to use StringRef. > (authored by zturner). > > Changed prior to commit: > https://reviews.llvm.org/D25158?vs=73554&id=73667#toc > > Repository: > rL LLVM > > https://reviews.llvm.org/D25158 > > Files: > lldb/trunk/include/lldb/Breakpoint/BreakpointID.h > lldb/trunk/include/lldb/Breakpoint/BreakpointIDList.h > lldb/trunk/source/Breakpoint/BreakpointID.cpp > lldb/trunk/source/Breakpoint/BreakpointIDList.cpp > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283351 - Try to fix Android build.
Author: zturner Date: Wed Oct 5 12:58:46 2016 New Revision: 283351 URL: http://llvm.org/viewvc/llvm-project?rev=283351&view=rev Log: Try to fix Android build. Seems it doesn't like the implicit conversion from StringRef[] to ArrayRef. Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointID.cpp?rev=283351&r1=283350&r2=283351&view=diff == --- lldb/trunk/source/Breakpoint/BreakpointID.cpp (original) +++ lldb/trunk/source/Breakpoint/BreakpointID.cpp Wed Oct 5 12:58:46 2016 @@ -48,7 +48,7 @@ bool BreakpointID::IsValidIDExpression(l } llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { - return g_range_specifiers; + return llvm::makeArrayRef(g_range_specifiers); } void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283351 - Try to fix Android build.
Alright, I'll bite and ask... What is so special about the Android bot? Every so often, I'll see it reject a piece of syntax that other compilers gleefully handle > On Oct 5, 2016, at 10:58 AM, Zachary Turner via lldb-commits > wrote: > > Author: zturner > Date: Wed Oct 5 12:58:46 2016 > New Revision: 283351 > > URL: http://llvm.org/viewvc/llvm-project?rev=283351&view=rev > Log: > Try to fix Android build. > > Seems it doesn't like the implicit conversion from > StringRef[] to ArrayRef. > > Modified: >lldb/trunk/source/Breakpoint/BreakpointID.cpp > > Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointID.cpp?rev=283351&r1=283350&r2=283351&view=diff > == > --- lldb/trunk/source/Breakpoint/BreakpointID.cpp (original) > +++ lldb/trunk/source/Breakpoint/BreakpointID.cpp Wed Oct 5 12:58:46 2016 > @@ -48,7 +48,7 @@ bool BreakpointID::IsValidIDExpression(l > } > > llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { > - return g_range_specifiers; > + return llvm::makeArrayRef(g_range_specifiers); > } > > void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) { > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits Thanks, - Enrico 📩 egranata@.com ☎️ 27683 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283351 - Try to fix Android build.
I don't know for sure, but I'm guessing it's using GCC, and perhaps even an old one at that. On Wed, Oct 5, 2016 at 11:10 AM Enrico Granata wrote: > Alright, I'll bite and ask... > > What is so special about the Android bot? Every so often, I'll see it > reject a piece of syntax that other compilers gleefully handle > > On Oct 5, 2016, at 10:58 AM, Zachary Turner via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > Author: zturner > Date: Wed Oct 5 12:58:46 2016 > New Revision: 283351 > > URL: http://llvm.org/viewvc/llvm-project?rev=283351&view=rev > Log: > Try to fix Android build. > > Seems it doesn't like the implicit conversion from > StringRef[] to ArrayRef. > > Modified: >lldb/trunk/source/Breakpoint/BreakpointID.cpp > > Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointID.cpp?rev=283351&r1=283350&r2=283351&view=diff > > == > --- lldb/trunk/source/Breakpoint/BreakpointID.cpp (original) > +++ lldb/trunk/source/Breakpoint/BreakpointID.cpp Wed Oct 5 12:58:46 2016 > @@ -48,7 +48,7 @@ bool BreakpointID::IsValidIDExpression(l > } > > llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { > - return g_range_specifiers; > + return llvm::makeArrayRef(g_range_specifiers); > } > > void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) > { > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > > > Thanks, > *- Enrico* > 📩 egranata@.com ☎️ 27683 > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283351 - Try to fix Android build.
It is using "gcc version 4.9 20150123 (prerelease) (GCC)" On Wed, Oct 5, 2016 at 11:12 AM Zachary Turner via lldb-commits < lldb-commits@lists.llvm.org> wrote: > I don't know for sure, but I'm guessing it's using GCC, and perhaps even > an old one at that. > > On Wed, Oct 5, 2016 at 11:10 AM Enrico Granata wrote: > > Alright, I'll bite and ask... > > What is so special about the Android bot? Every so often, I'll see it > reject a piece of syntax that other compilers gleefully handle > > On Oct 5, 2016, at 10:58 AM, Zachary Turner via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > Author: zturner > Date: Wed Oct 5 12:58:46 2016 > New Revision: 283351 > > URL: http://llvm.org/viewvc/llvm-project?rev=283351&view=rev > Log: > Try to fix Android build. > > Seems it doesn't like the implicit conversion from > StringRef[] to ArrayRef. > > Modified: >lldb/trunk/source/Breakpoint/BreakpointID.cpp > > Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointID.cpp?rev=283351&r1=283350&r2=283351&view=diff > > == > --- lldb/trunk/source/Breakpoint/BreakpointID.cpp (original) > +++ lldb/trunk/source/Breakpoint/BreakpointID.cpp Wed Oct 5 12:58:46 2016 > @@ -48,7 +48,7 @@ bool BreakpointID::IsValidIDExpression(l > } > > llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { > - return g_range_specifiers; > + return llvm::makeArrayRef(g_range_specifiers); > } > > void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel level) > { > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > > > Thanks, > *- Enrico* > 📩 egranata@.com ☎️ 27683 > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283352 - Removing the new Minidump plugin
Author: dvlahovski Date: Wed Oct 5 13:11:45 2016 New Revision: 283352 URL: http://llvm.org/viewvc/llvm-project?rev=283352&view=rev Log: Removing the new Minidump plugin Tests are failing and build is failing on windows and darwin. Will fix and commit it later - Revert "xfailing minidump tests again ... :(" This reverts commit 97eade002c9e43c1e0d11475a4888083a8965044. Revert "Fixing new Minidump plugin tests" This reverts commit 0dd93b3ab39c8288696001dd50b9a093b813b09c. Revert "Add the new minidump files to the Xcode project." This reverts commit 2f638a1d046b8a88e61e212220edc40aecd2ce44. Revert "xfailing tests for Minidump plugin" This reverts commit 99311c0b22338a83e6a00c4fbddfd3577914c003. Revert "Adding a new Minidump post-mortem debugging plugin" This reverts commit b09a7e4dae231663095a84dac4be3da00b03a021. Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.dmp lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.dmp lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.h Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/API/SystemInitializerFull.cpp lldb/trunk/source/Plugins/Process/minidump/CMakeLists.txt lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.h lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=283352&r1=283351&r2=283352&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Oct 5 13:11:45 2016 @@ -735,8 +735,6 @@ 4C56543519D2297A002E9C44 /* SBThreadPlan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C56543419D2297A002E9C44 /* SBThreadPlan.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4C56543719D22B32002E9C44 /* SBThreadPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C56543619D22B32002E9C44 /* SBThreadPlan.cpp */; }; 4C6649A314EEE81000B0316F /* StreamCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6649A214EEE81000B0316F /* StreamCallback.cpp */; }; - 4C6966101DA47BCE004FAE72 /* ThreadMinidump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C6966081DA47BB4004FAE72 /* ThreadMinidump.cpp */; }; - 4C6966111DA47BDB004FAE72 /* ProcessMinidump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C69660A1DA47BB4004FAE72 /* ProcessMinidump.cpp */; }; 4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C88BC291BA3722B00AA0964 /* Expression.cpp */; }; 4C88BC2D1BA391B000AA0964 /* UserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083331B9A5DE200D5CF24 /* UserExpression.cpp */; }; 4CABA9E0134A8BCD00539BDD /* ValueObjectMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CABA9DF134A8BCD00539BDD /* ValueObjectMemory.cpp */; }; @@ -958,6 +956,7 @@ AFCB2BBD1BF577F40018B553 /* PythonExceptionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFCB2BBB1BF577F40018B553 /* PythonExceptionState.cpp */; }; AFCB2BBE1BF577F40018B553 /* PythonExceptionState.h in Headers */ = {isa = PBXBuildFile; fileRef = AFCB2BBC1BF577F40018B553 /* PythonExceptionState.h */; }; AFD65C811D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFD65C7F1D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp */; }; + AFD65C821D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = AFD65C801D9B5B2E00D93120 /* Regist
[Lldb-commits] [lldb] r283358 - Fix some test failures due to the recent Breakpoint patch.
Author: zturner Date: Wed Oct 5 13:40:51 2016 New Revision: 283358 URL: http://llvm.org/viewvc/llvm-project?rev=283358&view=rev Log: Fix some test failures due to the recent Breakpoint patch. Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=283358&r1=283357&r2=283358&view=diff == --- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original) +++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Wed Oct 5 13:40:51 2016 @@ -96,14 +96,8 @@ void BreakpointIDList::InsertStringArray for (uint32_t i = 0; i < array_size; ++i) { auto bp_id = BreakpointID::ParseCanonicalReference(string_array[i]); -if (bp_id.hasValue()) { +if (bp_id.hasValue()) m_breakpoint_ids.push_back(*bp_id); -} else { - result.AppendErrorWithFormat("'%s' is not a valid breakpoint ID.\n", - string_array[i]); - result.SetStatus(eReturnStatusFailed); - return; -} } result.SetStatus(eReturnStatusSuccessFinishNoResult); } @@ -230,8 +224,8 @@ void BreakpointIDList::FindAndReplaceIDR break_id_t start_loc_id = start_bp->GetLocationID(); break_id_t end_bp_id = end_bp->GetBreakpointID(); break_id_t end_loc_id = end_bp->GetLocationID(); -if (((start_bp_id == LLDB_INVALID_BREAK_ID) && -(end_bp_id != LLDB_INVALID_BREAK_ID)) || +if (((start_loc_id == LLDB_INVALID_BREAK_ID) && +(end_loc_id != LLDB_INVALID_BREAK_ID)) || ((start_loc_id != LLDB_INVALID_BREAK_ID) && (end_loc_id == LLDB_INVALID_BREAK_ID))) { new_args.Clear(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283362 - Add the ability to set breakpoints on named RenderScript reductions
Author: ldrumm Date: Wed Oct 5 14:10:47 2016 New Revision: 283362 URL: http://llvm.org/viewvc/llvm-project?rev=283362&view=rev Log: Add the ability to set breakpoints on named RenderScript reductions - Add new `lldb_private::lldb_renderscript::RSReduceBreakpointResolver` class that can set breakpoints on kernels that are constituent functions of named reduction groups. Also support debugging of subsets of the the reduction group with the `-t, --function-role` flag which takes a comma-separated list of reduction function types outconverter,combiner,initializer,accumulator (defaults to all) - Add 2 new helper methods to `RenderScriptRuntime`, 1. `CreateReductionBreakpoint(name, types)`: instantiates a new RSReduceBreakpointResolver and inserts that resolver into the running process. 2. `PlaceBreakpointOnReduction`: which is a public helper function. - hook up the above functionality to the command-line with new `CommandObject*` classes that handle parsing of function roles and dispatch to the runtime. These are namespaced under the snappy `language renderscript reduction breakpoint ...` subcommand - [incidental] Factor multiple common uses of `FindFirstSymbolWithNameAndType(ConstString(".rs.info")` into static `IsRenderScriptScriptModule(ModuleSP module)` function, and replace original uses. Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=283362&r1=283361&r2=283362&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Wed Oct 5 14:10:47 2016 @@ -10,7 +10,7 @@ // C Includes // C++ Includes // Other libraries and framework includes -#include "llvm/ADT/StringMap.h" +#include "llvm/ADT/StringSwitch.h" // Project includes #include "RenderScriptRuntime.h" @@ -432,6 +432,13 @@ bool GetArgs(ExecutionContext &exe_ctx, } } +bool IsRenderScriptScriptModule(ModuleSP module) { + if (!module) +return false; + return module->FindFirstSymbolWithNameAndType(ConstString(".rs.info"), +eSymbolTypeData) != nullptr; +} + bool ParseCoordinate(llvm::StringRef coord_s, RSCoordinate &coord) { // takes an argument of the form 'num[,num][,num]'. // Where 'coord_s' is a comma separated 1,2 or 3-dimensional coordinate @@ -781,13 +788,7 @@ RSBreakpointResolver::SearchCallback(Sea SymbolContext &context, Address *, bool) { ModuleSP module = context.module_sp; - if (!module) -return Searcher::eCallbackReturnContinue; - - // Is this a module containing renderscript kernels? - if (nullptr == - module->FindFirstSymbolWithNameAndType(ConstString(".rs.info"), - eSymbolTypeData)) + if (!module || !IsRenderScriptScriptModule(module)) return Searcher::eCallbackReturnContinue; // Attempt to set a breakpoint on the kernel name symbol within the module @@ -811,6 +812,66 @@ RSBreakpointResolver::SearchCallback(Sea return Searcher::eCallbackReturnContinue; } +Searcher::CallbackReturn +RSReduceBreakpointResolver::SearchCallback(lldb_private::SearchFilter &filter, + lldb_private::SymbolContext &context, + Address *, bool) { + // We need to have access to the list of reductions currently parsed, as + // reduce names don't actually exist as + // symbols in a module. They are only identifiable by parsing the .rs.info + // packet, or finding the expand symbol. We + // therefore need access to the list of parsed rs modules to properly resolve + // reduction names. + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); + ModuleSP module = context.module_sp; + + if (!module || !IsRenderScriptScriptModule(module)) +return Searcher::eCallbackReturnContinue; + + if (!m_rsmodules) +return Searcher::eCallbackReturnContinue; + + for (const auto &module_desc : *m_rsmodules) { +if (module_desc->m_module != module) + continue; + +for (const auto &reduction : module_desc->m_reductions) { + if (reduction.m_reduce_name != m_reduce_name) +continue; + + std::array, 5> funcs{ + {{reduction.m_init_name, eKernelTypeInit}, + {reduction.m_accum_name, eKernelTypeAccum}, + {reduction.m_comb_name, eKernelTypeComb}, + {reduc
Re: [Lldb-commits] [lldb] r283351 - Try to fix Android build.
I don't know if that's the problem here, but part of the problem comes from the fact that android uses it's own standard c library, which does some things slightly differently. Also, the c++ library is somewhat customized. On 5 October 2016 at 11:18, Tamas Berghammer via lldb-commits < lldb-commits@lists.llvm.org> wrote: > It is using "gcc version 4.9 20150123 (prerelease) (GCC)" > > On Wed, Oct 5, 2016 at 11:12 AM Zachary Turner via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> I don't know for sure, but I'm guessing it's using GCC, and perhaps even >> an old one at that. >> >> On Wed, Oct 5, 2016 at 11:10 AM Enrico Granata >> wrote: >> >> Alright, I'll bite and ask... >> >> What is so special about the Android bot? Every so often, I'll see it >> reject a piece of syntax that other compilers gleefully handle >> >> On Oct 5, 2016, at 10:58 AM, Zachary Turner via lldb-commits < >> lldb-commits@lists.llvm.org> wrote: >> >> Author: zturner >> Date: Wed Oct 5 12:58:46 2016 >> New Revision: 283351 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=283351&view=rev >> Log: >> Try to fix Android build. >> >> Seems it doesn't like the implicit conversion from >> StringRef[] to ArrayRef. >> >> Modified: >>lldb/trunk/source/Breakpoint/BreakpointID.cpp >> >> Modified: lldb/trunk/source/Breakpoint/BreakpointID.cpp >> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/ >> Breakpoint/BreakpointID.cpp?rev=283351&r1=283350&r2=283351&view=diff >> >> == >> --- lldb/trunk/source/Breakpoint/BreakpointID.cpp (original) >> +++ lldb/trunk/source/Breakpoint/BreakpointID.cpp Wed Oct 5 12:58:46 >> 2016 >> @@ -48,7 +48,7 @@ bool BreakpointID::IsValidIDExpression(l >> } >> >> llvm::ArrayRef BreakpointID::GetRangeSpecifiers() { >> - return g_range_specifiers; >> + return llvm::makeArrayRef(g_range_specifiers); >> } >> >> void BreakpointID::GetDescription(Stream *s, lldb::DescriptionLevel >> level) { >> >> >> ___ >> lldb-commits mailing list >> lldb-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >> >> >> >> Thanks, >> *- Enrico* >> 📩 egranata@.com ☎️ 27683 >> >> ___ >> lldb-commits mailing list >> lldb-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >> > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283370 - Convert various CommandInterpreter functions to StringRef.
Author: zturner Date: Wed Oct 5 15:03:37 2016 New Revision: 283370 URL: http://llvm.org/viewvc/llvm-project?rev=283370&view=rev Log: Convert various CommandInterpreter functions to StringRef. Modified: lldb/trunk/include/lldb/Interpreter/Args.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h lldb/trunk/source/Commands/CommandObjectArgs.cpp lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectDisassemble.cpp lldb/trunk/source/Commands/CommandObjectFrame.cpp lldb/trunk/source/Commands/CommandObjectLog.cpp lldb/trunk/source/Interpreter/Args.cpp Modified: lldb/trunk/include/lldb/Interpreter/Args.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=283370&r1=283369&r2=283370&view=diff == --- lldb/trunk/include/lldb/Interpreter/Args.h (original) +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Oct 5 15:03:37 2016 @@ -18,6 +18,7 @@ #include // Other libraries and framework includes +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" // Project includes #include "lldb/Core/Error.h" @@ -136,6 +137,7 @@ public: /// The number or arguments in this object. //-- size_t GetArgumentCount() const; + bool empty() const { return GetArgumentCount() == 0; } //-- /// Gets the NULL terminated C string argument pointer for the @@ -147,6 +149,8 @@ public: //-- const char *GetArgumentAtIndex(size_t idx) const; + llvm::ArrayRef entries() const { return m_entries; } + char GetArgumentQuoteCharAtIndex(size_t idx) const; //-- @@ -315,9 +319,6 @@ public: Error ParseOptions(Options &options, ExecutionContext *execution_context, lldb::PlatformSP platform_sp, bool require_validation); - size_t FindArgumentIndexForOption(Option *long_options, -int long_options_index); - bool IsPositionalArgument(const char *arg); // The following works almost identically to ParseOptions, except that no @@ -459,6 +460,9 @@ public: size_t *argument_index = nullptr) const; private: + size_t FindArgumentIndexForOption(Option *long_options, +int long_options_index) const; + std::vector m_entries; std::vector m_argv; Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=283370&r1=283369&r2=283370&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Wed Oct 5 15:03:37 2016 @@ -108,6 +108,7 @@ public: typedef std::map CommandMap; + // TODO: Change arguments and all derived classes to use StringRef. CommandObject(CommandInterpreter &interpreter, const char *name, const char *help = nullptr, const char *syntax = nullptr, uint32_t flags = 0); Modified: lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h?rev=283370&r1=283369&r2=283370&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h Wed Oct 5 15:03:37 2016 @@ -27,6 +27,7 @@ namespace lldb_private { class CommandObjectRegexCommand : public CommandObjectRaw { public: + // TODO: Convert this class to use StringRefs. CommandObjectRegexCommand(CommandInterpreter &interpreter, const char *name, const char *help, const char *syntax, uint32_t max_matches, uint32_t completion_type_mask, Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=283370&r1=283369&r2=283370&view=diff == --- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Wed Oct 5 15:03:37 2016 @@ -29,6 +29,8 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "llvm/ADT/StringSwitch.
[Lldb-commits] [lldb] r283380 - Fixup the xfail situation on Windows.
Author: zturner Date: Wed Oct 5 15:47:17 2016 New Revision: 283380 URL: http://llvm.org/viewvc/llvm-project?rev=283380&view=rev Log: Fixup the xfail situation on Windows. Xfails added and/or removed to reflect the current state of Windows. Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py lldb/trunk/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/extern_c/TestExternCSymbols.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py lldb/trunk/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py?rev=283380&r1=283379&r2=283380&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py Wed Oct 5 15:47:17 2016 @@ -25,6 +25,7 @@ def cleanJITFiles(): class SaveJITObjectsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) +@expectedFailureAll(oslist=["windows"]) def test_save_jit_objects(self): self.build() src_file = "main.c" Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py?rev=283380&r1=283379&r2=283380&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py Wed Oct 5 15:47:17 2016 @@ -24,6 +24,7 @@ class UnwindFromExpressionTest(TestBase) TestBase.setUp(self) @add_test_categories(['pyapi']) +@expectedFailureAll(oslist=["windows"]) def test_unwind_expression(self): """Test unwinding from an expression.""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py?rev=283380&r1=283379&r2=283380&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py Wed Oct 5 15:47:17 2016 @@ -19,6 +19,7 @@ class PyObjectSynthProviderTestCase(Test mydir = TestBase.compute_mydir(__file__) NO_DEBUG_INFO_TESTCASE = True +@expectedFailureAll(oslist=["windows"]) def test_print_array(self): """Test that expr -Z works""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py?rev=283380&r1=283379&r2=283380&view=diff ==
[Lldb-commits] [lldb] r283384 - Convert CommandObject constructors to StringRef.
Author: zturner Date: Wed Oct 5 16:14:38 2016 New Revision: 283384 URL: http://llvm.org/viewvc/llvm-project?rev=283384&view=rev Log: Convert CommandObject constructors to StringRef. Modified: lldb/trunk/include/lldb/Core/Stream.h lldb/trunk/include/lldb/Interpreter/Args.h lldb/trunk/include/lldb/Interpreter/CommandAlias.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h lldb/trunk/source/API/SBCommandInterpreter.cpp lldb/trunk/source/Commands/CommandObjectArgs.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectExpression.cpp lldb/trunk/source/Commands/CommandObjectHelp.cpp lldb/trunk/source/Commands/CommandObjectMultiword.cpp lldb/trunk/source/Commands/CommandObjectSettings.cpp lldb/trunk/source/Commands/CommandObjectSource.cpp lldb/trunk/source/Commands/CommandObjectSyntax.cpp lldb/trunk/source/Commands/CommandObjectType.cpp lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp lldb/trunk/source/Core/Stream.cpp lldb/trunk/source/Interpreter/Args.cpp lldb/trunk/source/Interpreter/CommandAlias.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/CommandObject.cpp lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp lldb/trunk/source/Interpreter/Options.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Target/LanguageRuntime.cpp Modified: lldb/trunk/include/lldb/Core/Stream.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Stream.h?rev=283384&r1=283383&r2=283384&view=diff == --- lldb/trunk/include/lldb/Core/Stream.h (original) +++ lldb/trunk/include/lldb/Core/Stream.h Wed Oct 5 16:14:38 2016 @@ -441,6 +441,7 @@ public: /// output the indentation characters. //-- size_t Indent(const char *s = nullptr); + size_t Indent(llvm::StringRef s); //-- /// Decrement the current indentation level. Modified: lldb/trunk/include/lldb/Interpreter/Args.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=283384&r1=283383&r2=283384&view=diff == --- lldb/trunk/include/lldb/Interpreter/Args.h (original) +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Oct 5 16:14:38 2016 @@ -322,12 +322,12 @@ public: bool IsPositionalArgument(const char *arg); // The following works almost identically to ParseOptions, except that no - // option is required to have arguments, - // and it builds up the option_arg_vector as it parses the options. + // option is required to have arguments, and it builds up the + // option_arg_vector as it parses the options. - void ParseAliasOptions(Options &options, CommandReturnObject &result, - OptionArgVector *option_arg_vector, - std::string &raw_input_line); + std::string ParseAliasOptions(Options &options, CommandReturnObject &result, +OptionArgVector *option_arg_vector, +llvm::StringRef raw_input_line); void ParseArgsForCompletion(Options &options, OptionElementVector &option_element_vector, Modified: lldb/trunk/include/lldb/Interpreter/CommandAlias.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandAlias.h?rev=283384&r1=283383&r2=283384&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandAlias.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandAlias.h Wed Oct 5 16:14:38 2016 @@ -26,9 +26,9 @@ public: typedef std::unique_ptr UniquePointer; CommandAlias(CommandInterpreter &interpreter, lldb::CommandObjectSP cmd_sp, - const char *options_args, const char *name, - const char *help = nullptr, const char *syntax = nullptr, - uint32_t flags = 0); + llvm::StringRef options_args, llvm::StringRef name, + llvm::StringRef help = llvm::StringRef(), + llvm::StringRef syntax = llvm::StringRef(), uint32_t flags = 0); void GetAliasExpansion(StreamString &help_string); Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=283384&r1=283383&r2=283384&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++
[Lldb-commits] [lldb] r283385 - Update some command aliasing functions to use StringRef.
Author: zturner Date: Wed Oct 5 16:14:49 2016 New Revision: 283385 URL: http://llvm.org/viewvc/llvm-project?rev=283385&view=rev Log: Update some command aliasing functions to use StringRef. Modified: lldb/trunk/include/lldb/Interpreter/CommandAlias.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/Commands/CommandObjectHelp.cpp lldb/trunk/source/Interpreter/CommandAlias.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandAlias.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandAlias.h?rev=283385&r1=283384&r2=283385&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandAlias.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandAlias.h Wed Oct 5 16:14:49 2016 @@ -30,11 +30,11 @@ public: llvm::StringRef help = llvm::StringRef(), llvm::StringRef syntax = llvm::StringRef(), uint32_t flags = 0); - void GetAliasExpansion(StreamString &help_string); + void GetAliasExpansion(StreamString &help_string) const; - bool IsValid() { return m_underlying_command_sp && m_option_args_sp; } + bool IsValid() const { return m_underlying_command_sp && m_option_args_sp; } - explicit operator bool() { return IsValid(); } + explicit operator bool() const { return IsValid(); } bool WantsRawCommandString() override; @@ -71,7 +71,7 @@ public: lldb::CommandObjectSP GetUnderlyingCommand() { return m_underlying_command_sp; } - OptionArgVectorSP GetOptionArguments() { return m_option_args_sp; } + OptionArgVectorSP GetOptionArguments() const { return m_option_args_sp; } const char *GetOptionString() { return m_option_string.c_str(); } // this takes an alias - potentially nested (i.e. an alias to an alias) Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=283385&r1=283384&r2=283385&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Wed Oct 5 16:14:49 2016 @@ -197,9 +197,8 @@ public: bool AddCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace); - bool AddCommand(const char *, const lldb::CommandObjectSP &, bool) = delete; - bool AddUserCommand(std::string name, const lldb::CommandObjectSP &cmd_sp, + bool AddUserCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace); lldb::CommandObjectSP GetCommandSPExact(llvm::StringRef cmd, @@ -208,30 +207,30 @@ public: CommandObject *GetCommandObject(llvm::StringRef cmd, StringList *matches = nullptr) const; - bool CommandExists(const char *cmd); + bool CommandExists(llvm::StringRef cmd) const; - bool AliasExists(const char *cmd); + bool AliasExists(llvm::StringRef cmd) const; - bool UserCommandExists(const char *cmd); + bool UserCommandExists(llvm::StringRef cmd) const; - CommandAlias *AddAlias(const char *alias_name, + CommandAlias *AddAlias(llvm::StringRef alias_name, lldb::CommandObjectSP &command_obj_sp, - const char *args_string = nullptr); + llvm::StringRef args_string = llvm::StringRef()); // Remove a command if it is removable (python or regex command) - bool RemoveCommand(const char *cmd); + bool RemoveCommand(llvm::StringRef cmd); - bool RemoveAlias(const char *alias_name); + bool RemoveAlias(llvm::StringRef alias_name); - bool GetAliasFullName(const char *cmd, std::string &full_name); + bool GetAliasFullName(llvm::StringRef cmd, std::string &full_name) const; - bool RemoveUser(const char *alias_name); + bool RemoveUser(llvm::StringRef alias_name); void RemoveAllUser() { m_user_dict.clear(); } - CommandAlias *GetAlias(const char *alias_name); + const CommandAlias *GetAlias(llvm::StringRef alias_name) const; - CommandObject *BuildAliasResult(const char *alias_name, + CommandObject *BuildAliasResult(llvm::StringRef alias_name, std::string &raw_input_string, std::string &alias_result, CommandReturnObject &result); Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=283385&r1=283384&r2=283385&view=diff == --- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Wed Oct 5 16:14:49 2016 @@ -174,7 +
[Lldb-commits] [lldb] r283386 - Convert some more aliasing and CI functions to StringRef.
Author: zturner Date: Wed Oct 5 16:14:56 2016 New Revision: 283386 URL: http://llvm.org/viewvc/llvm-project?rev=283386&view=rev Log: Convert some more aliasing and CI functions to StringRef. Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/source/API/SBCommandInterpreter.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Expression/REPL.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=283386&r1=283385&r2=283386&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Wed Oct 5 16:14:56 2016 @@ -287,7 +287,7 @@ public: CommandInterpreterRunOptions &options, CommandReturnObject &result); - CommandObject *GetCommandObjectForCommand(std::string &command_line); + CommandObject *GetCommandObjectForCommand(llvm::StringRef &command_line); // This handles command line completion. You are given a pointer to the // command string buffer, to the current cursor, Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=283386&r1=283385&r2=283386&view=diff == --- lldb/trunk/source/API/SBCommandInterpreter.cpp (original) +++ lldb/trunk/source/API/SBCommandInterpreter.cpp Wed Oct 5 16:14:56 2016 @@ -481,7 +481,7 @@ bool SBCommandInterpreter::SetCommandOve const char *command_name, lldb::CommandOverrideCallback callback, void *baton) { if (command_name && command_name[0] && IsValid()) { -std::string command_name_str(command_name); +llvm::StringRef command_name_str = command_name; CommandObject *cmd_obj = m_opaque_ptr->GetCommandObjectForCommand(command_name_str); if (cmd_obj) { Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=283386&r1=283385&r2=283386&view=diff == --- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Wed Oct 5 16:14:56 2016 @@ -595,8 +595,8 @@ protected: if (nullptr == remainder) remainder = raw_command_line; -std::string raw_command_string(remainder); -Args args(raw_command_string.c_str()); +llvm::StringRef raw_command_string(remainder); +Args args(raw_command_string); if (args.GetArgumentCount() < 2) { result.AppendError("'command alias' requires at least two arguments"); @@ -644,10 +644,9 @@ protected: } // Get CommandObject that is being aliased. The command name is read from -// the front of raw_command_string. -// raw_command_string is returned with the name of the command object -// stripped off the front. -std::string original_raw_command_string(raw_command_string); +// the front of raw_command_string. raw_command_string is returned with the +// name of the command object stripped off the front. +llvm::StringRef original_raw_command_string = raw_command_string; CommandObject *cmd_obj = m_interpreter.GetCommandObjectForCommand(raw_command_string); @@ -655,7 +654,7 @@ protected: result.AppendErrorWithFormat("invalid command given to 'command alias'. " "'%s' does not begin with a valid command." " No alias created.", - original_raw_command_string.c_str()); + original_raw_command_string.str().c_str()); result.SetStatus(eReturnStatusFailed); return false; } else if (!cmd_obj->WantsRawCommandString()) { @@ -671,8 +670,8 @@ protected: return result.Succeeded(); } - bool HandleAliasingRawCommand(const std::string &alias_command, -std::string &raw_command_string, + bool HandleAliasingRawCommand(llvm::StringRef alias_command, +llvm::StringRef raw_command_string, CommandObject &cmd_obj, CommandReturnObject &result) { // Verify & handle any options/arguments passed to the alias command @@ -682,14 +681,14 @@ protected: if (CommandObjectSP cmd_obj_sp = m_interpreter.GetCommandSPExact(cmd_obj.GetCommandName(), false)) { - if (m_interpreter.AliasExi
[Lldb-commits] [lldb] r283396 - Fixes for libc++ std::unordered_map data formatter against trunk
Author: enrico Date: Wed Oct 5 17:04:43 2016 New Revision: 283396 URL: http://llvm.org/viewvc/llvm-project?rev=283396&view=rev Log: Fixes for libc++ std::unordered_map data formatter against trunk Fixes rdar://28237467 Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp?rev=283396&r1=283395&r2=283396&view=diff == --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp Wed Oct 5 17:04:43 2016 @@ -47,6 +47,8 @@ public: size_t GetIndexOfChildWithName(const ConstString &name) override; private: + CompilerType m_element_type; + CompilerType m_node_type; ValueObject *m_tree; size_t m_num_elements; ValueObject *m_next_element; @@ -57,8 +59,8 @@ private: lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: LibcxxStdUnorderedMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp) -: SyntheticChildrenFrontEnd(*valobj_sp), m_tree(nullptr), m_num_elements(0), - m_next_element(nullptr), m_elements_cache() { +: SyntheticChildrenFrontEnd(*valobj_sp), m_element_type(), m_tree(nullptr), + m_num_elements(0), m_next_element(nullptr), m_elements_cache() { if (valobj_sp) Update(); } @@ -90,8 +92,32 @@ lldb::ValueObjectSP lldb_private::format node_sp->GetChildMemberWithName(ConstString("__value_"), true); ValueObjectSP hash_sp = node_sp->GetChildMemberWithName(ConstString("__hash_"), true); -if (!hash_sp || !value_sp) - return lldb::ValueObjectSP(); +if (!hash_sp || !value_sp) { + if (!m_element_type) { +auto first_sp = m_backend.GetChildAtNamePath({ConstString("__table_"), + ConstString("__p1_"), + ConstString("__first_")}); +if (!first_sp) + return nullptr; +m_element_type = first_sp->GetCompilerType(); +lldb::TemplateArgumentKind kind; +m_element_type = m_element_type.GetTemplateArgument(0, kind); +m_element_type = m_element_type.GetPointeeType(); +m_node_type = m_element_type; +m_element_type = m_element_type.GetTemplateArgument(0, kind); +std::string name; +m_element_type = +m_element_type.GetFieldAtIndex(0, name, nullptr, nullptr, nullptr); +m_element_type = m_element_type.GetTypedefedType(); + } + if (!m_node_type) +return nullptr; + node_sp = node_sp->Cast(m_node_type); + value_sp = node_sp->GetChildMemberWithName(ConstString("__value_"), true); + hash_sp = node_sp->GetChildMemberWithName(ConstString("__hash_"), true); + if (!value_sp || !hash_sp) +return nullptr; +} m_elements_cache.push_back( {value_sp.get(), hash_sp->GetValueAsUnsigned(0)}); m_next_element = ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283404 - Add i386/x86_64 tests of the eh_frame augmentation code in the x86
Author: jmolenda Date: Wed Oct 5 17:37:01 2016 New Revision: 283404 URL: http://llvm.org/viewvc/llvm-project?rev=283404&view=rev Log: Add i386/x86_64 tests of the eh_frame augmentation code in the x86 insturction profiling. Add a test that verifies that we reject a 32-bit only instruction in 64-bit (long) mode. This wraps up all the testing I want to add for x86AssemblyInspectionEngine. Modified: lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp Modified: lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp?rev=283404&r1=283403&r2=283404&view=diff == --- lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp (original) +++ lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp Wed Oct 5 17:37:01 2016 @@ -958,7 +958,7 @@ TEST_F(Testx86AssemblyInspectionEngine, UnwindPlan::RowSP row_sp; uint8_t data[] = { - 0x55, // pushq $rbp + 0x55, // pushq %rbp 0x90 // nop }; @@ -1583,7 +1583,7 @@ TEST_F(Testx86AssemblyInspectionEngine, std::unique_ptr engine32 = Geti386Inspector(); uint8_t data1[] = { - 0x81, 0xec, 0x00, 0x01, 0x00, 0x00, // subq $0x100, $esp + 0x81, 0xec, 0x00, 0x01, 0x00, 0x00, // subl $0x100, %esp 0x90// nop }; @@ -2110,11 +2110,11 @@ TEST_F(Testx86AssemblyInspectionEngine, std::unique_ptr engine32 = Geti386Inspector(); uint8_t data[] = { - 0x55, // pushq %ebp - 0x89, 0xe5, // movq %esp, %ebp + 0x55, // pushl %ebp + 0x89, 0xe5, // movl %esp, %ebp 0x89, 0x9d, 0xb0, 0xfe, 0xff, 0xff, // movl %ebx, -0x150(%ebp) 0x89, 0x75, 0xe0, // movl %esi, -0x20(%ebp) - 0x90 // nop + 0x90// nop }; sample_range = AddressRange(0x1000, sizeof(data)); @@ -2135,3 +2135,206 @@ TEST_F(Testx86AssemblyInspectionEngine, EXPECT_TRUE(regloc.IsAtCFAPlusOffset()); EXPECT_EQ(-40, regloc.GetOffset()); } + +TEST_F(Testx86AssemblyInspectionEngine, TestSimplex86_64Augmented) { + UnwindPlan::Row::RegisterLocation regloc; + UnwindPlan::RowSP row_sp; + AddressRange sample_range; + UnwindPlan unwind_plan(eRegisterKindLLDB); + std::unique_ptr engine64 = Getx86_64Inspector(); + + uint8_t data[] = { + 0x55, // pushq %rbp + 0x48, 0x89, 0xe5, // movq %rsp, %rbp + + // x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite + // has a bug where it can't augment a function that is just + // prologue+epilogue - it needs at least one other instruction + // in between. + 0x90, // nop + + 0x5d, // popq %rbp + 0xc3 // retq + }; + + sample_range = AddressRange(0x1000, sizeof(data)); + + unwind_plan.SetSourceName("unit testing hand-created unwind plan"); + unwind_plan.SetPlanValidAddressRange(sample_range); + unwind_plan.SetRegisterKind(eRegisterKindLLDB); + + row_sp.reset(new UnwindPlan::Row); + + // Describe offset 0 + row_sp->SetOffset(0); + row_sp->GetCFAValue().SetIsRegisterPlusOffset(k_rsp, 8); + + regloc.SetAtCFAPlusOffset(-8); + row_sp->SetRegisterInfo(k_rip, regloc); + + unwind_plan.AppendRow(row_sp); + + // Allocate a new Row, populate it with the existing Row contents. + UnwindPlan::Row *new_row = new UnwindPlan::Row; + *new_row = *row_sp.get(); + row_sp.reset(new_row); + + // Describe offset 1 + row_sp->SetOffset(1); + row_sp->GetCFAValue().SetIsRegisterPlusOffset(k_rsp, 16); + regloc.SetAtCFAPlusOffset(-16); + row_sp->SetRegisterInfo(k_rbp, regloc); + unwind_plan.AppendRow(row_sp); + + // Allocate a new Row, populate it with the existing Row contents. + new_row = new UnwindPlan::Row; + *new_row = *row_sp.get(); + row_sp.reset(new_row); + + // Describe offset 4 + row_sp->SetOffset(4); + row_sp->GetCFAValue().SetIsRegisterPlusOffset(k_rbp, 16); + unwind_plan.AppendRow(row_sp); + + RegisterContextSP reg_ctx_sp; + EXPECT_TRUE(engine64->AugmentUnwindPlanFromCallSite( + data, sizeof(data), sample_range, unwind_plan, reg_ctx_sp)); + + row_sp = unwind_plan.GetRowForFunctionOffset(6); + EXPECT_EQ(6, row_sp->GetOffset()); + EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp); + EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset()); + + // x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite + // doesn't track register restores (pop'ing a reg value back from + // the stack) - it was just written to make stepping work correctly. + // Technically we should be able to do the following test, but it + // won't work today - the unwind plan will still say that the caller's + // rbp is on the
[Lldb-commits] Buildbot numbers for the week of 9/25/2016 - 10/1/2016
Hello everyone, Below are some buildbot numbers for the last week of 9/25/2016 - 10/1/2016. Please see the same data in attached csv files: The longest time each builder was red during the last week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green); Count of commits by project; Number of completed builds, failed builds and average build time for successful builds per active builder; Average waiting time for a revision to get build result per active builder (response time). Thanks Galina The longest time each builder was red during the last week: buildername| was_red +--- clang-cmake-mipsel | 113:03:59 clang-cmake-mips | 89:43:33 libomp-ompt-clang-x86_64-linux-debian | 72:01:30 sanitizer-x86_64-linux | 69:51:49 clang-cmake-aarch64-quick | 50:18:34 clang-x86-windows-msvc2015 | 50:07:13 lldb-x86_64-ubuntu-14.04-cmake | 35:07:56 clang-ppc64le-linux-multistage | 26:40:23 clang-sphinx-docs | 16:57:01 lldb-windows7-android | 15:52:05 sanitizer-ppc64be-linux| 15:05:26 sanitizer-ppc64le-linux| 13:56:02 clang-x86-win2008-selfhost | 13:55:23 lldb-x86_64-darwin-13.4| 13:21:14 lldb-x86_64-ubuntu-14.04-android | 12:34:33 clang-x64-ninja-win7 | 11:24:55 sanitizer-windows | 11:01:58 lld-x86_64-win7| 11:00:28 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 10:44:15 clang-cmake-thumbv7-a15-full-sh| 09:54:20 clang-cmake-armv7-a15-selfhost-neon| 07:15:43 libcxx-libcxxabi-libunwind-arm-linux | 06:41:17 sanitizer-x86_64-linux-autoconf| 06:39:25 clang-cmake-thumbv7-a15| 06:30:16 clang-cmake-armv7-a15 | 06:30:16 clang-cmake-armv7-a15-full | 06:26:04 clang-cmake-aarch64-full | 06:15:53 clang-cmake-armv7-a15-selfhost | 06:11:34 libcxx-libcxxabi-libunwind-arm-linux-noexceptions | 04:02:06 clang-with-lto-ubuntu | 03:46:36 llvm-sphinx-docs | 03:34:07 sanitizer-x86_64-linux-bootstrap | 03:03:14 llvm-mips-linux| 02:42:20 clang-ppc64be-linux| 02:41:21 clang-hexagon-elf | 02:40:45 clang-s390x-linux | 02:38:57 clang-ppc64be-linux-multistage | 02:31:40 clang-ppc64be-linux-lnt| 02:29:47 clang-ppc64le-linux-lnt| 02:24:52 clang-ppc64le-linux| 02:20:39 clang-native-arm-lnt | 02:19:37 clang-cmake-aarch64-42vma | 02:11:32 lld-x86_64-darwin13| 02:10:32 sanitizer-x86_64-linux-fast| 02:09:59 clang-x86_64-linux-selfhost-modules| 01:59:26 libcxx-libcxxabi-x86_64-linux-ubuntu-tsan | 01:47:24 libcxx-libcxxabi-singlethreaded-x86_64-linux-debian| 01:40:28 libcxx-libcxxabi-x86_64-linux-ubuntu-msan | 01:36:45 clang-x86_64-debian-fast | 01:33:12 clang-cuda-build | 01:31:56 clang-bpf-build| 01:30:18 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast | 01:29:27 perf-x86_64-penryn-O3-polly-unprofitable | 01:21:23 lldb-x86_64-ubuntu-14.04-buildserver | 01:11:42 clang-3stage-ubuntu| 01:08:59 llvm-hexagon-elf | 00:58:01 lld-x86_64-freebsd | 00:55:20 sanitizer-x86_64-linux-fuzzer | 00:49:46 clang-atom-d525-fedora-rel | 00:49:37 perf-x86_64-penryn-O3-
Re: [Lldb-commits] Buildbot numbers for the week of 9/25/2016 - 10/1/2016
On Wed, Oct 5, 2016 at 7:40 PM, Galina Kistanova via cfe-commits wrote: > Hello everyone, > > Below are some buildbot numbers for the last week of 9/25/2016 - 10/1/2016. > > Please see the same data in attached csv files: Can we please fix the clang-tools-sphinx-docs builder or take it offline entirely? It has never been green (to the best of my knowledge). I know some folks have tried fixing it before, but it seems to have not worked out. http://lab.llvm.org:8011/builders/clang-tools-sphinx-docs/builds/624/steps/docs-clang-tools-html/logs/stdio The builder continually fails with "ninja: error: unknown target 'docs-clang-tools-html'". ~Aaron > > The longest time each builder was red during the last week; > "Status change ratio" by active builder (percent of builds that changed the > builder status from greed to red or from red to green); > Count of commits by project; > Number of completed builds, failed builds and average build time for > successful builds per active builder; > Average waiting time for a revision to get build result per active builder > (response time). > > Thanks > > Galina > > > The longest time each builder was red during the last week: > > buildername| was_red > +--- > clang-cmake-mipsel | 113:03:59 > clang-cmake-mips | 89:43:33 > libomp-ompt-clang-x86_64-linux-debian | 72:01:30 > sanitizer-x86_64-linux | 69:51:49 > clang-cmake-aarch64-quick | 50:18:34 > clang-x86-windows-msvc2015 | 50:07:13 > lldb-x86_64-ubuntu-14.04-cmake | 35:07:56 > clang-ppc64le-linux-multistage | 26:40:23 > clang-sphinx-docs | 16:57:01 > lldb-windows7-android | 15:52:05 > sanitizer-ppc64be-linux| 15:05:26 > sanitizer-ppc64le-linux| 13:56:02 > clang-x86-win2008-selfhost | 13:55:23 > lldb-x86_64-darwin-13.4| 13:21:14 > lldb-x86_64-ubuntu-14.04-android | 12:34:33 > clang-x64-ninja-win7 | 11:24:55 > sanitizer-windows | 11:01:58 > lld-x86_64-win7| 11:00:28 > llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 10:44:15 > clang-cmake-thumbv7-a15-full-sh| 09:54:20 > clang-cmake-armv7-a15-selfhost-neon| 07:15:43 > libcxx-libcxxabi-libunwind-arm-linux | 06:41:17 > sanitizer-x86_64-linux-autoconf| 06:39:25 > clang-cmake-thumbv7-a15| 06:30:16 > clang-cmake-armv7-a15 | 06:30:16 > clang-cmake-armv7-a15-full | 06:26:04 > clang-cmake-aarch64-full | 06:15:53 > clang-cmake-armv7-a15-selfhost | 06:11:34 > libcxx-libcxxabi-libunwind-arm-linux-noexceptions | 04:02:06 > clang-with-lto-ubuntu | 03:46:36 > llvm-sphinx-docs | 03:34:07 > sanitizer-x86_64-linux-bootstrap | 03:03:14 > llvm-mips-linux| 02:42:20 > clang-ppc64be-linux| 02:41:21 > clang-hexagon-elf | 02:40:45 > clang-s390x-linux | 02:38:57 > clang-ppc64be-linux-multistage | 02:31:40 > clang-ppc64be-linux-lnt| 02:29:47 > clang-ppc64le-linux-lnt| 02:24:52 > clang-ppc64le-linux| 02:20:39 > clang-native-arm-lnt | 02:19:37 > clang-cmake-aarch64-42vma | 02:11:32 > lld-x86_64-darwin13| 02:10:32 > sanitizer-x86_64-linux-fast| 02:09:59 > clang-x86_64-linux-selfhost-modules| 01:59:26 > libcxx-libcxxabi-x86_64-linux-ubuntu-tsan | 01:47:24 > libcxx-libcxxabi-singlethreaded-x86_64-linux-debian| 01:40:28 > libcxx-libcxxabi-x86_64-linux-ubuntu-msan | 01:36:45 > clang-x86_64-debian-fast | 01:33:12 > clang-cuda-build | 01:31:56 > clang-bpf-bui
[Lldb-commits] [lldb] r283413 - Convert some Args index-based iteration to range-style iteration.
Author: zturner Date: Wed Oct 5 18:40:23 2016 New Revision: 283413 URL: http://llvm.org/viewvc/llvm-project?rev=283413&view=rev Log: Convert some Args index-based iteration to range-style iteration. This is better for a number of reasons. Mostly style, but also: 1) Signed-unsigned comparison warnings disappear since there is no loop index. 2) Iterating with the range-for style gives you back an entry that has more than just a const char*, so it's more efficient and more useful. 3) Makes code safter since the type system enforces that it's impossible to index out of bounds. Modified: lldb/trunk/include/lldb/Core/Mangled.h lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectHelp.cpp lldb/trunk/source/Commands/CommandObjectPlatform.cpp lldb/trunk/source/Commands/CommandObjectProcess.cpp lldb/trunk/source/Commands/CommandObjectSettings.cpp lldb/trunk/source/Commands/CommandObjectSyntax.cpp lldb/trunk/source/Commands/CommandObjectTarget.cpp lldb/trunk/source/Commands/CommandObjectThread.cpp lldb/trunk/source/Commands/CommandObjectType.cpp lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp lldb/trunk/source/Core/Mangled.cpp lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp lldb/trunk/source/Interpreter/CommandAlias.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/CommandObject.cpp lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Modified: lldb/trunk/include/lldb/Core/Mangled.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Mangled.h?rev=283413&r1=283412&r2=283413&view=diff == --- lldb/trunk/include/lldb/Core/Mangled.h (original) +++ lldb/trunk/include/lldb/Core/Mangled.h Wed Oct 5 18:40:23 2016 @@ -63,7 +63,8 @@ public: /// If \b true then \a name is a mangled name, if \b false then /// \a name is demangled. //-- - explicit Mangled(const ConstString &name, bool is_mangled); + Mangled(const ConstString &name, bool is_mangled); + Mangled(llvm::StringRef name, bool is_mangled); //-- /// Construct with name. @@ -76,6 +77,8 @@ public: //-- explicit Mangled(const ConstString &name); + explicit Mangled(llvm::StringRef name); + //-- /// Destructor /// Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=283413&r1=283412&r2=283413&view=diff == --- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Wed Oct 5 18:40:23 2016 @@ -1096,10 +1096,9 @@ protected: result.SetStatus(eReturnStatusSuccessFinishNoResult); } } else { - for (size_t arg_idx = 1; arg_idx < argc; ++arg_idx) { -llvm::StringRef arg_strref(command.GetArgumentAtIndex(arg_idx)); + for (auto &entry : command.entries().drop_front()) { bool check_only = false; -error = AppendRegexSubstitution(arg_strref, check_only); +error = AppendRegexSubstitution(entry.ref, check_only); if (error.Fail()) break; } Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=283413&r1=283412&r2=283413&view=diff == --- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Wed Oct 5 18:40:23 2016 @@ -114,26 +114,25 @@ bool CommandObjectHelp::DoExecute(Args & bool all_okay = true; CommandObject *sub_cmd_obj = cmd_obj; // Loop down through sub_command dictionaries until we find the command - // object that corresponds - // to the help command entered. + // object that corresponds to the help command entered. std::string sub_command; - for (size_t i = 1; i < argc && all_okay; ++i) { -sub_command = command.GetArgumentAtIndex(i); + for (auto &entry : command.entries().drop_front()) { +sub_command = entry.ref; matches.Clear(); if (sub_cmd_obj->IsAlias()) sub_cmd_obj = ((CommandAlias *)sub_cmd_obj)->GetUnderlyingCommand().get(); if (!sub_cmd_obj->IsMultiwordObject()) { all_okay = false; + break;
[Lldb-commits] [lldb] r283414 - Fix build error on Android again.
Author: zturner Date: Wed Oct 5 18:51:13 2016 New Revision: 283414 URL: http://llvm.org/viewvc/llvm-project?rev=283414&view=rev Log: Fix build error on Android again. This one was my fault since I can't compile Android. Modified: lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp Modified: lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp?rev=283414&r1=283413&r2=283414&view=diff == --- lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp (original) +++ lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp Wed Oct 5 18:51:13 2016 @@ -31,7 +31,7 @@ static void FixupEnvironment(Args &env) // path to /system/bin. It is required because the default path used by // execve() is wrong on android. static const char *path = "PATH="; - for (auto &entry : entries) { + for (auto &entry : env.entries()) { if (entry.ref.startswith(path)) return; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24284: [lldb] Read modules from memory when a local copy is not available
That's strange. Are you synced to tip of trunk on clang, llvm, and lldb? Can you paste the output of "ninja -nv check-lldb" and the summary results of "ninja check-lldb"? On Wed, Oct 5, 2016 at 10:11 AM walter erquinigo wrote: > wallace added a comment. > > I've run the tests and it's the same with and without this diff :) > > > https://reviews.llvm.org/D24284 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
hhellyer added a comment. The change seems unlikely to pick up many false positives and core dumps from the type of system described in the bug are only going to get more common. https://reviews.llvm.org/D25179 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r283276 - Add the new minidump files to the Xcode project.
Thanks :) On Wed, Oct 5, 2016 at 1:07 AM, Jim Ingham via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: jingham > Date: Tue Oct 4 19:07:01 2016 > New Revision: 283276 > > URL: http://llvm.org/viewvc/llvm-project?rev=283276&view=rev > Log: > Add the new minidump files to the Xcode project. > > Modified: > lldb/trunk/lldb.xcodeproj/project.pbxproj > > Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj > URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb. > xcodeproj/project.pbxproj?rev=283276&r1=283275&r2=283276&view=diff > > == > --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) > +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Oct 4 19:07:01 2016 > @@ -735,6 +735,8 @@ > 4C56543519D2297A002E9C44 /* SBThreadPlan.h in Headers */ = > {isa = PBXBuildFile; fileRef = 4C56543419D2297A002E9C44 /* SBThreadPlan.h > */; settings = {ATTRIBUTES = (Public, ); }; }; > 4C56543719D22B32002E9C44 /* SBThreadPlan.cpp in Sources */ > = {isa = PBXBuildFile; fileRef = 4C56543619D22B32002E9C44 /* > SBThreadPlan.cpp */; }; > 4C6649A314EEE81000B0316F /* StreamCallback.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = 4C6649A214EEE81000B0316F /* > StreamCallback.cpp */; }; > + 4C6966101DA47BCE004FAE72 /* ThreadMinidump.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = 4C6966081DA47BB4004FAE72 /* > ThreadMinidump.cpp */; }; > + 4C6966111DA47BDB004FAE72 /* ProcessMinidump.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = 4C69660A1DA47BB4004FAE72 /* > ProcessMinidump.cpp */; }; > 4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */ = > {isa = PBXBuildFile; fileRef = 4C88BC291BA3722B00AA0964 /* Expression.cpp > */; }; > 4C88BC2D1BA391B000AA0964 /* UserExpression.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = 4C0083331B9A5DE200D5CF24 /* > UserExpression.cpp */; }; > 4CABA9E0134A8BCD00539BDD /* ValueObjectMemory.cpp in > Sources */ = {isa = PBXBuildFile; fileRef = 4CABA9DF134A8BCD00539BDD /* > ValueObjectMemory.cpp */; }; > @@ -956,7 +958,6 @@ > AFCB2BBD1BF577F40018B553 /* PythonExceptionState.cpp in > Sources */ = {isa = PBXBuildFile; fileRef = AFCB2BBB1BF577F40018B553 /* > PythonExceptionState.cpp */; }; > AFCB2BBE1BF577F40018B553 /* PythonExceptionState.h in > Headers */ = {isa = PBXBuildFile; fileRef = AFCB2BBC1BF577F40018B553 /* > PythonExceptionState.h */; }; > AFD65C811D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp > in Sources */ = {isa = PBXBuildFile; fileRef = AFD65C7F1D9B5B2E00D93120 /* > RegisterContextMinidump_x86_64.cpp */; }; > - AFD65C821D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h > in Headers */ = {isa = PBXBuildFile; fileRef = AFD65C801D9B5B2E00D93120 /* > RegisterContextMinidump_x86_64.h */; }; > AFDCDBCB19DD0F42005EA55E /* SBExecutionContext.h in > Headers */ = {isa = PBXBuildFile; fileRef = 940B02F419DC96CB00AD0F52 /* > SBExecutionContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; > AFDFDFD119E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp > in Sources */ = {isa = PBXBuildFile; fileRef = AFDFDFD019E34D3400EAE509 /* > ConnectionFileDescriptorPosix.cpp */; }; > AFEC3362194A8ABA00FF05C6 /* StructuredData.cpp in Sources > */ = {isa = PBXBuildFile; fileRef = AFEC3361194A8ABA00FF05C6 /* > StructuredData.cpp */; }; > @@ -1335,7 +1336,6 @@ > 23E2E5201D903726006F38BB /* linux-x86_64.dmp */ = {isa = > PBXFileReference; lastKnownFileType = file; path = "linux-x86_64.dmp"; > sourceTree = ""; }; > 23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */ = {isa > = PBXFileReference; fileEncoding = 4; lastKnownFileType = > sourcecode.cpp.cpp; path = BreakpointIDTest.cpp; sourceTree = ""; }; > 23E2E52E1D90382B006F38BB /* CMakeLists.txt */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = > CMakeLists.txt; sourceTree = ""; }; > - 23E2E5361D9048FB006F38BB /* CMakeLists.txt */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = > CMakeLists.txt; sourceTree = ""; }; > 23E2E5371D9048FB006F38BB /* MinidumpParser.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > path = MinidumpParser.cpp; sourceTree = ""; }; > 23E2E5381D9048FB006F38BB /* MinidumpParser.h */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; > path = MinidumpParser.h; sourceTree = ""; }; > 23E2E5391D9048FB006F38BB /* MinidumpTypes.cpp */ = {isa = > PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; > path = MinidumpTypes.cpp; sourceTree = ""; }; > @@ -2531,6 +2531,10 @@ > 4C626533130F1B0A00C889F6 /* StreamTee.h */
[Lldb-commits] [lldb] r283313 - Delete unused global in ClangExpressionVariable.cpp
Author: ldrumm Date: Wed Oct 5 07:40:49 2016 New Revision: 283313 URL: http://llvm.org/viewvc/llvm-project?rev=283313&view=rev Log: Delete unused global in ClangExpressionVariable.cpp Differential Revision: https://reviews.llvm.org/D24793 Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp?rev=283313&r1=283312&r2=283313&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp Wed Oct 5 07:40:49 2016 @@ -21,8 +21,6 @@ using namespace lldb_private; using namespace clang; -const char *g_clang_expression_variable_kind_name = "ClangExpressionVariable"; - ClangExpressionVariable::ClangExpressionVariable( ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D24793: Delete an (apparently unused) global in ClangExpressionVaraible.cpp
This revision was automatically updated to reflect the committed changes. Closed by commit rL283313: Delete unused global in ClangExpressionVariable.cpp (authored by ldrumm). Changed prior to commit: https://reviews.llvm.org/D24793?vs=72021&id=73636#toc Repository: rL LLVM https://reviews.llvm.org/D24793 Files: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp === --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp @@ -21,8 +21,6 @@ using namespace lldb_private; using namespace clang; -const char *g_clang_expression_variable_kind_name = "ClangExpressionVariable"; - ClangExpressionVariable::ClangExpressionVariable( ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size) Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp === --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp @@ -21,8 +21,6 @@ using namespace lldb_private; using namespace clang; -const char *g_clang_expression_variable_kind_name = "ClangExpressionVariable"; - ClangExpressionVariable::ClangExpressionVariable( ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283320 - cleanup RSCoordinate handling and factor out coordinate parser
Author: ldrumm Date: Wed Oct 5 09:34:52 2016 New Revision: 283320 URL: http://llvm.org/viewvc/llvm-project?rev=283320&view=rev Log: cleanup RSCoordinate handling and factor out coordinate parser - This change updates the signature of `RenderScriptRuntime::PlaceBreakpointOnKernel` to take a default RSCoordinate pointer of nullptr. We use this as the predicate value for the breakpoint coordinate rather than trying to fit a sentinel `-1` into a signed version. ``` - void - PlaceBreakpointOnKernel(Stream &strm, const char *name, const std::array coords, Error &error, - lldb::TargetSP target); ``` ``` + bool + PlaceBreakpointOnKernel(lldb::TargetSP target, Stream &messages, const char *name, + const lldb_renderscript::RSCoordinate *coords = nullptr); ``` The above change makes the API for setting breakpoints on kernels cleaner as it returns a failure value rather than modify a sentinel in the caller. The optional arguments are now last and have a default (falsey) value. - RSCoordinate objects are now comparable with operator== and have zero initializers which should make them easier to work on. - Added a `FMT_COORD` macro for use in logging format strings which should make format strings a little less verbose. Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=283320&r1=283319&r2=283320&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Wed Oct 5 09:34:52 2016 @@ -43,6 +43,8 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_renderscript; +#define FMT_COORD "(%" PRIu32 ", %" PRIu32 ", %" PRIu32 ")" + namespace { // The empirical_type adds a basic level of validation to arbitrary data @@ -429,6 +431,43 @@ bool GetArgs(ExecutionContext &context, return false; } } + +bool ParseCoordinate(llvm::StringRef coord_s, RSCoordinate &coord) { + // takes an argument of the form 'num[,num][,num]'. + // Where 'coord_s' is a comma separated 1,2 or 3-dimensional coordinate + // with the whitespace trimmed. + // Missing coordinates are defaulted to zero. + // If parsing of any elements fails the contents of &coord are undefined + // and `false` is returned, `true` otherwise + + RegularExpression regex; + RegularExpression::Match regex_match(3); + + bool matched = false; + if (regex.Compile(llvm::StringRef("^([0-9]+),([0-9]+),([0-9]+)$")) && + regex.Execute(coord_s, ®ex_match)) +matched = true; + else if (regex.Compile(llvm::StringRef("^([0-9]+),([0-9]+)$")) && + regex.Execute(coord_s, ®ex_match)) +matched = true; + else if (regex.Compile(llvm::StringRef("^([0-9]+)$")) && + regex.Execute(coord_s, ®ex_match)) +matched = true; + + if (!matched) +return false; + + auto get_index = [&](int idx, uint32_t &i) -> bool { +std::string group; +errno = 0; +if (regex_match.GetMatchAtIndex(coord_s.str().c_str(), idx + 1, group)) + return !llvm::StringRef(group).getAsInteger(10, i); +return true; + }; + + return get_index(0, coord.x) && get_index(1, coord.y) && + get_index(2, coord.z); +} } // anonymous namespace // The ScriptDetails class collects data associated with a single script @@ -3285,9 +3324,9 @@ bool RenderScriptRuntime::GetFrameVarAsU // and false otherwise. bool RenderScriptRuntime::GetKernelCoordinate(RSCoordinate &coord, Thread *thread_ptr) { - static const std::string s_runtimeExpandSuffix(".expand"); - static const std::array s_runtimeCoordVars{ - {"rsIndex", "p->current.y", "p->current.z"}}; + static const char *const x_expr = "rsIndex"; + static const char *const y_expr = "p->current.y"; + static const char *const z_expr = "p->current.z"; Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE)); @@ -3311,48 +3350,38 @@ bool RenderScriptRuntime::GetKernelCoord // Find the function name const SymbolContext sym_ctx = frame_sp->GetSymbolContext(false); -const char *func_name_cstr = sym_ctx.GetFunctionName().AsCString(); -if (!func_name_cstr) +const ConstString func_name = sym_ctx.GetFunctionName(); +if (!func_name) continue; if (log) log->Printf("%s - Inspecting function '%s'", __FUNCTION__, - func_name_cstr); + func_name.GetCString()); // Check if function name ha