Commit Graph

20353 Commits

Author SHA1 Message Date
David Carlier c190890c29 [LLDB] FreeBSD fix new SetFile call.
llvm-svn: 371491
2019-09-10 07:33:39 +00:00
Jonas Devlieghere e0ea8d87eb [Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit`
This removes the CleanUp class and replaces its usages with llvm's
ScopeExit, which has similar semantics.

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

llvm-svn: 371474
2019-09-10 00:20:50 +00:00
Alex Langford 1dbee8f043 [Expression] Remove unused header from LLVMUserExpression
llvm-svn: 371472
2019-09-09 23:59:54 +00:00
Alex Langford 9e86561878 [Symbol] Give ClangASTContext a PersistentExpressionState instead of a ClangPersistentVariables
ClangASTContext doesn't use m_persistent_variables in a way specific to
ClangPersistentVariables. Therefore, it should hold a unique pointer to
PersistentExpressionState instead of a ClangPersistentVariablesUP.
This also prevents you from pulling in a plugin header when including
ClangASTContext.h

Doing this exposed an implicit dependency in ObjCLanguage that was
corrected by including ClangModulesDeclVendor.h

llvm-svn: 371470
2019-09-09 23:11:43 +00:00
Jonas Devlieghere e0bce4e1c2 Revert "[Reproducer] Add a `cont` to ModuleCXX.test"
This should no longer be necessary after r371459.

llvm-svn: 371460
2019-09-09 22:07:45 +00:00
Jonas Devlieghere 9b961cc604 [Reproducer] Disconnect when the replay server is out of packets.
This is a fix for the issue described in r371144.

> On more than one occasion I've found this test got stuck during replay
> while waiting for a packet from debugserver when the debugger was in
> the process of being destroyed.

When the replay server is out of packets we should just disconnect so
the debugger doesn't have to do any cleanup that it wouldn't do during
capture.

llvm-svn: 371459
2019-09-09 22:05:48 +00:00
Greg Clayton 4f68c226a5 Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz
Prior to this fix, ELF files might contain PT_LOAD program headers that had a valid p_vaddr, and a valid file p_offset, but the p_filesz would be zero. For example in llvm-project/lldb/test/testcases/functionalities/postmortem/elf-core/thread_crash/linux-i386.core we see:

Program Headers:
Index   p_type           p_flags    p_offset           p_vaddr            p_paddr            p_filesz           p_memsz            p_align
======= ---------------- ---------- ------------------ ------------------ ------------------ ------------------ ------------------ ------------------
[    0] PT_NOTE          0x00000000 0x0000000000000474 0x0000000000000000 0x0000000000000000 0x0000000000001940 0x0000000000000000 0x0000000000000000
[    1] PT_LOAD          0x00000005 0x0000000000002000 0x0000000008048000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
[    2] PT_LOAD          0x00000004 0x0000000000002000 0x000000000804b000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[    3] PT_LOAD          0x00000006 0x0000000000002000 0x000000000804c000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[    4] PT_LOAD          0x00000006 0x0000000000002000 0x0000000009036000 0x0000000000000000 0x0000000000000000 0x0000000000025000 0x0000000000001000
[    5] PT_LOAD          0x00000000 0x0000000000002000 0x00000000f63a1000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[    6] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f63a2000 0x0000000000000000 0x0000000000000000 0x0000000000800000 0x0000000000001000
[    7] PT_LOAD          0x00000000 0x0000000000002000 0x00000000f6ba2000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[    8] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f6ba3000 0x0000000000000000 0x0000000000000000 0x0000000000804000 0x0000000000001000
[    9] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f73a7000 0x0000000000000000 0x0000000000000000 0x00000000001b1000 0x0000000000001000
[   10] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7558000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
[   11] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f755a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   12] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f755b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
[   13] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f755e000 0x0000000000000000 0x0000000000000000 0x0000000000019000 0x0000000000001000
[   14] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7577000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   15] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f7578000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   16] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f7579000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
[   17] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f757b000 0x0000000000000000 0x0000000000000000 0x000000000001c000 0x0000000000001000
[   18] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7597000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   19] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f7598000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   20] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f7599000 0x0000000000000000 0x0000000000000000 0x0000000000053000 0x0000000000001000
[   21] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f75ec000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   22] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f75ed000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   23] PT_LOAD          0x00000005 0x0000000000002000 0x00000000f75ee000 0x0000000000000000 0x0000000000000000 0x0000000000176000 0x0000000000001000
[   24] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f7764000 0x0000000000000000 0x0000000000000000 0x0000000000006000 0x0000000000001000
[   25] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f776a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   26] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f776b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
[   27] PT_LOAD          0x00000006 0x0000000000002000 0x00000000f778a000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
[   28] PT_LOAD          0x00000004 0x0000000000002000 0x00000000f778c000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000
[   29] PT_LOAD          0x00000005 0x0000000000004000 0x00000000f778e000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000
[   30] PT_LOAD          0x00000005 0x0000000000006000 0x00000000f7790000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000
[   31] PT_LOAD          0x00000004 0x0000000000006000 0x00000000f77b3000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   32] PT_LOAD          0x00000006 0x0000000000006000 0x00000000f77b4000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[   33] PT_LOAD          0x00000006 0x0000000000006000 0x00000000ffa25000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000
Prior to this fix if users tried to read memory from one of these addresses like 0x8048000, they would end up incorrectly reading from the next memory region that actually had a p_filesz which would be 0x00000000f778c000 in this case. This fix correctly doesn't include program headers with zero p_filesz in the ProcessELFCore::m_core_aranges that is used to read memory. I found two cores files that have this same issue and added tests.

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

llvm-svn: 371457
2019-09-09 21:45:49 +00:00
David Carlier f707dac742 LLDB - Simplify GetProgramFileSpec
Reviewers: zturner, emaste

Reviewed By: emaste

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

llvm-svn: 371417
2019-09-09 16:10:14 +00:00
Jason Molenda 5b0a687d89 Long timeouts for the MacOSX SystemRuntime plugins under ASAN; else quick.
In April via r357829, Adrian unified timeouts across lldb and set the
default value high so that we wouldn't get timeouts on ASAN bots that
were running under load.

The library that the MacOSX SystemRuntime has functions that need
to take a lock, and if that lock is held already, those functions
will never complete; we're seeing the 15 second timeout being hit
with inferiors that are doing a lot of enqueuing and dequeuing of
libdispatch work items causing this deadlocking behavior.

This patch reverts to a very short timeout for these SystemRuntime
function calls, given the behavior of this library that they are 
calling into.  When lldb is built with AddressSanitizer enabled,
they will use the default 15 second timeout.

tl;dr: this reverts to the previous timeouts for these SystemRuntime
inf func calls.

<rdar://problem/54538149> 

llvm-svn: 371280
2019-09-07 01:38:37 +00:00
Jonas Devlieghere 92ada4ab0c [test] Add a FIXME test for stop-command-source-on-error
Modifying the interpreter settings is tricky because they don't take
effect until we create a new command interpreter, which should be merely
an implementation detail. This leads to confusing and unexpected
scenarios.

This adds a test cases with FIXMEs for some of the odd scenarios I
encountered. I didn't XFAIL the test because I don't think there's a way
to get an unexpected PASS if any of the commands succeeds and splitting
up the file in multiple tests seems excessive.

llvm-svn: 371259
2019-09-06 21:43:33 +00:00
Alex Langford b482db6dfe [Core] Remove use of ClangASTContext in DumpDataExtractor
Summary:
DumpDataExtractor uses ClangASTContext in order to get the proper llvm
fltSemantics for the type it needs so that it can dump floats in a more
precise way. However, there's no reason that this behavior needs to be
specific ClangASTContext. Instead, I think it makes sense to ask
TypeSystems for the float semantics for a type of a given size.

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

llvm-svn: 371258
2019-09-06 21:05:21 +00:00
Jan Kratochvil b1dcbf1b16 [lldb] Small optimization of FormatMap::Delete and FormatMap::Get
llvm-svn: 371234
2019-09-06 17:52:27 +00:00
Serge Guelton 90d32df7db Remove call to obsolete gethostbyname, using getaddrinfo
Differential Revision: https://reviews.llvm.org/D67230

llvm-svn: 371195
2019-09-06 11:06:23 +00:00
Raphael Isemann 7841e80e79 [lldb][NFC] Remove Args::StripSpaces
This just reimplemented llvm::StringRef::[r/l]trim().

llvm-svn: 371181
2019-09-06 08:40:31 +00:00
Raphael Isemann 0d50c4e060 [lldb][NFC] Extend ArgsTest
llvm-svn: 371180
2019-09-06 08:39:53 +00:00
Raphael Isemann dd8e73ffc0 [lldb][NFC] Remove unused Args::GetArgumentQuoteCharAtIndex
llvm-svn: 371176
2019-09-06 07:54:47 +00:00
Raphael Isemann bc35ae7389 [lldb] Remove xcode bot from website listing and fix link to sanitized
llvm-svn: 371172
2019-09-06 07:11:14 +00:00
Aleksandr Urakov 6179c0eb0d [Windows] Add support of watchpoints to `ProcessWindows`
Summary:
This patch adds support of watchpoints to the old `ProcessWindows` plugin.

The `ProcessWindows` plugin uses the `RegisterContext` to set and reset
watchpoints. The `RegisterContext` has some interface to access watchpoints,
but it is very limited (e.g. it is impossible to retrieve the last triggered
watchpoint with it), that's why I have implemented a slightly different
interface in the `RegisterContextWindows`. Moreover, I have made the
`ProcessWindows` plugin responsible for search of a vacant watchpoint slot,
because watchpoints exist per-process (not per-thread), then we can place
the same watchpoint in the same slot in different threads. With this scheme
threads don't need to have their own watchpoint lists, and it simplifies
identifying of the last triggered watchpoint.

Reviewers: asmith, stella.stamenova, amccarth

Reviewed By: amccarth

Subscribers: labath, zturner, leonid.mashinskiy, abidh, JDevlieghere, lldb-commits

Tags: #lldb

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

llvm-svn: 371166
2019-09-06 05:37:03 +00:00
Jonas Devlieghere a8a816c163 [Reproducer] Add a `cont` to ModuleCXX.test
On more than one occasion I've found this test got stuck during replay
while waiting for a packet from debugserver when the debugger was in the
process of being destroyed. For some reason it's more prevalent on the
downstream Swift fork. Adding a cont mitigates the problem while I
investigate.

llvm-svn: 371144
2019-09-05 23:36:57 +00:00
Jonas Devlieghere f5687d7c12 Remove `bugreport` command
The bugreport command exists to create domain-specific bug reports.
Currently it has one implementation for filing bugs on the unwinder. As
far as we can tell, it has never been of use. Although not exactly the
same as the reproducers, it's a bit confusing to have two parallel
command trees for (kind of) the same thing.

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

llvm-svn: 371132
2019-09-05 21:43:32 +00:00
Adrian McCarthy f141de5bc9 Fix windows-x86-debug compilation with python enabled using multi-target generator
[Patch by Leonid Mashinskiy]

Visual Studio CMake generator is multi-target and does not define
CMAKE_BUILD_TYPE, so Debug build on VS was failing due selection of release
python library. This patch reverts back some of latest changes and fixes
building by raw VS using CMake expression generators.

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

llvm-svn: 371090
2019-09-05 17:22:30 +00:00
Raphael Isemann 1677301969 [lldb][NFC] Add dimensions to pexpect tests failing on sanitizer bot
I'm still unable to reproduce this locally, so let's see if this
is enough to make the bots happy. The missing dimension parameter
seems to be the biggest difference between these tests and
TestIOHandlerCompletion.py which runs just fine on the same bot,
so that's the motivation for trying this out.

llvm-svn: 371077
2019-09-05 14:51:23 +00:00
Raphael Isemann cbce3cef52 [lldb][NFC] Stabilize gui/basic test by waiting on prompt
We should wait on the GUI to exit before tearing down the test.

llvm-svn: 371028
2019-09-05 08:45:20 +00:00
Pavel Labath 35dfb2e8d7 [dotest] Remove top-level Makefile
This appears to be a really ancient  way of running the test suite. It
is also completely disfunctional now, and probably has been for a long
time.

llvm-svn: 371020
2019-09-05 07:38:55 +00:00
Pavel Labath 45e3ce8d76 [dotest] Centralize initialization commands even more
Summary:
In r367234 we introduced a central place to hold the set up commands for
the various ways we have of launching lldb. However, a number of
commands still remained outside of that.

This patch moves the remaining set up commands into this function, which
allows us to remove manual clang module path setting code in
TestBatchMode.

One unfortunate victim of this approach is TestSTTYBeforeAndAfter which,
due to how it launches lldb (pexpect->expect->lldb), fails get the
quoting right. It would be possible to fix the quoting there, it would be a bit
icky, and none of the commands in this list are really relevant for what this
test is doing, so I just remove the commands outright.

Reviewers: JDevlieghere, jankratochvil

Subscribers: lldb-commits

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

llvm-svn: 371019
2019-09-05 07:35:45 +00:00
Pavel Labath 7790858b00 Obliterate LLDB_CONFIGURATION_BUILDANDINTEGRATION
Summary:
With the XCode project gone, there doesn't seem to be anything setting
this macro anymore -- and the macro wasn't doing much anyway.

Reviewers: jingham, sgraenitz

Subscribers: emaste, lldb-commits

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

llvm-svn: 371018
2019-09-05 07:09:31 +00:00
Pavel Labath c3bea40bf7 Breakpad: Basic support for STACK WIN unwinding
Summary:
This patch makes it possible to unwind via breakpad STACK WIN records.
It is "basic" because two important features are missing:
- support for the .raSearch keyword
- support for multiple STACK WIN records within a single function
Right now, we just reject the .raSearch records, and always pick the
first record for the whole function
SymbolFileBreakpad, and so I think it can serve as a good example of
what is needed of the symbol file and unwinding machinery to make this
work.

However, it is already useful for unwinding in some situations, and it
sets up the general framework for the parsing of these kinds of records,
which reduces the size of the followup patches implementing the two
other components.

Reviewers: amccarth, rnk, markmentovai

Subscribers: lldb-commits

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

llvm-svn: 371017
2019-09-05 07:05:15 +00:00
Pavel Labath 59a1d998d9 [dotest] Delete trivial inline test makefiles
inline tests are able to generate these automatically

llvm-svn: 371015
2019-09-05 06:55:23 +00:00
Jonas Devlieghere 0910e17d52 [Disassembler] Simplify a few methods (2/2) (NFC)
Use early returns to highlight preconditions and make the code easier to
follow.

llvm-svn: 370998
2019-09-04 23:05:32 +00:00
Jonas Devlieghere 4be6706eb6 [Disassembler] Simplify a few methods (NFC)
Use early returns to highlight preconditions and make the code easier to
follow.

llvm-svn: 370994
2019-09-04 22:38:20 +00:00
Jonas Devlieghere c40449f3c5 [test] Escape path to match the literal string
This test was failing when you had things like `+` in your build path.

llvm-svn: 370983
2019-09-04 21:18:46 +00:00
Jonas Devlieghere 85d6edb265 Revert "[test] Address TestConcurrentMany*.py flakiness on macOS"
This reverts my change to pseudo_barrier.h which isn't necessary anymore
after Fred's fix to debugserver and caused TestThreadStepOut to fail.

llvm-svn: 370963
2019-09-04 19:36:29 +00:00
Jonas Devlieghere 6eef8e01c7 [Python] Implement __next__ for value_iter
Python 3 iteration calls the next() method instead of next() and
value_iter only implemented the Python 2 version.

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

llvm-svn: 370954
2019-09-04 18:59:13 +00:00
Jonas Devlieghere 24223eb24c [Python] Implement truth testing for lldb.value
Python 3 calls __bool__() instead of __len__() and lldb.value only
implemented the __len__ method. This adds the __bool__() implementation.

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

llvm-svn: 370953
2019-09-04 18:59:10 +00:00
Jonas Devlieghere 5559406ae5 [Python] Fix whitespace before making changes (NFC)
llvm-svn: 370952
2019-09-04 18:59:06 +00:00
Adrian Prantl 2461061168 Upstream macCatalyst support in debugserver and the macOS dynamic loader
plugin.

Unfortunately the test is currently XFAILed because of missing changes
to the clang driver.

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

llvm-svn: 370931
2019-09-04 17:23:15 +00:00
Frederic Riss cc5b509b9e Workaround TestConcurrentMany* flakiness in a more pricipled way
The flakiness on our local machines seems to come for a race in the kernel
between task_suspend and the creation of the Mach exceptions for the threads
that hit breakpoints. The debugserver code is written with the assumption
that the kernel will be able to provide us with all the exceptions for a
given task once task_suspend returns. On machines with higher core counts,
this seems not to be the case. The first batch of exceptions we get after
task_suspend does not contain exceptions for all the threads that have hit
a breakpoint, thus they get misreprorted in the first stop packet.

Adding a 1ms timeout to the call that retrieves the batch of exceptions
seems to workaround the issue reliably on our machines, and it shoulnd't
impact standard debugging scenarios too much (a stop will incur an additional
1ms delay). We'll be talking to the kernel team to figure out the right
contract for those APIs.

This patch also reverts part of Jonas' previous workaround for the
issue (r370785).

llvm-svn: 370916
2019-09-04 16:13:12 +00:00
Pavel Labath 0522975246 disassemble command: fix error message when disassembly fails
We were printing the start_addr field, which is not correct, as in this
branch we are processing the memory described by cur_range. Print that
instead.

Ideally, in particular this case, the error message would also say
something about not being able to disassemble due to not having found
the module from the core file, but that is not easy to do right now, so
I'm leaving that for another time.

llvm-svn: 370898
2019-09-04 13:26:41 +00:00
Raphael Isemann f8b476282e [lldb] Fix log statement in Socket::Write
We change num_bytes in this method, so this doesn't actually
log the parameter that we called the function with. No test
as we don't test logging code.

llvm-svn: 370887
2019-09-04 12:38:43 +00:00
Raphael Isemann e5814d78ce [lldb] Limit the amount of zeroes we use for padding when printing small floats
Summary:
We got a radar that printing small floats is not very user-friendly in LLDB as we print them with up to
100 leading zeroes before starting to use scientific notation. This patch changes this by already using
scientific notation when we hit 6 padding zeroes by default and moves this value into a target setting
so that users can just set this number back to 100 if they for some reason preferred the old behaviour.

This new setting is influencing how we format data, so that's why we have to reset the data visualisation
cache when it is changed.

Note that we have always been using scientific notation for large numbers because it seems that
the LLVM implementation doesn't support printing out the padding zeroes for them. I would have fixed
that if it was trivial, but looking at the LLVM implementation for this it seems that this is not as trivial
as it sounds. I would say we look into this if we ever get a bug report about someone wanting to have
a large amount of trailing zeroes in their numbers instead of using scientific notation.

Fixes rdar://39744137

Reviewers: #lldb, clayborg

Reviewed By: clayborg

Subscribers: JDevlieghere, lldb-commits

Tags: #lldb

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

llvm-svn: 370880
2019-09-04 11:41:23 +00:00
Raphael Isemann e36fd9ed76 [lldb] Early exit in RangeDataVector:FindEntryIndexesThatContain
Summary:
We currently spend a lot of time in this function (around 27% of the br-by-regex benchmark in lldb-bench)
by just iterating over all the ranges. We already sorted these ranges by their base address, we we can actually
just stop checking ranges as soon as we find one that has a higher base address.

Reviewers: labath

Reviewed By: labath

Subscribers: amccarth, arphaman, JDevlieghere, lldb-commits

Tags: #lldb

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

llvm-svn: 370879
2019-09-04 11:40:29 +00:00
Jan Kratochvil 5aa1d81969 Code cleanup: Change FormattersContainer::KeyType from SP to rvalue
There is now std::shared_ptr passed around which is expensive for manycore
CPUs. Most of the times (except for 3 cases) it is now just std::moved with no
CPU locks needed. It also makes it possible to sort the keys (which is now not
needed much after D66398).

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

llvm-svn: 370863
2019-09-04 09:47:18 +00:00
Pavel Labath 84542187ee Port TestBatchMode to PExpectTest class
Summary:
I'm doing this mainly for consistency, but there are also other cleanups
that will be enabled by this (e.g., the automatic setting of
clang-modules-cache-path setting).

Reviewers: teemperor, JDevlieghere

Subscribers: lldb-commits

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

llvm-svn: 370858
2019-09-04 09:20:08 +00:00
Raphael Isemann 42fb94993d [lldb][NFC] Rename ReadRegisterValue to PrintRegisterValue
That was the actual name I had in mind, but it seems git didn't pick
that change up when committing my previous commit.

llvm-svn: 370856
2019-09-04 09:18:10 +00:00
Raphael Isemann ac6aff70a8 [lldb][NFC] Remove WriteRegister copy-pasta from ObjectFileMachO
The function had the same name as one of the member function, so
it was just copied to all classes so that the lookup works. We
could also give the function a more better and unique name
(because it's actually printing the register value and writing
to the stream, not writing to the register).

Also removes the unused return value.

llvm-svn: 370854
2019-09-04 09:10:28 +00:00
Raphael Isemann 7479b9cb0e [lldb][NFC] Add a simple test for thread_local storage.
Seems we fail to read TLS data on Linux, so the test only runs on
macOS for now. We will see how this test runs on the BSD bots.

llvm-svn: 370848
2019-09-04 08:02:52 +00:00
Pavel Labath 418a272f4a [dotest] Avoid the need for LEVEL= makefile boilerplate
Summary:
Instead of each test case knowing its depth relative to the test root,
we can just have dotest add the folder containing Makefile.rules to the
include path.

This was motivated by r370616, though I have been wanting to do this
ever since we moved to building tests out-of-tree.

The only manually modified files in this patch are lldbinline.py and
plugins/builder_base.py. The rest of the patch has been produced by this
shell command:
  find . \( -name Makefile -o -name '*.mk' \)  -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} +

Reviewers: teemperor, aprantl, espindola, jfb

Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits

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

llvm-svn: 370845
2019-09-04 07:46:25 +00:00
Michal Gorny 37f91c3218 [lldb] [test] Mark 'reenabled' tests XFAIL on NetBSD
llvm-svn: 370842
2019-09-04 06:36:53 +00:00
Michal Gorny 3461e3ea8e [lldb] [test] Un-mark two commands/register tests XFAIL
llvm-svn: 370840
2019-09-04 06:10:02 +00:00
Jonas Devlieghere a0a2ca67fe [Driver] Remove duplicate option parsing (NFC)
We were checking OPT_no_use_colors three times, twice to disable colors
and once to enable debug mode. This simplifies things and now the option
is only checked once.

llvm-svn: 370814
2019-09-03 20:18:19 +00:00