Commit Graph

359 Commits

Author SHA1 Message Date
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
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
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
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
Adrian Prantl db5a779f2f Avoid using -S in combination with "script"; it's unreliable.
llvm-svn: 355573
2019-03-07 00:46:56 +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
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
Michal Gorny 2508fcff60 [lldb] [lit] Attempt to fix regex in toolchain-clang.test
llvm-svn: 355510
2019-03-06 14:49:48 +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
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
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
Alex Langford 0ca4f84f2f [build.py] Allow clang-cl to build files starting with '/U'
Summary:
clang-cl tries to match cl's interface, and treats /U as "Removes a
predefined macro" as cl does. When you feed clang-cl a file that begins with
'/U' (e.g. /Users/xiaobai/foo.c), clang-cl will emit a warning and in some cases
an error, like so:

clang-9: warning: '/Users/xiaobai/foo.c' treated as the '/U' option [-Wslash-u-filename]
clang-9: note: Use '--' to treat subsequent arguments as filenames
clang-9: error: no input files

If you're using clang-cl, make sure '--' is passed before the source file.

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

llvm-svn: 355341
2019-03-04 21:36:49 +00:00
Michal Gorny de11105d2e [lldb] [test] Mark failing tests XFAIL on NetBSD
Add a convenience 'expectedFailureNetBSD' decorator and mark all tests
currently failing on NetBSD with it.  Also skip a few tests that hang
the test suite.  This should establish a baseline for the test suite
and get us closer to enabling tests on buildbot.  This will help us
catch regressions while we still have a lot of work to do to get tests
working.

It seems that there are also some flaky tests.  I am going to address
them later on.

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

llvm-svn: 355320
2019-03-04 16:54:06 +00:00
Pavel Labath e52b84ef8e Reinstate UNSUPPORTED: linux on stop-hook-threads.test
This stanza was removed in r355213, but it seems that patch did not
fully fix the problem, as the test still fails sporadically
(particularly under heavy load) on linux.

llvm-svn: 355276
2019-03-02 19:58:10 +00:00
Michal Gorny c10a884873 [lldb] [lit] Pass -pthread on NetBSD as well
llvm-svn: 355274
2019-03-02 16:48:44 +00:00
Jim Ingham 3139fc9767 Resubmit r354706 with a fix for process launch.
When the debugger is run in sync mode, you need to
be able to tell whether a hijacked resume is for some
special purpose (like waiting for the SIGSTOP on attach)
or just to perform a synchronous resume.  Target::Launch was doing
that wrong, and that caused stop-hooks on process launch
in source files to behave incorrectly.

<rdar://problem/48115661>

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

llvm-svn: 355213
2019-03-01 18:13:38 +00:00
Michal Gorny 6d6afb72b3 [lldb] [lit] Set LD_LIBRARY_PATH or alike for Suite tests
Set LD_LIBRARY_PATH or local platform's equivalent of it when running
the 'Suite' tests.  This is necessary when running tests inside build
tree with BUILD_SHARED_LIBS enabled, in order to make the LLDB modules
load freshly built LLVM libraries.

The code is copied from clang (test/Unit/lit.cfg).  SHLIBDIR
substitution is added to site-config (already present in top-level LLDB
site-config) to future-proof this into supporting stand-alone builds
with shared LLDB libraries.

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

llvm-svn: 354920
2019-02-26 19:46:29 +00:00
Tatyana Krasnukha 9e1929305c Fix short options syntax in Minidump test
llvm-svn: 354890
2019-02-26 15:38:30 +00:00
Pavel Labath ad96b0e63e Finish revert of r354706
The revert in r354711 wasn't complete. Finish the job.

llvm-svn: 354766
2019-02-25 09:30:41 +00:00
Jim Ingham 0513a24d62 Revert r354706 - lit touched my thigh
llvm-svn: 354711
2019-02-23 01:08:17 +00:00
Jim Ingham ff8c7a0947 Make sure that stop-hooks run asynchronously.
They aren't designed to nest recursively, so this will prevent that.
Also add a --auto-continue flag, putting "continue" in the stop hook makes
the stop hooks fight one another in multi-threaded programs.
Also allow more than one -o options so you can make more complex stop hooks w/o
having to go into the editor.

<rdar://problem/48115661>

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

llvm-svn: 354706
2019-02-23 00:13:25 +00:00
Davide Italiano 0e251567b3 Revert "[lldb-mi] Move TestMIPrompt away from pexpect()."
I see a test failing on the macOS bots. I can't reproduce
locally, so try to get the bots green before I can investigate.

llvm-svn: 354540
2019-02-21 01:55:31 +00:00
Davide Italiano 656b6698be [lldb-mi] Move TestMIPrompt away from pexpect().
llvm-svn: 354506
2019-02-20 19:25:12 +00:00
Jonas Devlieghere 4e9b02b0da [TestModuleCXX] Make this test Darwin-only.
Apparently this functionality is not expected to work on non-Darwin
systems. I should've checked the decorator on the original test.

llvm-svn: 354487
2019-02-20 17:43:34 +00:00
Michal Gorny 4f134fb660 [lldb] [ObjectFile/ELF] Fix recognizing NetBSD images
Split the recognition into NetBSD executables & shared libraries
and core(5) files.

Introduce new owner type: "NetBSD-CORE", as core(5) files are not tagged
in the same way as regular NetBSD executables.

Stop using incorrectly ABI_TAG and ABI_SIZE.  Introduce IDENT_TAG,
IDENT_DECSZ, IDENT_NAMESZ and PROCINFO.

The new values detect correctly the NetBSD images.

The patch has been originally written by Kamil Rytarowski.  I've added
tests and applied minor code changes per review.  The work has been
sponsored by the NetBSD Foundation.

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

llvm-svn: 354466
2019-02-20 14:31:06 +00:00
Jonas Devlieghere 78750a51d9 [TestModuleCXX] Use UNSUPPORTED instead of REQUIRES
The requires value turns out to be bogus and the test gets skipped on
macOS.

llvm-svn: 354425
2019-02-20 01:49:16 +00:00
Jonas Devlieghere b7c22314c3 [lldb-instr] Group RECORD macros
Group LLDB_RECORD macros per input file.

llvm-svn: 354423
2019-02-20 01:49:10 +00:00
Jonas Devlieghere ee04d4d840 [lldb-instr] Don't print REGISTER macro when RECORD is already present
Currently we'd always print the LLDB_REGISTER macro, even if the
LLDB_RECORD macro was already present. This patches changes that to make
it easier to incrementally update the macros.

Note that it's still possible for the RECORD and REGISTER macros to get
out of sync.

llvm-svn: 354400
2019-02-19 23:13:29 +00:00
Greg Clayton cc6ec692a4 Add Facebook Minidump directory streams and options to dump them.
Facebook creates minidump files that contain specific information about why things crash. Adding ways to dump these allows tools to be made that can auto download symbols based on the information that is contained in the minidump files.

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

llvm-svn: 354385
2019-02-19 21:48:34 +00:00
Pavel Labath 95e29763d4 Revert "minidump: Add ability to attach (breakpad) symbol files to placeholder modules"
This reverts r354263, because it uncovered a problem in handling of the
minidumps with conflicting UUIDs. If a minidump contains two files with
the same UUID, we will not create to placeholder modules for them, but
instead reuse the first one for the second instance. This creates a
problem because these modules have their load address hardcoded in them
(and I've added an assert to verify that).

Technically this is not a problem with this patch, as the same issue
existed in the previous implementation, but it did not have the assert
which would diagnose that. Nonetheless, I am reverting this until I
figure out what's the best course of action in this situation.

llvm-svn: 354324
2019-02-19 13:52:31 +00:00
Jonas Devlieghere cd2e6c75f6 [lldb-instr] Test that we ignore existing macros.
Although the functionality was already present, it wasn't tested.

llvm-svn: 354303
2019-02-19 01:20:49 +00:00
Jonas Devlieghere 091b925284 [lldb-instr] Wrap returns of struct/classes in LLDB_RECORD_RESULT
The instrumentation framework requires return values of custom classes
and structs to be wrapped in the LLDB_RECORD_RESULT macro.

llvm-svn: 354301
2019-02-19 01:04:31 +00:00
Jonas Devlieghere 292a533085 Disable TestModuleCXX.test on Windows
Importing cxx modules doesn't seem to work on Windows:

error: a.out :: Class 'tagARRAYDESC' has a member 'tdescElem' of type
  'tagTYPEDESC' which does not have a complete definition.
error: a.out :: Class 'tagPARAMDESCEX' has a member 'varDefaultValue' of type
  'tagVARIANT' which does not have a complete definition.
llvm-svn: 354300
2019-02-19 00:08:10 +00:00
Jonas Devlieghere d1511a4bc7 [lldb-instr] Add constructor and move test into lit/tools
The test had an implicit constructor for the Foo struct. Also, as the
instrumentation doesn't have to be reproducer specific, I moved the
tests into the lit/tools directory.

llvm-svn: 354294
2019-02-18 22:59:52 +00:00
Jonas Devlieghere 9764b65c82 [Reproducers] Make clang use lldb's VFS.
In r353906 we hooked up clang and lldb's reproducer infrastructure to
capture files used by clang. This patch adds the necessary logic to have
clang reuse the files from lldb's reproducer during replay.

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

llvm-svn: 354283
2019-02-18 20:31:18 +00:00
Pavel Labath 515e7cdec0 minidump: Add ability to attach (breakpad) symbol files to placeholder modules
This re-commits r353677, which was reverted due to test failures on the
windows bot. The issue there was that ObjectFilePECOFF vended its base
address through the incorrect interface. SymbolFilePDB depended on that,
which lead to assertion failures when SymbolFilePDB was attempting to
use the placeholder object files as a base. This has been fixed in
r354258

It also fixes one small problem in the original patch. The issue was that the
Module class would attempt to overwrite the object file we created in
CreateModuleFromObjectFile if the file corresponding to the placeholder object
file happened to exist (but we have already disqualified it due to UUID
mismatch. The fix is simple -- we set the m_did_load_objfile flag to properly
record the fact that we have already created an object file for the module.

The original commit message was:

The reason this wasn't working was that ProcessMinidump was creating odd
object-file-less modules, and SymbolFileBreakpad required the module to
have an associated object file because it needed to get its base
address.

This fixes that by introducing a PlaceholderObjectFile to serve as a
dummy object file. The general idea for this is taken from D55142, but
I've reworked it a bit to avoid the need for the PlaceholderModule
class. Now that we have an object file, our modules are sufficiently
similar to regular modules that we can use the regular Module class
almost out of the box -- the only thing I needed to tweak was the
Module::CreateModuleFromObjectFile functon to set the module's FileSpec
in addition to it's architecture. This wasn't needed for ObjectFileJIT
(the other user of CreateModuleFromObjectFile), but it shouldn't hurt it
either, and the change seems like a straightforward extension of this
function.

Reviewers: clayborg, lemo, amccarth

Subscribers: lldb-commits

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

llvm-svn: 354263
2019-02-18 11:55:01 +00:00
Pavel Labath d1304bba34 PECOFF: Implement GetBaseAddress
COFF files are modelled in lldb as having one big container section
spanning the entire module image, with the actual sections being
subsections of that. In this model, the base address is simply the
address of the first byte of that section.

This also removes the hack where ObjectFilePECOFF was using the
m_file_offset field to communicate this information. Using file offset
for this purpose is completely wrong, as that is supposed to indicate
where is this ObjectFile located in the file on disk. This field is only
meaningful for fat binaries, and should normally be 0.

Both PDB plugins have been updated to use GetBaseAddress instead of
GetFileOffset.

llvm-svn: 354258
2019-02-18 11:06:57 +00:00
Jorge Gorbe Moya da0487f3f2 Disable stop-hook-threads.test on Linux
ExecControl/StopHook/stop-hook-threads.test is flaky on Linux (it's
consistently failing on my machine, but doesn't fail on a co-worker's).
I'm seeing the following assertion failure:

```
CommandObject.cpp:145: bool lldb_private::CommandObject::CheckRequirements(lldb_private::CommandReturnObject&): Assertion `m_exe_ctx.GetTargetPtr() == NULL' failed.
```

Interestingly, this doesn't happen when typing the same commands in
interactive mode. The cause seems to be that, in synchronous execution
mode continue waits until the process stops again, and that includes
running any stop-hooks for that later stop, so we end with a stack trace
like this (lots of frames omitted for clarity):

```
abort()
CommandObject::CheckRequirements() <-- this is again the same instance of CommandObjectProcessContinue, fails assertion because the previous continue command hasn't finished.
Target::RunStopHooks()
CommandObjectProcessContinue::DoExecute()
Target::RunStopHooks()
```

In general, it seems like using process control commands inside
stop-hooks does not have very well defined semantics. You don't even
need multiple threads to make that assertion fail, you can build

```
int main() {
  printf("1\n");  // break1
  printf("2\n");  // break2
}
```

and then on lldb

```
target stop-hook add -o continue
break set -f stop-hook-simple.cpp -p "break1"
break set -f stop-hook-simple.cpp -p "break2"
run
```

In this case it's even worse because the presence of multiple threads
makes it prone to race conditions. In some tests I ran with a simpler
version of this test case, I was hitting either the previous assertion
failure or the following issue:

1. Two threads reach a breakpoint
2. First stop-hook does a process continue
3. Threads end
4. Second stop-hook runs, complains about process not existing.

This change disables the test on Linux. It's already marked as XFAIL on
Windows, so maybe we should just delete it until it's clear what should
be the expected behavior in these cases. Or maybe try to come up with a
way to write a similar multithreaded test without calling continue from
a stop hook, I don't know.

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

llvm-svn: 354149
2019-02-15 17:54:00 +00:00
Raphael Isemann a2a6acf3f0 Don't source local .lldbinit in the test suite
Summary:
As suggested by Pavel, we shouldn't let our tests parse the local .lldbinit to prevent random test failures
due to changed settings.

Fixes Minidump/Windows/Sigsegv/sigsegv.test (and probably others too).

Reviewers: labath, serge-sans-paille

Reviewed By: labath

Subscribers: abidh, lldb-commits, zturner

Tags: #lldb

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

llvm-svn: 354038
2019-02-14 17:39:19 +00:00
Pavel Labath 7db8b5c4bd ObjectFilePECOFF: Create a "container" section spanning the entire module image
Summary:
This is coming from the discussion in D55356 (the most interesting part
happened on the mailing list, so it isn't reflected on the review page).

In short the issue is that lldb assumes that all bytes of a module image
in memory will be backed by a "section". This isn't the case for PECOFF
files because the initial bytes of the module image will contain the
file header, which does not correspond to any normal section in the
file. In particular, this means it is not possible to implement
GetBaseAddress function for PECOFF files, because that's supposed point
to the first byte of that header.

If my (limited) understanding of how PECOFF files work is correct, then
the OS is expecded to load the entire module into one continuous chunk
of memory. The address of that chunk (+/- ASLR) is given by the "image
base" field in the COFF header, and it's size by "image size". All of
the COFF sections are then loaded into this range.

If that's true, then we can model this behavior in lldb by creating a
"container" section to represent the entire module image, and then place
other sections inside that. This would make be consistent with how MachO
and ELF files are modelled (except that those can have multiple
top-level containers as they can be loaded into multiple discontinuous
chunks of memory).

This change required a small number of fixups in the PDB plugins, which
assumed a certain order of sections within the object file (which
obivously changes now). I fix this by changing the lookup code to use
section IDs (which are unchanged) instead of indexes. This has the nice
benefit of removing spurious -1s in the plugins as the section IDs in
the pdbs match the 1-based section IDs in the COFF plugin.

Besides making the implementation of GetBaseAddress possible, this also
improves the lookup of addresses in the gaps between the object file
sections, which will now be correctly resolved as belonging to the
object file.

Reviewers: zturner, amccarth, stella.stamenova, clayborg, lemo

Reviewed By: clayborg, lemo

Subscribers: JDevlieghere, abidh, lldb-commits

Tags: #lldb

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

llvm-svn: 353916
2019-02-13 07:17:24 +00:00
Jonas Devlieghere 63e2e59b89 [Reproducers] Integrate FileProvider with clang
This patch hooks up clang and lldb's reproducers functionality. It
ensures that when capturing a reproducer, headers and modules imported
through the expression parser are collected.

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

llvm-svn: 353906
2019-02-13 01:30:41 +00:00
Davide Italiano 3eac27789d [testsuite] Add a comment explaining what this test does.
llvm-svn: 353896
2019-02-12 23:02:53 +00:00
Davide Italiano caade28362 [testsuite] Convert TestSingleQuote to lit.
Nothing crazy, this is pretty mechanical.

llvm-svn: 353894
2019-02-12 22:57:57 +00:00
Aleksandr Urakov eaa0ad672e [NativePDB] Process virtual bases in the correct order
Summary:
This patch makes virtual bases to be added in the correct order to the bases
list. It is important because `VTableContext` (`MicrosoftVTableContext` in our
case) uses then the order of virtual bases in the list to restore the virtual
table indexes. These indexes are used then to resolve the layout of the virtual
bases.

We haven't enough information about offsets of virtual bases regarding to the
object (moreover, in a common case we can't rely on such information, see the
example here: https://reviews.llvm.org/D53506#1272306 ), but there should be
enough information to restore the layout of the virtual bases from the indexes
in runtime. After D53506 this information is used whenever possible, so there
should be no problems with virtual bases' fields reading.

Reviewers: zturner, rnk, stella.stamenova

Subscribers: abidh, teemperor, lldb-commits

Tags: #lldb

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

llvm-svn: 353806
2019-02-12 08:17:11 +00:00
Aleksandr Urakov eac19858e9 [build.py] Add `-fms-compatibility-version=19` to `build.py`
Summary:
`clang-cl` can't compile tests containing `char16_t` and `char32_t` types
without the MSVC compatibility option passed. This patch adds the option to the
`clang-cl` call in the `build.py` script by default.

Reviewers: zturner, labath, stella.stamenova, serge-sans-paille

Reviewed By: labath

Subscribers: lldb-commits, leonid.mashinskiy

Tags: #lldb

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

llvm-svn: 353709
2019-02-11 15:13:33 +00:00
Pavel Labath 841bea933b Breakpad: auto-detect path style of file entries
Summary:
This adds support for auto-detection of path style to SymbolFileBreakpad
(similar to how r351328 did the same for DWARF). We guess each file
entry separately, as we have no idea which file came from which compile
units (and different compile units can have different path styles). The
breakpad generates should have already converted the paths to absolute
ones, so this guess should be reasonable accurate, but as always with
these kinds of things, it is hard to give guarantees about anything.

In an attempt to bring some unity to the path guessing logic, I move the
guessing logic from inside SymbolFileDWARF into the FileSpec class and
have both symbol files use it to implent their desired behavior.

Reviewers: clayborg, lemo, JDevlieghere

Subscribers: aprantl, markmentovai, lldb-commits

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

llvm-svn: 353702
2019-02-11 14:11:00 +00:00
Michal Gorny c1adbc6c94 [lldb] [lit] Fix finding lld-link when it is not in 'compiler dir'
Fix the build helper to find lld-link via PATH lookup, rather than
making a fragile assumption that it will be present in the 'compiler
directory'.  This fixes tests on Gentoo where clang and lld
are installed in different directories.

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

llvm-svn: 353701
2019-02-11 14:09:48 +00:00
Michal Gorny 8780771c51 [lldb] [test] Skip lldb-mi test if LLDB_DISABLE_PYTHON is used
Skip running lldb-mi tests when Python support is disabled.  This causes
lldb-mi to unconditionally fail, and therefore all the relevant tests
fail as well.

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

llvm-svn: 353700
2019-02-11 14:09:43 +00:00
Pavel Labath cfc3f751aa Revert "minidump: Add ability to attach (breakpad) symbol files to placeholder modules"
The commit has broken TestMiniDump.py on windows. Reverting while I
investigate.

This reverts r353677.

llvm-svn: 353686
2019-02-11 10:30:24 +00:00
Pavel Labath 734648bb4a minidump: Add ability to attach (breakpad) symbol files to placeholder modules
Summary:
The reason this wasn't working was that ProcessMinidump was creating odd
object-file-less modules, and SymbolFileBreakpad required the module to
have an associated object file because it needed to get its base
address.

This fixes that by introducing a PlaceholderObjectFile to serve as a
dummy object file. The general idea for this is taken from D55142, but
I've reworked it a bit to avoid the need for the PlaceholderModule
class. Now that we have an object file, our modules are sufficiently
similar to regular modules that we can use the regular Module class
almost out of the box -- the only thing I needed to tweak was the
Module::CreateModuleFromObjectFile functon to set the module's FileSpec
in addition to it's architecture. This wasn't needed for ObjectFileJIT
(the other user of CreateModuleFromObjectFile), but it shouldn't hurt it
either, and the change seems like a straightforward extension of this
function.

Reviewers: clayborg, lemo, amccarth

Subscribers: lldb-commits

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

llvm-svn: 353677
2019-02-11 09:32:08 +00:00