Commit Graph

19074 Commits

Author SHA1 Message Date
Adrian Prantl ac093d61c4 Fix a double-overrelease in the TestDataFormatterObjC test program.
llvm-svn: 356160
2019-03-14 15:58:21 +00:00
Adrian Prantl 23b37bf362 Make sure that a sanitizer LLDB's environment doesn't get passed on
to test binaries.

llvm-svn: 356113
2019-03-14 00:46:15 +00:00
Jorge Gorbe Moya d383a342aa [lldb-vscode] Don't try to launch an invalid program.
If an invalid program is specified, lldb-vscode will send back a
response with "success" = false, but then will continue executing the
rest of request_launch(), try to launch the program anyway and try to
send another response (possibly using the `response` object after it was
moved).

This change adds a return statement so we stop executing the handler
after producing the first failing response.

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

llvm-svn: 356110
2019-03-13 23:50:35 +00:00
Jason Molenda 97866d74db Reorder the operations in
DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule a
bit so that we only read the binaries out of memory once we've
determined that we can find a real binary on the local system.  

Previously, lldb would read all of the kext binaries out of memory
and then determine if it had the local copy.  The kext table gives
us most the information we need (address, name, uuid) so lldb only
needs the actual in-memory load commands when it comes time to set
the section load addresses.  Delay reading until that point for all
the kexts.

NFC; doing the operations in a different order.


<rdar://problem/41181173> 

llvm-svn: 356108
2019-03-13 23:34:20 +00:00
Davide Italiano 9e75a08409 [Python] Fix TestDataFormatterSmartArray to work across python versions.
Python 3 default encoding is utf-8, so taking random bytes and
interpreting them as a string might result in invalid unicode sequences.
As the only thing we care about here is that the formatter shows the
elements of the underyling array, relax the string matching (this is
good enough as all the elements are distinct so they resolve to different
strings).

llvm-svn: 356096
2019-03-13 20:04:34 +00:00
Adrian Prantl 7e34d78da1 Fix an invalid static cast in ClangExpressionParser.cpp
This was found by the green dragon sanitizer bot.

rdar://problem/48536644

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

llvm-svn: 356090
2019-03-13 19:46:30 +00:00
Alex Langford be9f3b636e [ExpressionParser] Restore removed intance of FileSystem::Resolve while resolving clang resource dir
I committed a change that removed this line, but I meant to restore it
befor committing.

llvm-svn: 356079
2019-03-13 18:51:22 +00:00
Jason Molenda 6a5fa552c7 Update.
llvm-svn: 356073
2019-03-13 18:24:42 +00:00
Stella Stamenova 823d9f3cdf [lldbsuite] Un-xfail TestPyObjSynthProvider on Windows
One of Davide's changes yesterday fixed the behavior on Windows, so the test is now passing.

llvm-svn: 356065
2019-03-13 16:53:53 +00:00
Adrian Prantl 81d03f3a8f Make sure FileSystem::Resolve preserves the path/file distinction.
This should finally fix TestPaths.py.

llvm-svn: 356057
2019-03-13 15:54:18 +00:00
Pavel Labath 01b595c0cb Fix/unify SBType comparison
Summary:
In my next step at cleaning up modify-python-lldb.py, I started focusing
on equality comparison. To my surprise, I found out that both python and
c++ versions of the SBType class implement equality comparison, but each
one does it differently. While the python version was implemented in
terms of type name equality, the C++ one used a deep comparison on the
underlying objects.

Removing the python version caused one test to fail (TestTypeList). This
happened because the c++ version of operator== boiled down to
TypePair::operator==, which contains two items: the compiler_type and
type_sp. In this case, the compiler_type was identical, but one of the
objects had the type_sp field unset.

I tried fixing the code so that both objects keep their type_sp member,
but it wasn't easy, because there are so many operations which just work
with the CompilerType types, and so any operation on the SBType (the
test in question was doing GetPointeeType on the type of one variable
and expecting it to match the type of another variable), cause that
second member to be lost.

So instead, here I relax the equality comparison on the TypePair
class. Now, this class ignores the type_sp for the purposes of
comparison, and uses the CompilerType only. This seems reasonable, as
each TypeSP is able to convert itself to a CompilerType.

Reviewers: clayborg, aprantl, serge-sans-paille

Subscribers: jdoerfert, lldb-commits

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

llvm-svn: 356048
2019-03-13 13:45:14 +00:00
Davide Italiano 0b29af0f7c [TestBatchMode] We already log this output to a file.
llvm-svn: 356003
2019-03-13 02:47:51 +00:00
Davide Italiano cd49351212 [testsuite] Remove other traces broken in python 3.
They can be reinstated in case somebody needs to debug
this test in the future.

llvm-svn: 356002
2019-03-13 02:44:32 +00:00
Davide Italiano 796aa0e49a [testsuite] Remove dead code in TestFormats.
llvm-svn: 356000
2019-03-13 01:26:01 +00:00
Davide Italiano a85f662ada [test] Some unicode sequences can't be printed, and Py 3 is more picky.
Given this was under trace, it can just be removed. If somebody
ever needs to debug this testcase again and print the data, they
can add a new statement.

llvm-svn: 355999
2019-03-13 00:48:32 +00:00
Davide Italiano ca715b6ea0 [Python] Fix another batch of python 2/python 3 portability issues.
llvm-svn: 355998
2019-03-13 00:48:29 +00:00
Adrian Prantl 22c660cc13 Update the macOS implementation of ComputeClangResourceDirectory to
comply with the more pedantic TestPaths.py

llvm-svn: 355994
2019-03-12 23:59:02 +00:00
Jim Ingham e62366bf1e This test is failing on and off on the bots.
Disable it for now till I can figure out what's going wrong.

llvm-svn: 355992
2019-03-12 23:15:48 +00:00
Adrian Prantl 97f51c95db Fix the broken Batch test by passing a custom module cache to the inferior lldb.
llvm-svn: 355991
2019-03-12 22:20:29 +00:00
Adrian Prantl df85147707 Revert "Temporarily add more logging to TestBatchMode"
llvm-svn: 355990
2019-03-12 22:20:26 +00:00
Jason Liu a03ae73c29 Add XCOFF triple object format type for AIX
This patch adds an XCOFF triple object format type into LLVM.
This XCOFF triple object file type will be used later by object file and assembly generation for the AIX platform.

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

llvm-svn: 355989
2019-03-12 22:01:10 +00:00
Adrian Prantl 8ef3da494c Temporarily add more logging to TestBatchMode
llvm-svn: 355986
2019-03-12 21:30:50 +00:00
Adrian Prantl 3552b86cbc Add more logging to ClangModulesDeclVendor.cpp
llvm-svn: 355985
2019-03-12 21:30:47 +00:00
Zachary Turner 7e44a8440c Remove support for DWARF64.
LLVM doesn't produce DWARF64, and neither does GCC.  LLDB's support
for DWARF64 is only partial, and if enabled appears to also not work.
Finally, it's untested.  Removing this makes merging LLVM and
LLDB's DWARF parsing implementations simpler.

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

llvm-svn: 355975
2019-03-12 20:51:05 +00:00
Zachary Turner 0eaa6d5b01 Remove DWARFDIECollection.
This is a very thin wrapper over a std::vector<DWARFDIE> and does
not seem to provide any real value over just using a container
directly.

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

llvm-svn: 355974
2019-03-12 20:50:46 +00:00
Zachary Turner d5364dfa6d Move ElaboratingDIEIterator into implementation file.
This is not used outside of the private implementation of the class,
so hiding in the implementation file is a nice way of simplifying
the external interface.

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

llvm-svn: 355973
2019-03-12 20:50:29 +00:00
Davide Italiano 4be269e604 [lldb/thirdparty] Remove unneeded files, asked by Jonas.
llvm-svn: 355969
2019-03-12 20:41:36 +00:00
Davide Italiano 2bd995b7e8 [lldb-mi] Make this test more reliable. NFC.
Except that it will probably stop failing on and off on my machine.

llvm-svn: 355968
2019-03-12 20:41:29 +00:00
Davide Italiano 205fd03a27 [third-party] Update pexpect to 4.6.
Reviewers: labath, jdevlieghere

Subscribers: lldb-commits

Tags: #llvm

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

llvm-svn: 355967
2019-03-12 20:41:24 +00:00
Jonas Devlieghere a54d580350 Fix compiler warning
Fixes warning: comparison of integers of different signs.

llvm-svn: 355963
2019-03-12 20:24:13 +00:00
Jason Molenda c02b95e4f9 Rework how lldb warngs about kexts that failed to load in a
darwin kernel debug session.

Originally, the kext name & uuid were emitted in the middle of the
kext-loading period's.  Last week I decided to try not printing
any details about kexts that failed to load, only printing a summary
of how many failed to load.  

This time I'm print different progress characters depending on whether
the kext loaded or not ("-" for not), then at the end I will print a 
summary of how many kexts failed to load and a sorted list of the
kexts with the bundle ID and the uuid.  It's a lot more readable.

<rdar://problem/48654569> 

llvm-svn: 355958
2019-03-12 19:42:34 +00:00
Jim Ingham 027bf7603f Check the result of creating a node from __next_ in the std::list formatter.
There's a single report of a crash coming from this current_sp being NULL.  I don't
have a repro case, and I couldn't get it to happen by hand-corrupting a list.  We
always get an error instead.  So I don't have a test case.  But checking for null
is clearly right here.

<rdar://problem/48503320>

llvm-svn: 355957
2019-03-12 19:27:39 +00:00
Jim Ingham 2ca0ebf6b4 Re-enable this test, the underlying bug was fixed and the test now passes.
llvm-svn: 355956
2019-03-12 19:25:29 +00:00
Jim Ingham 85c2955f45 Fix the project for r355939 (ASTUtils.{h,c})
llvm-svn: 355951
2019-03-12 18:48:58 +00:00
Adrian McCarthy 38d4a6c496 Correcting some comments in PdbIndex.cpp [NFC]
ICF can cause multiple symbols to start at the same virtual address.
I plan to handle this shortly, but I wanted to correct the comment for
now.

Deleted an obsolete comment about adjusting the offset for the magic
number at the beginning of the debug info stream.  This adjustment is
handled at a lower level now.

llvm-svn: 355943
2019-03-12 17:40:51 +00:00
Jonas Devlieghere 209e3a1486 [Reproducers] Add a test to ensure we can reuse the reproducer dir.
Yesterday I noticed a reproducer test failing after making a local
change. Removing the reproducer directory solved the issue. Add a test
case that detects this.

llvm-svn: 355941
2019-03-12 17:31:04 +00:00
Jonas Devlieghere 5650eb5b00 [Reproducers] Stop recording instead of deallocating
The command interpreter holds a pointer to a DataRecorder. After
generating the reproducer, we deallocated all the DataRecorders, causing
the command interpreter to hold a non-null reference to an invalid
object.

This patch changes the behavior of the command provider to stop the
DataRecorders when a reproducer is generated, rather than deallocating
them.

llvm-svn: 355940
2019-03-12 17:10:28 +00:00
Raphael Isemann 6c0bbfc0c9 Add ability to import std module into expression parser to improve C++ debugging
Summary:
This patch is the MVP version of importing the std module into the expression parser to improve C++ debugging.

What happens in this patch is that we inject a `@import std` into our expression source code. We also
modify our internal Clang instance for parsing this expression to work with modules and debug info
at the same time (which is the main change in terms of LOC). We implicitly build the `std` module on the first use. The
C++ include paths for building are extracted from the debug info, which means that this currently only
works if the program is compiled with `-glldb -fmodules` and uses the std module. The C include paths
are currently specified by LLDB.

I enabled the tests currently only for libc++ and Linux because I could test this locally. I'll enable the tests
for other platforms once this has landed and doesn't break any bots (and I implemented the platform-specific
C include paths for them).

With this patch we can now:
* Build a libc++ as a module and import it into the expression parser.
* Read from the module while also referencing declarations from the debug info. E.g. `std::abs(local_variable)`.

What doesn't work (yet):
* Merging debug info and C++ module declarations. E.g. `std::vector<CustomClass>` doesn't work.
* Pretty much anything that involves the ASTImporter and templated code. As the ASTImporter is used for saving the result declaration, this means that we can't
call yet any function that returns a non-trivial type.
* Use libstdc++ for this, as it requires multiple include paths and Clang only emits one include path per module. Also libstdc++ doesn't support Clang modules without patches.

Reviewers: aprantl, jingham, shafik, friss, davide, serge-sans-paille

Reviewed By: aprantl

Subscribers: labath, mgorny, abidh, jdoerfert, lldb-commits

Tags: #c_modules_in_lldb, #lldb

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

llvm-svn: 355939
2019-03-12 17:09:33 +00:00
Jonas Devlieghere 13ecae2f9a [Reproducers] Support capturing a reproducer without an explicit path.
Tablegen doesn't support options that are both flags and take values as
an argument. I noticed this when doing the tablegen rewrite, but forgot
that that affected the reproducer --capture flag.

This patch makes --capture a flag and adds --capture-path to specify a
path for the reproducer. In reality I expect this to be mostly used for
testing, but it could be useful nonetheless.

Differential revision: https://reviews.llvm.org/D59238

llvm-svn: 355936
2019-03-12 16:44:18 +00:00
Stefan Granitz 02e88490c1 Revert "[CMake] Avoid clang-tablegen-targets dependency when building sphinx docs (experimental)"
This reverts commit 511066858d.
This turned out unnecessary to fix the bot.

llvm-svn: 355931
2019-03-12 15:54:35 +00:00
Raphael Isemann a946997c24 Correctly look up declarations in inline namespaces
Summary:
This patch marks the inline namespaces from DWARF as inline and also ensures that looking
up declarations now follows the lookup rules for inline namespaces.

Reviewers: aprantl, shafik, serge-sans-paille

Reviewed By: aprantl

Subscribers: eraman, jdoerfert, lldb-commits

Tags: #c_modules_in_lldb, #lldb

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

llvm-svn: 355897
2019-03-12 07:45:04 +00:00
Jonas Devlieghere 511066858d [CMake] Avoid clang-tablegen-targets dependency when building sphinx docs (experimental)
Proposal to fix bot
http://lab.llvm.org:8011/builders/lldb-sphinx-docs/builds/1564/steps/cmake-configure/logs/stdio

Patch by: Stefan Gränitz

Differential revision: https://reviews.llvm.org/D59232

llvm-svn: 355887
2019-03-12 00:49:10 +00:00
Nathan Lanza 0561be6ce4 Add a case in SymbolFile{Native,}PDB::TranslateLanguage for Swift
Summary: see above

Reviewers: compnerd

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

llvm-svn: 355883
2019-03-11 23:30:58 +00:00
Jonas Devlieghere 157d23f79e [Reproducers] Make ReproducerInstrumentation a textual header
The RECORD macro is context sensitive because it depends on the
LLDB_GET_INSTRUMENTATION_DATA. This updates the modulemap to mark that
header as textual.

llvm-svn: 355879
2019-03-11 23:09:09 +00:00
Alex Langford 76b081bb08 Rewrite comment to be clearer
llvm-svn: 355875
2019-03-11 22:49:36 +00:00
Jonas Devlieghere 231306bd43 [Reproducers] Reinterpret cast to void*
Apparently the log_append variant added in r355863 is considered
ambiguous. At this point I'm out of ideas so a good old reinterpret cast
will have to do. If anybody has a better idea I'd be happy to hear it.

llvm-svn: 355866
2019-03-11 21:32:20 +00:00
Jonas Devlieghere 7bc8356435 [Reproducers] Implement log_append for function pointers.
Changing the type in the DUMMY macro to void* doesn't actually fix the
build error, because the argument type is deducted from the template (as
opposed to when serializing through the instrumentation framework, where
this would matter). Instead I've added a proper instance of log_append
that takes function pointers and logs their address.

llvm-svn: 355863
2019-03-11 20:31:21 +00:00
Med Ismail Bennani 92358bcf55 Fix some comment typos.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
llvm-svn: 355861
2019-03-11 20:23:34 +00:00
Greg Clayton 0d6f681292 Fix a crasher in StackFrame::GetValueForVariableExpressionPath()
There was a crash that would happen if an IDE would ask for a child of a shared pointer via any SB API call that ends up calling StackFrame::GetValueForVariableExpressionPath(). The previous code expects an error to be set describing why the synthetic child of a type was not able to be found, but we have some synthetic child providers that weren't setting the error and returning an empty value object shared pointer. This fixes that to ensure we don't lose our debug session by crashing, fully tests GetValueForVariableExpressionPath functionality, and ensures we don't crash on GetValueForVariableExpressionPath() in the future.

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

llvm-svn: 355850
2019-03-11 18:16:20 +00:00
Adrian Prantl 5cc2790410 Makefile.rules: Upstream SDKROOT handling code for Darwin.
llvm-svn: 355843
2019-03-11 17:24:10 +00:00
Jonas Devlieghere 90819cdb1b [Reproducers] Replace callbacks with void*
Callbacks in the LLDB_RECORD_DUMMY macros were causing build failures
with the Xcode project. This patch replaces the function pointers with
void pointers so they can be logged.

llvm-svn: 355842
2019-03-11 17:17:51 +00:00
Adrian Prantl f05b42e960 Bring Doxygen comment syntax in sync with LLVM coding style.
This changes '@' prefix to '\'.

llvm-svn: 355841
2019-03-11 17:09:29 +00:00
Michal Gorny b94c24e2ac [lldb] [test] Mark more tests flakey on NetBSD
llvm-svn: 355838
2019-03-11 17:01:31 +00:00
Michal Gorny 3aa36c9a47 [lldb] [test] Mark a few tests flakey on NetBSD
llvm-svn: 355830
2019-03-11 15:46:07 +00:00
Pavel Labath 075e133a3d Attempt to fix MSVC build error after r355824
Adding parens should be enough to fix the "'operator bool': is
ambiguous or is not a member of 'lldb::SBFoo'" errors.

llvm-svn: 355827
2019-03-11 15:00:11 +00:00
Pavel Labath 7f5237bccc Add "operator bool" to SB APIs
Summary:
Our python version of the SB API has (the python equivalent of)
operator bool, but the C++ version doesn't.

This is because our python operators are added by modify-python-lldb.py,
which performs postprocessing on the swig-generated interface files.

In this patch, I add the "operator bool" to all SB classes which have an
IsValid method (which is the same logic used by modify-python-lldb.py).
This way, we make the two interfaces more constent, and it allows us to
rely on swig's automatic syntesis of python __nonzero__ methods instead
of doing manual fixups.

Reviewers: zturner, jingham, clayborg, jfb, serge-sans-paille

Subscribers: jdoerfert, lldb-commits

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

llvm-svn: 355824
2019-03-11 13:58:46 +00:00
Pavel Labath 7bfa8ea9de Fix invalid use of StringRef::data in Socket::DecodeHostAndPort
the input StringRef is not guaranteed to be null-terminated, so using
data to get the c string is wrong. Luckily, in two of the usages the
target function already accepts a StringRef so we can just drop the
data() call, and the third one is easily replaced by a stringref-aware
function.

Issue found by msan.

llvm-svn: 355817
2019-03-11 10:34:57 +00:00
Dave Lee 0affb5822f Quiet command regex instructions during batch execution
Summary:
Within .lldbinit, regex commands can be structured as a list of substitutions over
multiple lines. It's possible that this is uninentional, but it works and has
benefits.

For example:

    command regex <command-name>
    s/pat1/repl1/
    s/pat2/repl2/
    ...

I use this form of `command regex` in my `~/.lldbinit`, because it makes it
clearer to write and read compared to a single line definition, because
multiline substitutions don't need to be quoted, and are broken up one per line.

However, multiline definitions result in usage instructions being printed for
each use. The result is that every time I run `lldb`, I get a dozen or more
lines of noise. With this change, the instructions are only printed when
`command regex` is invoked interactively, or from a terminal, neither of which
are true when lldb is sourcing `~/.lldbinit`.

Reviewers: clayborg, jingham

Reviewed By: clayborg

Subscribers: jdoerfert, kastiglione, xiaobai, keith, lldb-commits

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

llvm-svn: 355793
2019-03-10 23:15:48 +00:00
Michal Gorny 369a011cee [lldb] [test] Make 2lwp_process_SIGSEGV test more portable
Fix 2lwp_process_SIGSEGV NetBSD core test to terminate inside regular
function rather than libc call, in order to get reproducible backtrace
on different platforms.

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

llvm-svn: 355786
2019-03-10 09:50:36 +00:00
Michal Gorny 377d9dc872 [lldb] [test] Adjust XFAIL list to match buildbot results
Adjust the XFAIL-ing tests to match consistent results from buildbot.
I'm going to work on differences between them and my local results
following this.

llvm-svn: 355774
2019-03-09 12:47:38 +00:00
Frederic Riss 08ae3e0f0b Actually implement the TestQueues.py workaround
The code commited in r355764 didn't do what I want as I typed GetThreadID
instead of GetQueueID. This commit contains a (hopefully) better version
of the workaround.

llvm-svn: 355766
2019-03-09 01:34:44 +00:00
Frederic Riss 65e062655e Try to workaround the TestQueues.py flakyness
This is not a fix, but if I understand enough of the issue, it should
bail out early of the test when in a situation that would result in
a failure down the road.

llvm-svn: 355764
2019-03-09 01:23:47 +00:00
Jonas Devlieghere c5bfa3dafb Break cycle lldb/Commands [3->] lldb/Expression [1->] lldb/Commands
Inspired by Zachary's mail on lldb-dev, this seemed like low hanging
fruit. This patch breaks the circular dependency between commands and
expression.

Differential revision: https://reviews.llvm.org/D59158

llvm-svn: 355762
2019-03-09 00:10:52 +00:00
Jason Molenda cee6c47a62 Add parens to force the order of operations in an expression trying
to do "databuffer + offset" so that we don't overflow the uint64_t's 
we're using for addresses when working with high addresses.

Found with clang's ubsan while doing darwin kernel debugging.

<rdar://problem/48728940> 

llvm-svn: 355761
2019-03-09 00:04:24 +00:00
Michal Gorny 942e6c7c9e [lldb] [test] Skip broken NetBSD core test
Apparently the problem is harder than anticipated.  Skip the test for
now to fix buildbots.

llvm-svn: 355750
2019-03-08 22:41:14 +00:00
Michal Gorny 7b374be946 [lldb] [test] Do not check libc function names in NetBSD core test
Fix the NetBSD core test not to verify libc function names in backtrace.
This obviously requires the same libc.so as originally used to produce
the core file, and so it is going to fail everywhere except on my
system.

llvm-svn: 355747
2019-03-08 22:32:35 +00:00
Michal Gorny c12f159788 [lldb] [Process] Add proper support for NetBSD core files with threads
Improve the support for processing NetBSD cores.  Fix reading process
identifier, thread information and associating the terminating signal
with the correct thread.

Includes test cases for single-threaded program receiving SIGSEGV,
and two dual-threaded programs: one where thread receives the signal,
and the other one when the whole process is signalled.

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

llvm-svn: 355736
2019-03-08 21:10:43 +00:00
Zachary Turner ae56ff925b Remove dependency edges from Host to Target/Core.
After recent changes, Host is now dependency-free.

llvm-svn: 355730
2019-03-08 20:56:10 +00:00
Jonas Devlieghere 0d7b0c960d [Reproducers] Add missing LLDB_RECORD_DUMMY macros
Re-ran lldb-inst on the API folder to insert missing LLDB_RECORD_DUMMY
macros.

llvm-svn: 355711
2019-03-08 19:09:27 +00:00
Jonas Devlieghere 3b0a54e138 [lldb-instr] Support LLDB_RECORD_DUMMY
Extend lldb-instr to insert LLDB_RECORD_DUMMY macros for currently
unsupported signatures (void and function pointers).

llvm-svn: 355710
2019-03-08 18:33:40 +00:00
Jonas Devlieghere 84e571ce75 [Reproducers] Add LLDB_RECORD_DUMMY
Add a macro that doesn't actually record anything but still toggles the
API boundary. Removing just the register macros for lldb::thread_t
wasn't sufficient on NetBSD because the serialization logic needed the
underlying type to be complete.

This macro should be used by functions that are currently unsupported,
as they might trip the API boundary logic. This should be easy using the
lldb-instr tool.

llvm-svn: 355709
2019-03-08 17:50:27 +00:00
Jonas Devlieghere fee5576f7c [lldb-vscode] Fix warning
I changed the variable to an unsigned to get rid of a signed and
unsigned compare without realizing the value could be negative. This
fixes the assert instead.

llvm-svn: 355708
2019-03-08 17:36:54 +00:00
Frederic Riss 7f3c16c0f3 Add more logging to TestQueues.py
The last round of logging taught us that when the test fails, lldb
is indeed aware of the thread it's failing to associate to a given
queue. Add more logging to try to figure out why the thread and the
queue do not appear related to the Queue APIs.

llvm-svn: 355706
2019-03-08 17:09:13 +00:00
Benjamin Kramer 93110c2fe4 Make function definition in header inline
Otherwise including this header from more than one place will break
linking.

llvm-svn: 355684
2019-03-08 10:43:56 +00:00
Jason Molenda 988332a54a Add ASAN llvm build directory variants to
get_llvm_bin_dirs().

llvm-svn: 355661
2019-03-08 04:18:21 +00:00
Jonas Devlieghere a9daa6a022 [Reproducers] TestImagineList.test -> TestImageList.test
And run the actual binary so we load the shared libraries.

llvm-svn: 355658
2019-03-08 00:53:57 +00:00
Jonas Devlieghere 743a27908f [Reproducers] Mark partial specialization as inline
The overload and/or template specialization are regular functions and
should be marked inline when implemented in the header. Writing the
previous commit message should've made that obvious but I was already
overthinking it. This will fix the windows bot.

llvm-svn: 355657
2019-03-08 00:24:06 +00:00
Zachary Turner 7e89b3cc17 [lldb-vscode] Report an error if an invalid program is specified.
Previously if an invalid program was specified, there was a bug
which, when we attempted to launch the program, would report that
the operation succeeded, causing LLDB to then hang while waiting
indefinitely to receive some events from the process.

After this patch, when an invalid program is specified, we immediately
return to vs code with an error message that indicates that the
program can not be found.

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

llvm-svn: 355656
2019-03-08 00:11:27 +00:00
Jonas Devlieghere 4aba7bb923 [Reproducers] Use partial template specialization instead of overload
Not sure if this is what's causing MSVC to claim the function to be
already defined elsewhere, but worth a shot.

llvm-svn: 355654
2019-03-07 23:37:46 +00:00
Jonas Devlieghere 8d359c147d Make bytes_read an unsigned
llvm-svn: 355651
2019-03-07 22:59:55 +00:00
Jonas Devlieghere 4e7301ecf2 Remove unused function
llvm-svn: 355650
2019-03-07 22:58:39 +00:00
Jonas Devlieghere 581af8b09d [SBAPI] Log from record macro
The current record macros already log the function being called. This
patch extends the macros to also log their input arguments and removes
explicit logging from the SB API.

This might degrade the amount of information in some cases (because of
smarter casts or efforts to log return values). However I think this is
outweighed by the increased coverage and consistency. Furthermore, using
the reproducer infrastructure, diagnosing bugs in the API layer should
become much easier compared to relying on log messages.

Differential revision: https://reviews.llvm.org/D59101

llvm-svn: 355649
2019-03-07 22:47:13 +00:00
Alex Langford d672e533d5 Fix TestPaths.py on windows
I committed an implementation of GetClangResourceDir on windows but
forgot to update this test. I merged the tests like I intended to, but I
realized that the test was actually failing. After looking into it, it
appears that FileSystem::Resolve was taking the path and setting
the FileSpec's Directory to "/path/to/lldb/lib/clang/" and the File to
"9.0.0" which isn't what we want. So I removed the resolve line from
DefaultComputeClangResourceDir.

llvm-svn: 355648
2019-03-07 22:37:23 +00:00
Frederic Riss 46fac9c4f2 Add logging to TestQueues.py
In an attempt to understand why the test is still failing after r355555,
add some logging.

llvm-svn: 355647
2019-03-07 22:28:01 +00:00
Frederic Riss c525b36b43 Fix TestAppleSimulatorOSType.py with Xcode 10.2
It looks like the simctl tool shipped in Xcode10.2 changed the format of
its json output.

llvm-svn: 355644
2019-03-07 22:12:03 +00:00
Davide Italiano 47a149914d [testsuite] Recommit the TestTerminal directory.
Turns out this is actually testing that editline doesn't
screw up the terminal.

llvm-svn: 355640
2019-03-07 21:33:43 +00:00
Zachary Turner 29e8754172 [lldb-vscode] Support running in server mode on Windows.
Windows can't use standard i/o system calls such as read and write
to work with sockets, it instead needs to use the specific send
and recv calls.  This complicates matters for the debug adapter,
since it needs to be able to work in both server mode where it
communicates over a socket, as well as non-server mode where it
communicates via stdin and stdout.  To abstract this out, I've
introduced a class IOStream which hides all these details and
exposes a read/write interface that does the right on each
platform.

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

llvm-svn: 355637
2019-03-07 21:23:21 +00:00
Adrian Prantl 0c72a42a8f Add an LLVM-style dump method to CompilerType for extra convenience during debugging
This change has no effect on Release (NoAsserts) builds.

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

llvm-svn: 355632
2019-03-07 20:20:02 +00:00
Alex Langford 53954b5e12 [ExpressionParser] Implement ComputeClangResourceDir for Windows
Summary: This function is useful for expression evaluation, especially when doing swift debugging on windows.

Reviewers: aprantl, labath

Reviewed By: labath

Subscribers: teemperor, jdoerfert, lldb-commits

Tags: #lldb

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

llvm-svn: 355631
2019-03-07 20:09:15 +00:00
Ali Tamur d0156256e2 [lldb] Fix DW_OP_addrx uses.
Summary: DW_OP_GNU_addr_index has been renamed as DW_OP_addrx in the standard. clang produces DW_OP_addrx tags and with this change lldb starts to process them.

Reviewers: aprantl, jingham, davide, clayborg, serge-sans-paille

Reviewed By: aprantl

Subscribers: jdoerfert, dblaikie, labath, shafik, lldb-commits

Tags: #lldb

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

llvm-svn: 355629
2019-03-07 19:41:08 +00:00
Davide Italiano 2f94dcec5a [testsuite] Spring cleaning: this tests `stty`, not `lldb`.
llvm-svn: 355615
2019-03-07 18:05:18 +00:00
Davide Italiano bd53e768d2 [testsuite] Drop characters that can't be decoded, restoring parity with Py2.
Tests that check the output of `memory find` may trip over
unreadable characters, and in Python 3 this is an error.

llvm-svn: 355612
2019-03-07 17:45:53 +00:00
Jan Kratochvil 8a4efd2153 Fix TestDataFormatter.test uninitialized variable
After D55626 I see a failure in my Fedora buildbot.

There is uninitialized variable as the Foo constructor has not been run and foo
is an autovariable.

(lldb) breakpoint set -f foo.cpp -l 11
Breakpoint 1: where = TestDataFormatter.test.tmp.out`main + 30 at foo.cpp:11:7, address = 0x000000000040112e
(lldb) run
Process 801065 stopped
* thread #1, name = 'TestDataFormatt', stop reason = breakpoint 1.1
    frame #0: 0x000000000040112e TestDataFormatter.test.tmp.out`main(argc=1, argv=0x00007fffffffcc48) at foo.cpp:11:7
   8   	};
   9
   10  	int main(int argc, char **argv) {
-> 11  	  Foo foo(1, 2.22);
   12  	  return 0;
   13  	}

Process 801065 launched: '.../tools/lldb/lit/Reproducer/Functionalities/Output/TestDataFormatter.test.tmp.out' (x86_64)
(lldb) frame var
(int) argc = 1
(char **) argv = 0x00007fffffffcc48
(Foo) foo = (m_i = 4198432, m_d = 0)

While the testcase expects m_i will be 0.

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

llvm-svn: 355611
2019-03-07 17:35:47 +00:00
Jonas Devlieghere 0ccc0b1a5f [Reproducers] Disable registering lldb::thread_t everywhere
As discussed on the mailing list, default serialization for thread ids
is not correct, even if they're represented as basic types. I'm
purposely leaving the corresponding record macros in place so that we
don't break the API boundary detection.

llvm-svn: 355610
2019-03-07 17:27:33 +00:00
Jan Kratochvil 67fb9b4a31 Skip TestGdbserverPort.test on Windows
lldb/cmake/modules/LLDBConfig.cmake does not build lldb-server on Windows:
if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")
    set(LLDB_CAN_USE_LLDB_SERVER 1)

Also do not append 'platform' parameter twice - although that was quietly
ignored.

llvm-svn: 355579
2019-03-07 03:41:00 +00:00
Jason Molenda a583486065 When disassembling Aarch64 target and vendor Apple, set the cpu to
"apple-latest" which llvm uses to indicate the newest supported ISA.
Add a unit test; I'm only testing an armv8.1 instruction in this
unit test which would already be disassembled correctly because we
set the disassembler to ARM v8.2 mode, but it ensures that nothing
has been broken by adding this cpu spec.

<rdar://problem/38714781> 

llvm-svn: 355578
2019-03-07 03:16:45 +00:00
Alex Langford 03df653f71 Repair the build when LLDB_DISABLE_PYTHON is set
Summary:
If LLDB_DISABLE_PYTHON is set, some functions are unavailable but
SBReproducer assumes they are. Let's conditionally register those functions
since they are conditionally declared.

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

llvm-svn: 355575
2019-03-07 01:02:55 +00:00
Adrian Prantl db5a779f2f Avoid using -S in combination with "script"; it's unreliable.
llvm-svn: 355573
2019-03-07 00:46:56 +00:00
Adrian Prantl f4d2fa3fa0 crashlog.py: Catch exception from subprocess.
llvm-svn: 355572
2019-03-07 00:41:51 +00:00
Adrian Prantl 59a94225c9 Relax testcase.
Recent versions of llvm monorepo builds build libc++abi.dylib as libc++abi.1.dylib.
This accespts both variants.

llvm-svn: 355571
2019-03-07 00:34:13 +00:00
Jonas Devlieghere ae5d62585e [Reproducers] Add tests for different types of functionality
This patch adds test that check that functionality in lldb continues to
work when replaying a reproducer.

 - Entries in image list are identical.
 - That stepping behaves the same.
 - That the data formatters behave the same.

Differential revision: https://reviews.llvm.org/D55626

llvm-svn: 355570
2019-03-07 00:24:44 +00:00
Adrian Prantl 28f7466f4e Promote more debug-only assertions to regular assertions.
llvm-svn: 355569
2019-03-07 00:14:20 +00:00
Adrian Prantl 1dfba3cfba Promote more debug-only assertions to regular assertions.
llvm-svn: 355568
2019-03-07 00:10:11 +00:00
Davide Italiano 9a8e777f8c [Python] Unbreak the recently modified tests for python 2.
llvm-svn: 355566
2019-03-06 23:50:36 +00:00
Jason Molenda 2d6e6cbacc Remove the warning in
DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule
which would list every kext that failed to load when doing kernel
debugging.  Instead, in DynamicLoaderDarwinKernel::ParseKextSummaries,
print a summary of how many kexts lldb was unable to load at the end.

I want to reduce the amount of output at the start of kernel debug
sessions a bit; we'll see if anyone really wanted to see the list of
which kexts specifically were unable to be loaded.

No functional change, only changing lldb's output at the start of
a kernel debug session.

<rdar://problem/48654569> 

llvm-svn: 355565
2019-03-06 23:47:52 +00:00
Davide Italiano a658ab9f55 [testsuite] Port crashlog to python 3, second attempt.
llvm-svn: 355562
2019-03-06 22:54:11 +00:00
Jim Ingham 798174455f Fix Cmake files for ExpressionSourceCode.cpp -> ClangExpressionSourceCode.cpp.
llvm-svn: 355561
2019-03-06 22:53:38 +00:00
Jim Ingham ea401ec7f4 Factor the clang specific parts of ExpressionSourceCode.{h,cpp} into the clang plugin.
NFC

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

llvm-svn: 355560
2019-03-06 22:43:25 +00:00
Zachary Turner 2157f57d2d Pass /bigobj for SBReproducer.cpp with MSVC
/BIGOBJ is used to bypass certain COFF file format
limitations and is used with, unsurprisingly, very big
object files.  This file has grown large enough that it
needs this flag in order to compile successfully.

llvm-svn: 355559
2019-03-06 22:42:34 +00:00
Zachary Turner 3229000f63 [lldb-vscode] Correctly propagate errors back to VS Code.
llvm-svn: 355557
2019-03-06 22:30:06 +00:00
Frederic Riss fcda044d22 [debugserver] Fix IsUserReady thread filtering
Summary:
In 2010 (r118866), filtering code was added to debugserver to avoid reporting threads
that were "not ready to be displayed to the user". This code inspects the thread's
state and discards threads marked 'uninterruptible'. Turns out, this state is pretty
common and not only a characterisitic of 'user-readiness'. This filtering was tracked
down as the source of the flakiness of TestQueues and TestConcurrent* with the symptom
of missing threads.

We discussed with the kernel team and there should be no need for us to filter the
restult of task_threads(). Everything that is returned from there can be examined.
So I went on and tried to remove the filtering completely. This produces other test
failures, where we were reporting more theads than expected. Always threads that had
been terminated, but weren't removed from the task bookkeeping structures yet. Those
threads always had a PC of 0.

This patch changes the heuristic to make the filtering a little less strict and only
rejects threads that are 'uninteruptible' *and* have a PC of 0. This has proven to be
solid in my testing.

Reviewers: jasonmolenda, clayborg, jingham

Subscribers: jdoerfert, lldb-commits

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

llvm-svn: 355555
2019-03-06 21:56:14 +00:00
Jan Kratochvil 94b1ff72f5 Sanity check --max-gdbserver-port
In mail
	[lldb-dev] Remote debugging a docker process
	https://lists.llvm.org/pipermail/lldb-dev/2019-March/014795.html
user was confused by --min-gdbserver-port and --max-gdbserver-port options
being ignored. I think there is even a bug that --max-gdbserver-port is upper
exclusive limit (and not upper inclusive limit appropriate for max).

At least this patch should catch such mistake by an error message. The question
is whether --max-gdbserver-port should not be changed to really be max and not
max+1 but that would break backward compatibility.

Now the mail example does produce:
	error: --min-gdbserver-port (5001) is not lower than --max-gdbserver-port (5001)

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

llvm-svn: 355554
2019-03-06 21:52:19 +00:00
Adrian Prantl 0e4c482124 Pass ConstString by value (NFC)
My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.

ConstString has exactly one const char * data member, so passing a
ConstString by reference is not any more efficient than copying it by
value. In both cases a single pointer is passed. But passing it by
value makes it harder to accidentally return the address of a local
object.

(This fixes rdar://problem/48640859 for the Apple folks)

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

llvm-svn: 355553
2019-03-06 21:22:25 +00:00
Raphael Isemann a4a167fb75 Remove redundant second os.path.join call [NFC]
llvm-svn: 355548
2019-03-06 20:51:28 +00:00
Zachary Turner 8f7cfecfbf Try again to fix OSX compilation failure.
llvm-svn: 355536
2019-03-06 19:14:41 +00:00
Zachary Turner a313ec11fc Try to fix OSX compilation failure.
llvm-svn: 355531
2019-03-06 18:44:27 +00:00
Zachary Turner a89ce43cec Resubmit "Don't include UnixSignals.h from Host."
This was reverted because it breaks the GreenDragon bot, but
the reason for the breakage is lost, so I'm resubmitting this
now so we can find out what the problem is.

llvm-svn: 355528
2019-03-06 18:20:23 +00:00
Greg Clayton 6795eb3884 Fix core files for 32 bit architectures that are supported in ProcessELFCore.cpp
Core files need to know the size of the PRSTATUS header so that we can grab the register values that follow it. The code that figure out this size was using a hard coded list of architecture cores instead of relying on 32 or 64 bit for most cores.

The fix here fixes core files for 32 bit ARM. Prior to this the PRSTATUS header size was being returned as zero and the register values were being taken from the first bytes of the PRSTATUS struct (signo, etc).

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

llvm-svn: 355526
2019-03-06 18:04:10 +00:00
Shafik Yaghmour 641d0b8cee Adding test to cover the correct import of SourceLocation pertaining to a built-in during expression parsing
Summary: This tests a fix in the ASTImpoter.cpp to ensure that we import built-in correctly,
see differential: https://reviews.llvm.org/D58743
Once this change is merged this test should pass and should catch regressions in this feature.

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

llvm-svn: 355525
2019-03-06 18:03:54 +00:00
Tatyana Krasnukha 1b6700eff4 Re-apply "Fix embedded Python initialization according to changes in version 3.7"
llvm-svn: 355523
2019-03-06 17:27:40 +00:00
Jonas Devlieghere 584f3a6d38 [Reproducers] Guard register macros that take lldb::thread_t on Windows
On Windows, lldb::thread_t is just a void*, so the we will try to
allocate an object of type void when deserializing. Undef this for now
until we support void* arguments.

llvm-svn: 355519
2019-03-06 16:42:33 +00:00
Jonas Devlieghere 9ebe71a4e1 [Reproducers] Don't use VLA in SBReproducer redirect
This should unbreak the Windows bot.

llvm-svn: 355518
2019-03-06 16:33:48 +00:00
Michal Gorny 2508fcff60 [lldb] [lit] Attempt to fix regex in toolchain-clang.test
llvm-svn: 355510
2019-03-06 14:49:48 +00:00
Pavel Labath b8093314ef Move RangeMap.h into Utility
Summary:
This file implements some general purpose data structures, and so it
belongs to the Utility module.

Reviewers: zturner, jingham, JDevlieghere, clayborg, espindola

Subscribers: emaste, mgorny, javed.absar, arichardson, MaskRay, lldb-commits

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

llvm-svn: 355509
2019-03-06 14:41:43 +00:00
Michal Gorny a2cc148f9f [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD
Pass appropriate -L and -Wl,-rpath flags pointing out to the LLVM
library directory on NetBSD.  This is necessary since clang on NetBSD
requires libc++ but it is not installed as part of the system
by default.  For the purpose of running buildbot, we want LLDB to use
just-built libc++.

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

llvm-svn: 355502
2019-03-06 14:03:18 +00:00
Jason Molenda 4cc9ff1245 Change the scanning algorithm in DynamicLoaderDarwinKernel::SearchForKernelNearPC.
Currently when lldb might be doing a kernel debug session, it scans through
memory by taking the current pc value and looking for a kernel at megabyte
boundaries, up to 32MB behind $pc.  This adjusts the algorithm to
scan back at every 16k page boundary and to stop scanning as soon
as we hit a memory read error.  The addition of stopping at a memory read
error saves us from tons of unnecessary packet traffic on generic 
targets where lldb might look for a kernel binary.

I've been trying to think of how to construct a test for this; it's a bit
tricky.  A gdb-remote protocol test with the contents of a fake tiny kernel
mach-o binary would satisify part of it, but this kernel path also directly
calls over to dsymForUUID or DebugSymbols framework lookups to find the 
kernel binary as well.  I'll keep thinking about this one, but it's so
intertangled with these two external systems that it may be hard to do.

<rdar://problem/48578197> 

llvm-svn: 355476
2019-03-06 02:45:27 +00:00
Jason Molenda b459f182e8 Re-commit logging for SBCompileUnit::GetNumLineEntries.
llvm-svn: 355473
2019-03-06 02:32:45 +00:00
Alex Langford a4223f9e5f [ExpressionParser] Fix ComputeClangResourceDirectory for windows
The function signature of ComputeClangResourceDirectory for windows
wasn't updated when the others changed, causing the windows build to
fail. This should fix that.

llvm-svn: 355471
2019-03-06 01:57:04 +00:00
Jonas Devlieghere 2e3e65fb62 [Reproducers] Enable replay from SBRepro.
Now that the LLDB instrumentation macros are in place, we should use
that to test reproducer replay.

Differential revision: https://reviews.llvm.org/D58565

llvm-svn: 355470
2019-03-06 01:49:57 +00:00
Jonas Devlieghere 7e23df4437 [Reproducers] Don't intercept SBDebugger::SetInputFileHandle
With the reproducer logic in place for the command interpreter we no
longer need to make SBDebugger::SetInputFileHandle a no-op.

llvm-svn: 355469
2019-03-06 01:49:54 +00:00
Adrian Prantl 61f1b70a78 Replace debug-only assert with a plain old assert.
llvm-svn: 355466
2019-03-06 01:07:45 +00:00
Jonas Devlieghere 3c28c0b2aa [Reproducers] Undef LLDB_REPRO_INSTR_TRACE
Forgot to undef this before landing.

llvm-svn: 355465
2019-03-06 01:00:36 +00:00
Jonas Devlieghere 504be84c9f [Reproducers] Fix warnings without asserts
Make sure the variable is used when asserts are compiled out.

llvm-svn: 355464
2019-03-06 00:52:48 +00:00
Alex Langford 787fe33434 [ExpressionParser] Test GetClangResourceDir
Summary:
I'm doing this because I plan on implementing `ComputeClangResourceDirectory`
on windows so that `GetClangResourceDir` will work.  Additionally, I made
test_paths make sure that the directory member of the returned FileSpec is not
none. This will fail on windows since `ComputeClangResourceDirectory` isn't
implemented yet.

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

llvm-svn: 355463
2019-03-06 00:45:16 +00:00
Jonas Devlieghere baf5664f50 [Reproducers] Add SBReproducer macros
This patch adds the SBReproducer macros needed to capture and reply the
corresponding calls. This patch was generated by running the lldb-instr
tool on the API source files.

Differential revision: https://reviews.llvm.org/D57475

llvm-svn: 355459
2019-03-06 00:06:00 +00:00
Jonas Devlieghere bd4bf82a48 [SBAPI] Don't check IsValid in constructor
When running the test suite with the instrumentation macros, I noticed
two lldb-mi tests regressed. The issue was the copy constructor of
SBLineEntry. Without the macros the returned value would be elided, but
with the macros the copy constructor was called. The latter using ::IsValid
to determine whether the underlying opaque pointer should be set. This
is likely a remnant of when ::IsValid would only check the validity of the
smart pointer. In SBLineEntry however, it actually forwards to
LineEntry::IsValid().

So what happened here was that because of the macros the copy
constructor was called. The opaque pointer was valid but the LineEntry
didn't consider itself valid. So the copied-to object ended up default
initialized.

This patch replaces all checks for IsValid in copy (assignment)
constructors with checks for the opaque pointer itself.

Differential revision: https://reviews.llvm.org/D58946

llvm-svn: 355458
2019-03-06 00:05:55 +00:00
Adrian Prantl d823020bac Remove tautological #ifdefs (NFC)
Differential Revision: https://reviews.llvm.org/D58838

llvm-svn: 355457
2019-03-05 23:51:25 +00:00
Jason Molenda f228b2c2ef Revert logging addition to SBCompileUnit::GetNumLineEntries,
causing lldb-mi testsuite failures?  

llvm-svn: 355449
2019-03-05 22:17:47 +00:00
Stella Stamenova 2717b76c1a [lit, windows] Disable stop-hook-threads on Windows
This test is also no longer reliably failing or passing on Windows and it is hanging every few runs.

llvm-svn: 355448
2019-03-05 21:43:04 +00:00
Stella Stamenova d15f3b188b [lldbsuite, windows] Skip the TestEvents tests on Windows
These tests are flakey on Windows and recently they have started failing AND also hanging the whole suite when they fail.

llvm-svn: 355443
2019-03-05 21:03:36 +00:00
Jason Molenda 14c1e08ff5 Add logging to SBCompileUnit::GetNumLineEntries.
llvm-svn: 355435
2019-03-05 19:43:56 +00:00
Shafik Yaghmour bb322e79c1 [DataFormatters] Fix regression in libc++ std::atomic formatter caused by https://reviews.llvm.org/D56913
rdar://problem/48568543

llvm-svn: 355422
2019-03-05 18:34:35 +00:00
Davide Italiano 70b082e85c Revert "[lldbtest] Check against the correct name for libcxxabi (macOS)."
This passes locally but breaks on the bots. Maybe an SDK difference.
Reverting while I investigate.

llvm-svn: 355415
2019-03-05 17:21:55 +00:00
Yury Delendik 05812b65db [lldb] Disable some of TestJITLoaderGDB.py tests on Windows
The test expect sample executable code be built, but fails on Windows.

Review comment https://reviews.llvm.org/D57689#1418597

Tags: #lldb

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

llvm-svn: 355413
2019-03-05 17:09:26 +00:00
Tatyana Krasnukha 622862987f Revert "Fix embedded Python initialization according to changes in version 3.7"
Testsuite hangs on Windows likely due to these changes.

llvm-svn: 355406
2019-03-05 15:27:33 +00:00
Yury Delendik bc6b225d42 Adds property to force enabling of GDB JIT loader for MacOS
Summary:
Based on https://gist.github.com/thlorenz/30bf0a3f67b1d97b2945#patching-and-rebuilding

The functionality was disabled at 521c2278ab

Reviewers: jingham

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 355402
2019-03-05 14:23:53 +00:00
Pavel Labath a55999301e One more UserIDResolver fix
The intention in r355323 has been to implement a no-op resolver in the
HostInfoBase class, which will then be shadowed a an implementation in
the HostInfoPosix class. However, I add the shadowing declaration in
HostInfoPosix.h, and instead had implemented the HostInfoBase function
in HostInfoPosix.cpp. This has lead to undefined symbols on windows, and
a subsequent implementation of a no-op resolver in HostInfoWindows
(r355329).

Since now there is no point on having a no-op resolver in the base
class, I just remove the base declaration altogether, and have
HostInfoPosix implement the (newly-declared) HostInfoPosix version of
that function.

llvm-svn: 355398
2019-03-05 12:51:20 +00:00
Alexander Kornienko 7523f743b4 [lldb] Fix linux host build after r355342
llvm-svn: 355392
2019-03-05 12:05:35 +00:00
Tatyana Krasnukha b30c1d571b Fix embedded Python initialization according to changes in version 3.7
Differential Revision: https://reviews.llvm.org/D58833

llvm-svn: 355388
2019-03-05 11:18:45 +00:00
Alex Langford 81dbc02671 [Expression] Remove unused parameter from Evaluate
llvm-svn: 355375
2019-03-05 03:33:34 +00:00