Commit Graph

15497 Commits

Author SHA1 Message Date
Zachary Turner 72f4997cbf Fix some accidental Prints of StringRefs that snuck in.
llvm-svn: 287412
2016-11-19 00:50:29 +00:00
Zachary Turner eb4a0cb16b Fix some build errors.
llvm-svn: 287409
2016-11-18 23:32:37 +00:00
Chris Bieneman b653c4957d [CMake] NFC. Updating CMake dependency specifications
This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system.

llvm-svn: 287408
2016-11-18 23:31:53 +00:00
Zachary Turner 53877afcb0 Convert CommandHistory functions to StringRef.
llvm-svn: 287401
2016-11-18 23:22:42 +00:00
Enrico Granata f09b68e029 Removing myself from CODE_OWNERS, and distributing those duties among other members of the community
That's All, Folks

llvm-svn: 287397
2016-11-18 23:18:11 +00:00
Jim Ingham 9ac82603d5 Fix "thread step until" handling of multiple line inputs.
Also document that it handles same, and add some tests.

llvm-svn: 287386
2016-11-18 22:06:10 +00:00
Zachary Turner a47464b273 Change CreateTarget and dependents to accept StringRef.
llvm-svn: 287376
2016-11-18 20:44:46 +00:00
Zachary Turner 2a3d10ae61 Re-add the StringRef interface changes for Variable.
This concludes the changes I originally tried to make and then
had to back out.  This way if anything is still broken, it
should be easier to bisect it back to a more specific changeset.

llvm-svn: 287367
2016-11-18 19:23:39 +00:00
Zachary Turner d2daca770b Resubmit "Remove an output-parameter from Variable function".
The scanning algorithm had a few little subtleties that I
overlooked, but this patch should fix everything.

I still haven't changed the function to take a StringRef since
that has some trickle down effect and is mostly mechanical,
I just wanted to get the tricky part as isolated as possible.

llvm-svn: 287354
2016-11-18 17:55:04 +00:00
Zachary Turner 655c452534 Revert "Remove an out param from ValueObject::GetValueForExpressionPath."
This reverts commit r287315, as it introduces a bug that breaks
many things.

llvm-svn: 287320
2016-11-18 06:34:45 +00:00
Zachary Turner 82d760879f Remove an out param from ValueObject::GetValueForExpressionPath.
This argument was only used in one place in the codebase, and
it was in a non-critical log statement and can be easily
substituted for an equally meaningful field instead.  The
payoff of computing this value is not worth the added
complexity.

llvm-svn: 287315
2016-11-18 05:45:41 +00:00
Zachary Turner 70a38092fd Delete more dead code in ValueObject.
Apparently these two enormous functions were dead.  Which is
good, since one was largely a copy of another function with
only a few minor tweaks.

llvm-svn: 287308
2016-11-18 04:30:47 +00:00
Zachary Turner c2d5558b21 Remove some dead code in ValueObject.
Originally I converted this entire function and all dependents
to use StringRef, but there were some test failures that
were tricky to track down, as this is a complicated function.
So I'm starting over, this time in smaller increments.

llvm-svn: 287307
2016-11-18 03:51:19 +00:00
Zachary Turner ac96f66add Resubmit "Change RegisterValue getters / setters to use StringRef."
This resubmits r287279 with a fix for the original issue, which
was a trivial typo.

llvm-svn: 287282
2016-11-17 23:47:31 +00:00
Zachary Turner 8df8046bd9 Revert "Change RegisterValue getters / setters to use StringRef."
This reverts commit r287279, which breaks some register
tests on Linux.

llvm-svn: 287281
2016-11-17 23:32:26 +00:00
Zachary Turner b379d7df12 Change RegisterValue getters / setters to use StringRef.
In the process, found some functions that were duplicates of
existing StringRef member functions.  So deleted those functions
and used the StringRef functions instead.

llvm-svn: 287279
2016-11-17 23:05:28 +00:00
Sam McCall 592fa122c2 Fix step-over when SymbolContext.function is missing and symbol is present.
Summary:
Fix step-over when SymbolContext.function is missing and symbol is present.

With targets from our build configuration,
ThreadPlanStepOverRange::IsEquivalentContext fails to fire for relevant frames,
leading to ShouldStop() returning true prematurely.

The frame's SymbolContext, and m_addr_context have:
  - comp_unit set and matching
  - function = nullptr
  - symbol set and matching (but this is never checked)
My naive guess is that the context should be equivalent in this case :-)

Reviewers: jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D26804

llvm-svn: 287274
2016-11-17 22:29:31 +00:00
Zachary Turner e00e64caa7 Make GetRegisterByName() take a StringRef.
This one is fairly trivial and only really involves changing
function signatures and a few simple call-sites.

llvm-svn: 287266
2016-11-17 21:54:37 +00:00
Zachary Turner 3165945a41 Convert Platform, Process, and Connection functions to StringRef.
All tests pass on Linux and Windows.

llvm-svn: 287259
2016-11-17 21:15:14 +00:00
Zachary Turner 31d97a5c8a Rewrite all Property related functions in terms of StringRef.
This was a bit tricky, especially for things like
OptionValueArray and OptionValueDictionary since they do some
funky string parsing.  Rather than try to re-write line-by-line
I tried to make the StringRef usage idiomatic, even though
it meant often re-writing from scratch large blocks of code
in a different way while keeping true to the original intent.

The finished code is a big improvement though, and often much
shorter than the original code.  All tests and unit tests
pass on Windows and Linux.

llvm-svn: 287242
2016-11-17 18:08:12 +00:00
Zachary Turner f2e0d384e1 Fix one more build error with lldb-server.
llvm-svn: 287212
2016-11-17 06:13:54 +00:00
Zachary Turner 0eb31a1d96 Fix warnings and errors introduced with UUID changes.
llvm-svn: 287208
2016-11-17 05:14:32 +00:00
Zachary Turner 245f7fdcfa Convert UriParser to use StringRef.
llvm-svn: 287190
2016-11-17 01:38:02 +00:00
Zachary Turner 24bd317871 Make GetValueForVariableExpression use StringRef.
Also significantly reduced the indentation level by use of
early returns, and simplified some of the logic by using
StringRef functions such as consumeInteger() and getAsInteger()
instead of strtoll, etc.

llvm-svn: 287189
2016-11-17 01:37:52 +00:00
Zachary Turner 4aa8753c81 Convert AutoComplete related code to StringRef.
Differential Revision: https://reviews.llvm.org/D26721

llvm-svn: 287188
2016-11-17 01:37:42 +00:00
Zachary Turner 6fe867a830 Fix some unit test compilation failures.
llvm-svn: 287158
2016-11-16 21:45:11 +00:00
Zachary Turner 067d1db139 Make Apropos functions accept StringRefs.
llvm-svn: 287157
2016-11-16 21:45:04 +00:00
Zachary Turner a49c2019f1 Update GenerateAdditionalHelpAvenues to take StringRef.
llvm-svn: 287155
2016-11-16 21:34:22 +00:00
Zachary Turner c156427ded Don't allow direct access to StreamString's internal buffer.
This is a large API change that removes the two functions from
StreamString that return a std::string& and a const std::string&,
and instead provide one function which returns a StringRef.

Direct access to the underlying buffer violates the concept of
a "stream" which is intended to provide forward only access,
and makes porting to llvm::raw_ostream more difficult in the
future.

Differential Revision: https://reviews.llvm.org/D26698

llvm-svn: 287152
2016-11-16 21:15:24 +00:00
Adrian McCarthy 1ca677f4c4 Remove Windows-specific minidump plugin
With the cross-platform minidump plugin working, the Windows-specific one is no longer needed. This eliminates the unnecessary code.

This does not eliminate the Windows-specific tests, as they hit a few cases the general tests don't. (The Windows-specific tests are currently passing.) I'll look into a separate patch to make sure we're not doing too much duplicate testing.

After that I might do a little re-org in the Windows plugin, as there was some factoring there (Common & Live) that probably isn't necessary anymore.

Differential Revision: https://reviews.llvm.org/D26697

llvm-svn: 287113
2016-11-16 16:04:14 +00:00
Pavel Labath 8cb1cd9b7b Remove TimeValue class
Summary:
All usages have been replaced by appropriate std::chrono funcionality, and the
class is now unused. The only used part of the cpp file is the DumpTimePoint
function, which I have moved into the only caller (CommandObjectTarget.cpp).

Reviewers: clayborg, zturner

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D26451

llvm-svn: 287096
2016-11-16 10:54:22 +00:00
Pavel Labath 5b909a6534 Fix printf warning I introduced in ModuleSpec.h
llvm-svn: 287095
2016-11-16 10:54:17 +00:00
Zachary Turner e6f6d4c2f2 Change Property::GetName() and GetDescription() to return StringRef.
llvm-svn: 287055
2016-11-15 23:36:43 +00:00
Zachary Turner 2dd214a1cb Make some code not manipulate the underlying string of a StreamString.
Differential Revision: https://reviews.llvm.org/D26618

llvm-svn: 287017
2016-11-15 20:13:14 +00:00
Zachary Turner 32b1c7f7f1 One more fix for Printf. Apparently I fail at incremental builds.
llvm-svn: 287016
2016-11-15 20:11:01 +00:00
Sam McCall 6f43d9df61 Fix uninitialized members.
Summary: Fix uninitialized members.

Reviewers: jingham

Subscribers: jingham, lldb-commits

Differential Revision: https://reviews.llvm.org/D26528

llvm-svn: 286947
2016-11-15 10:58:16 +00:00
Jason Molenda 2b0a7be96e Change the kernel searching code to not go through the
memory cache subsystem so we're reading only the 4 bytes
needed to check for the magic word at the start of a mach-o
binary instead of the default 512 block.  It can be a small
performance help to reduce the size of memory reads from 
possibly unmapped memory.

<rdar://problem/29256385> 

llvm-svn: 286926
2016-11-15 01:41:27 +00:00
Zachary Turner 0fe35b158f Fix some more Printf warnings.
llvm-svn: 286916
2016-11-15 00:45:23 +00:00
Zachary Turner 1e8016b2ea Fix some more StringRef printf warnings.
llvm-svn: 286915
2016-11-15 00:45:18 +00:00
Adrian McCarthy 18270a843a Fix TestMiniDumpNew.py test for Python 2/3 issue
On Windows, where we use Python 3 for testing, we have to be more explicit about converting between binary and string representations.  I believe this should still work for Python 2, but I don't have a convenient way to try it out.

Differential Revision: https://reviews.llvm.org/D26643

llvm-svn: 286909
2016-11-14 23:53:45 +00:00
Greg Clayton 7b26dbb125 Fix a deadlock issue that would happen when loading an AppleTV or watchOS binary.
This was a regression that was caused by svn revision 269877:

commit 1ded4a2a25d60dd2c81bd432bcf63b6ded58e5d6
Author: Saleem Abdulrasool <compnerd@compnerd.org>
Date:   Wed May 18 01:59:10 2016 +0000

    remove use of Mutex in favour of std::{,recursive_}mutex
    
    This is a pretty straightforward first pass over removing a number of uses of
    Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there
    are interfaces which take Mutex::Locker & to lock internal locks. This patch
    cleans up most of the easy cases. The only non-trivial change is in
    CommandObjectTarget.cpp where a Mutex::Locker was split into two.
    
    git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@269877 91177308-0d34-0410-b5e6-96231b3b80d8

This change actually changed the Platform::m_mutex to be non-recursive which caused the regression.

<rdar://problem/29094384>

llvm-svn: 286908
2016-11-14 23:45:50 +00:00
Zachary Turner 03c9f3642a Fix some StringRef Printf warnings.
llvm-svn: 286906
2016-11-14 23:23:31 +00:00
Chris Bieneman bd3d0263f8 One more cleanup to lldb version printing
With this patch LLDB_VERSION_STRING replaces "lldb version x.x.x" if it is set. This allows builds to not display the open source version numbers if the people making the distribution overrides the LLDB_VERSION_STRING.

Since LLDB_VERSION_STRING is always overridden on Darwin, this means the first line of lldb -version on Darwin is:

lldb-360.99.0 (<repo path> revision <revision>)

llvm-svn: 286899
2016-11-14 22:43:08 +00:00
Enrico Granata b8d0d1cc75 I am leaving Apple in a few weeks; switch over to my personal email address
llvm-svn: 286782
2016-11-13 21:30:54 +00:00
Zachary Turner e706c1d9d9 Make OptionParser::Parse() take StringRef.
llvm-svn: 286747
2016-11-13 04:24:38 +00:00
Zachary Turner 8927f23abd Fix some use-after-frees that my last CL introduced.
llvm-svn: 286745
2016-11-13 03:36:01 +00:00
Zachary Turner aa5611f56d Change ValueObject creation functions to take StringRefs.
llvm-svn: 286744
2016-11-13 03:29:46 +00:00
Zachary Turner 7a120c8b3d Change IOHandlerConfirm to use StringRefs.
llvm-svn: 286743
2016-11-13 03:05:58 +00:00
Zachary Turner 988968394d Change some more CommandObject functions to StringRef.
llvm-svn: 286742
2016-11-13 02:50:32 +00:00
Zachary Turner e0038717b9 Change ArgumentHelpCallbackFunction to return a StringRef.
llvm-svn: 286740
2016-11-13 02:08:22 +00:00