[Lldb-commits] [lldb] r320366 - Add a StringList constructor to Args class

2017-12-11 Thread Pavel Labath via lldb-commits
Author: labath Date: Mon Dec 11 06:22:30 2017 New Revision: 320366 URL: http://llvm.org/viewvc/llvm-project?rev=320366=rev Log: Add a StringList constructor to Args class Host::GetEnvironment returns a StringList, but the interface for launching a process takes Args. The fact that we use two

[Lldb-commits] [PATCH] D41066: llgs-tests: Make addition of new tests easier

2017-12-11 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added a subscriber: mgorny. Adding a new test would require one to duplicate a significant part of the existing test that we have. This attempts to reduce that by moving some part of that code to the test fixture. The StandardStartupTest fixture automatically

[Lldb-commits] [PATCH] D41008: MainLoop: avoid infinite loop when pty slave gets closed

2017-12-11 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320345: MainLoop: avoid infinite loop when pty slave gets closed (authored by labath). Repository: rL LLVM https://reviews.llvm.org/D41008 Files: lldb/trunk/source/Host/common/MainLoop.cpp

[Lldb-commits] [lldb] r320345 - MainLoop: avoid infinite loop when pty slave gets closed

2017-12-11 Thread Pavel Labath via lldb-commits
Author: labath Date: Mon Dec 11 01:33:18 2017 New Revision: 320345 URL: http://llvm.org/viewvc/llvm-project?rev=320345=rev Log: MainLoop: avoid infinite loop when pty slave gets closed Summary: For ptys (at least on Linux), the end-of-file (closing of the slave FD) is signalled by the POLLHUP

[Lldb-commits] [lldb] r320349 - Fix osx build broken in r320346

2017-12-11 Thread Pavel Labath via lldb-commits
Author: labath Date: Mon Dec 11 03:12:22 2017 New Revision: 320349 URL: http://llvm.org/viewvc/llvm-project?rev=320349=rev Log: Fix osx build broken in r320346 Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Modified:

[Lldb-commits] [lldb] r320346 - Move PseudoTerminal to the lldb_private namespace

2017-12-11 Thread Pavel Labath via lldb-commits
Author: labath Date: Mon Dec 11 02:09:14 2017 New Revision: 320346 URL: http://llvm.org/viewvc/llvm-project?rev=320346=rev Log: Move PseudoTerminal to the lldb_private namespace lldb_utility doesn't make sense, as it is no longer even living in the "utility" module. Modified:

[Lldb-commits] [lldb] r320377 - dotest.py: Correctly annotate lldbinline tests with debug info categories

2017-12-11 Thread Pavel Labath via lldb-commits
Author: labath Date: Mon Dec 11 07:28:21 2017 New Revision: 320377 URL: http://llvm.org/viewvc/llvm-project?rev=320377=rev Log: dotest.py: Correctly annotate lldbinline tests with debug info categories This enables one to run all dwo tests with dotest.py --category dwo, or skip them with

[Lldb-commits] [PATCH] D41070: llgs: Propagate the environment when launching the inferior from command line

2017-12-11 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added a subscriber: mgorny. We were failing to propagate the environment when lldb-server was started with a pre-loaded process (e.g.: lldb-server gdbserver -- inferior --inferior_args) This patch makes sure the environment is propagated. Instead of adding a

[Lldb-commits] [PATCH] D41069: NPL: Clean up handling of inferior exit

2017-12-11 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. lldb-server was sending the "exit" packet (W??) twice. This happened because it was handling both the pre-exit (PTRACE_EVENT_EXIT) and post-exit (WIFEXITED) as exit events. We had some code which was trying to detect when we've already sent the exit packet, but this

Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-11 Thread Adrian McCarthy via lldb-commits
I have some concerns about this change. 1. strlcpy is not a C++ standard function, so it's not available for non-POSIX targets. As far as I can tell, this is the first use of strlcpy in LLVM. 2. In some of the changed calls, the buffer size argument still has a -1, which is redundant with

[Lldb-commits] [PATCH] D41070: llgs: Propagate the environment when launching the inferior from command line

2017-12-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Anything that launches a process should use the ProcessLaunchInfo. Nice patch. Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h:46 -

Re: [Lldb-commits] [PATCH] D40616: ObjectFileELF: Add support for compressed sections

2017-12-11 Thread Zachary Turner via lldb-commits
What about adding GetMemorySize? On Mon, Dec 11, 2017 at 10:23 AM Greg Clayton via Phabricator < revi...@reviews.llvm.org> wrote: > clayborg added a comment. > > I think GetFileSize() should remain the number of bytes of the section on > disk and we should add new API if we need to figure out the

[Lldb-commits] [PATCH] D41069: NPL: Clean up handling of inferior exit

2017-12-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Is the lldb_private::Process we have an exit status in the class itself. The first person to set the exit status wins and no one can set it twice. Doesn't look like what we are doing here. I am not able to tell what actually fixes things here?

[Lldb-commits] [PATCH] D40616: ObjectFileELF: Add support for compressed sections

2017-12-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. @davide: Any thoughts on `.yaml` as a test file suffix? @clayborg: What do you think about my comment about GetFileSize() of compressed sections In https://reviews.llvm.org/D40616#940408, @labath wrote: > This rewrites the test in terms on the new lldb-test utility. It

[Lldb-commits] [PATCH] D40616: ObjectFileELF: Add support for compressed sections

2017-12-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. I think GetFileSize() should remain the number of bytes of the section on disk and we should add new API if we need to figure out the decompressed size. Or maybe when we get bytes from a compressed section we are expected to always just get the raw bytes, then we

[Lldb-commits] [PATCH] D41069: NPL: Clean up handling of inferior exit

2017-12-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In https://reviews.llvm.org/D41069#951208, @clayborg wrote: > Is the lldb_private::Process we have an exit status in the class itself. The > first person to set the exit status wins and no one can set it twice. Doesn't > look like what we are doing here. I am not able

Re: [Lldb-commits] [PATCH] D40616: ObjectFileELF: Add support for compressed sections

2017-12-11 Thread Greg Clayton via lldb-commits
> On Dec 11, 2017, at 10:25 AM, Zachary Turner wrote: > > What about adding GetMemorySize? We already have that as Section::GetByteSize(). > On Mon, Dec 11, 2017 at 10:23 AM Greg Clayton via Phabricator > >

Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-11 Thread Joerg Sonnenberger via lldb-commits
On Sat, Dec 09, 2017 at 03:37:09AM -, Jason Molenda via lldb-commits wrote: > Log: > Change uses of strncpy in debugserver to strlcpy > for better safety. I don't think this is an improvement really. Many of those should be plain memcpy or protected against truncation. Joerg

[Lldb-commits] [PATCH] D40616: ObjectFileELF: Add support for compressed sections

2017-12-11 Thread Davide Italiano via Phabricator via lldb-commits
davide added a comment. In https://reviews.llvm.org/D40616#951256, @labath wrote: > @davide: Any thoughts on `.yaml` as a test file suffix? I think this is fine. https://reviews.llvm.org/D40616 ___ lldb-commits mailing list

Re: [Lldb-commits] [lldb] r320242 - Change uses of strncpy in debugserver to strlcpy

2017-12-11 Thread Jason Molenda via lldb-commits
Hi Adrian, These are good points, thanks for the feedback. debugserver is unique in the code base in that it only builds on darwin targets. Originally it was intended to be a generic standalone gdb-remote protocol stub implementation, but it was only ever implemented for macos and for that

[Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:392-399 + bool is_regex = false; + if (name_str.find_first_of("[]?*.-+\\") != std::string::npos) { +// Trying to compile an invalid regex could throw an exception. +// Only

[Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Aaron Smith via Phabricator via lldb-commits
asmith added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:393 + bool is_regex = false; + if (name_str.find_first_of("[]?*.-+\\") != std::string::npos) { +// Trying to compile an invalid regex could throw an exception. The

[Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Aaron Smith via Phabricator via lldb-commits
asmith created this revision. Check that a regex is valid before searching by regex for a symbol in a pdb. This avoids throwing an exception on an invalid regex. Repository: rL LLVM https://reviews.llvm.org/D41086 Files: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

[Lldb-commits] [lldb] r320422 - [Testsuite] Rename this file from *m -> *mm.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 13:21:53 2017 New Revision: 320422 URL: http://llvm.org/viewvc/llvm-project?rev=320422=rev Log: [Testsuite] Rename this file from *m -> *mm. Should hopefully bring the bots back. Added:

[Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. We should have a dedicated API that actually searches for types using a lldb_private::RegularExpression. Why do we even try to create a regular expression in SymbolFilePDB::FindTypes()? Was it used in testing? No API in LLDB currently expects this and all other API in

[Lldb-commits] [PATCH] D41092: Enable more abilities in SymbolFilePDB

2017-12-11 Thread Aaron Smith via Phabricator via lldb-commits
asmith created this revision. 1. Finding symbols through --symfile 2. More abilities: Functions, Blocks, GlobalVariables, LocalVariables, VariableTypes Repository: rL LLVM https://reviews.llvm.org/D41092 Files: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

Re: [Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Zachary Turner via lldb-commits
SymbolFile does not have a method for searching by regex. There is a FindFunctions and FindGlobalVariables that allows searching by regex, but not one for types. That said, one could be added to the base class, yes. That does seem like a better long term solution. On Mon, Dec 11, 2017 at 1:37

Re: [Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Greg Clayton via lldb-commits
Please do add this as that is the best solution. If no other plug-ins currently support it, it is fine to just stub out the virtual function in SymbolFile::FindTypesByRegex(...) to return Error("unsupported") and we can implement it in the regex search later for DWARF and other plug-ins. Greg

[Lldb-commits] [PATCH] D41092: Enable more abilities in SymbolFilePDB

2017-12-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:127 + } + lldbassert(m_session_up.get()); + if (auto enum_tables_up = m_session_up->getEnumTables()) { I am assuming this assert won't fire if we give this an ELF or

[Lldb-commits] [lldb] r320425 - [test-suite] Un'XFAIL a test that's not failing anymore.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 13:52:02 2017 New Revision: 320425 URL: http://llvm.org/viewvc/llvm-project?rev=320425=rev Log: [test-suite] Un'XFAIL a test that's not failing anymore. This is the first of a series of commits aiming to improve overall LLDB's hygiene. Feel free to shout at me in

[Lldb-commits] [lldb] r320444 - [testsuite] Remove testing failures vestiges.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 17:14:11 2017 New Revision: 320444 URL: http://llvm.org/viewvc/llvm-project?rev=320444=rev Log: [testsuite] Remove testing failures vestiges. Some tests are failing on macOS when building with the in-tree clang, and this is because they're conditional on the

[Lldb-commits] [PATCH] D41101: [testsuite] Remove testing failures vestiges

2017-12-11 Thread Davide Italiano via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320444: [testsuite] Remove testing failures vestiges. (authored by davide). Changed prior to commit: https://reviews.llvm.org/D41101?vs=126478=126479#toc Repository: rL LLVM

[Lldb-commits] [PATCH] D41092: Enable more abilities in SymbolFilePDB

2017-12-11 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:108-125 + if (auto module_sp = m_obj_file->GetModule()) { +// See if a symbol file was specified through the `--symfile` option. +FileSpec symfile =

[Lldb-commits] [PATCH] D41101: [testsuite] Remove testing failures vestiges

2017-12-11 Thread Vedant Kumar via Phabricator via lldb-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks! The 6.0 compiler is ancient at this point. This lgtm. https://reviews.llvm.org/D41101 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D41099: [lldb] Switch to add_llvm_install_targets

2017-12-11 Thread Petr Hosek via Phabricator via lldb-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D41099 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [PATCH] D41099: [lldb] Switch to add_llvm_install_targets

2017-12-11 Thread Shoaib Meenai via Phabricator via lldb-commits
smeenai created this revision. Herald added a subscriber: mgorny. This adds the install-*-stripped targets to LLDB, which are required for the install-distribution-stripped option. We also need to create some install-*-stripped targets manually, which are modeled after their corresponding

[Lldb-commits] [lldb] r320447 - Rollback [Testsuite] Rename this file from *m -> *mm.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 17:21:43 2017 New Revision: 320447 URL: http://llvm.org/viewvc/llvm-project?rev=320447=rev Log: Rollback [Testsuite] Rename this file from *m -> *mm. After discussing this with Jim and Jason, I think my commit was actually sweeping the issue under the carpet

[Lldb-commits] [lldb] r320443 - [lldb] Switch to add_llvm_install_targets

2017-12-11 Thread Shoaib Meenai via lldb-commits
Author: smeenai Date: Mon Dec 11 16:47:07 2017 New Revision: 320443 URL: http://llvm.org/viewvc/llvm-project?rev=320443=rev Log: [lldb] Switch to add_llvm_install_targets This adds the install-*-stripped targets to LLDB, which are required for the install-distribution-stripped option. We also

[Lldb-commits] [PATCH] D41099: [lldb] Switch to add_llvm_install_targets

2017-12-11 Thread Shoaib Meenai via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320443: [lldb] Switch to add_llvm_install_targets (authored by smeenai). Repository: rL LLVM https://reviews.llvm.org/D41099 Files: lldb/trunk/cmake/modules/AddLLDB.cmake Index:

[Lldb-commits] [PATCH] D41086: [lldb] Check that a regex is valid before searching by regex for a symbol in a pdb.

2017-12-11 Thread Aaron Smith via Phabricator via lldb-commits
asmith added inline comments. Comment at: source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:392-399 + bool is_regex = false; + if (name_str.find_first_of("[]?*.-+\\") != std::string::npos) { +// Trying to compile an invalid regex could throw an exception. +// Only search

[Lldb-commits] [lldb] r320452 - [TestCppScope] This test now passes on Darwin.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 18:32:49 2017 New Revision: 320452 URL: http://llvm.org/viewvc/llvm-project?rev=320452=rev Log: [TestCppScope] This test now passes on Darwin. I tested on x86-64 and Jason on embedded architectures. This cleans up another couple of reported unexpected successes.

[Lldb-commits] [lldb] r320454 - [TestModulesInlineFunctions] This test now passes.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 18:52:01 2017 New Revision: 320454 URL: http://llvm.org/viewvc/llvm-project?rev=320454=rev Log: [TestModulesInlineFunctions] This test now passes. Remove yet another spurious unexpected success. Ack'ed by Jim Ingham. Fixes PR25743. Modified:

[Lldb-commits] [lldb] r320450 - [testsuite] Remove even more testing vestiges.

2017-12-11 Thread Davide Italiano via lldb-commits
Author: davide Date: Mon Dec 11 18:10:23 2017 New Revision: 320450 URL: http://llvm.org/viewvc/llvm-project?rev=320450=rev Log: [testsuite] Remove even more testing vestiges. With this one, the number of unexpected successes for the LLDB test suite when building with clang ToT goes down to 18.

Re: [Lldb-commits] [lldb] r320456 - Avoid module import in a textual header, NFC

2017-12-11 Thread Zachary Turner via lldb-commits
Long term it would be nice if we could get all these register definitions automatically generated with llvm-tblgen. That's a big undertaking, though. On Mon, Dec 11, 2017 at 7:27 PM Vedant Kumar via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: vedantk > Date: Mon Dec 11 19:27:13