Commit Graph

14126 Commits

Author SHA1 Message Date
Pavel Labath 16d3fd8ba1 Fix warning in IRExecutionUnit.cpp
llvm-svn: 262712
2016-03-04 11:26:56 +00:00
Tamas Berghammer b0b1ea36e7 Add reverse file remapping for breakpoint set
LLDB can remap a source file to a new directory based on the
"target.sorce-map" to handle the usecase when the source code moved
between the compliation and the debugging. Previously the remapping
was only used to display the content of the file. This CL fixes the
scenario when a breakpoint is set based on the new an absolute path
with adding an inverse remapping step before looking up the breakpoint
location.

Differential revision: http://reviews.llvm.org/D17848

llvm-svn: 262711
2016-03-04 11:26:44 +00:00
Pavel Labath c6ba6ae209 Revert "Fetch remote log files from LLGS tests"
Even after the last fixup, there still seems to be one failure left. Revert until I figure out
what is going on.

llvm-svn: 262622
2016-03-03 15:19:14 +00:00
Pavel Labath 13ce8cd6bc Fix OSX breakage caused by r262597
llvm-svn: 262602
2016-03-03 10:39:24 +00:00
Pavel Labath 6be1f9dc3b Fetch remote log files from LLGS tests
Summary:
this enables download of remote log files for llgs and debugserver tests (previously we were just
passing the host file name which obviously did not work). Note this also changes the debugserver
logging to work only when logging has been requested on the command line, whereas previously it
would log unconditionally. I can change it back if anyone is relying on this, but I thought I'd
make this consistent.

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17798

llvm-svn: 262597
2016-03-03 09:02:52 +00:00
Eugene Zelenko 34ede34acd Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
llvm-svn: 262570
2016-03-03 00:51:40 +00:00
Jason Molenda 18a77f4b65 Don't build source/Plugins/Process/Linux in the Xcode project file.
These files won't build for ios etc arm builds of lldb and aren't
used for macosx native lldb's.

http://reviews.llvm.org/D17750
<rdar://problem/24287153> 

llvm-svn: 262566
2016-03-03 00:21:32 +00:00
Jason Molenda fe5a7109c5 Add SymbolFilePDB to xcode project file to keep it
up to date after 4262528.

llvm-svn: 262543
2016-03-02 23:39:59 +00:00
Zachary Turner 74e08ca05c Add support for reading line tables from PDB files.
PDB is Microsoft's debug information format, and although we
cannot yet generate it, we still must be able to consume it.
Reason for this is that debug information for system libraries
(e.g. kernel32, C Runtime Library, etc) only have debug info
in PDB format, so in order to be able to support debugging
of system code, we must support it.

Currently this code should compile on every platform, but on
non-Windows platforms the PDB plugin will return 0 capabilities,
meaning that for now PDB is only supported on Windows.  This
may change in the future, but the API is designed in such a way
that this will require few (if any) changes on the LLDB side.
In the future we can just flip a switch and everything will
work.

This patch only adds support for line tables.  It does not return
information about functions, types, global variables, or anything
else.  This functionality will be added in a followup patch.

Differential Revision: http://reviews.llvm.org/D17363
Reviewed by: Greg Clayton

llvm-svn: 262528
2016-03-02 22:05:52 +00:00
Stephane Sezer c691b14a41 Use shallow clones in build-llvm.py.
Summary:
This makes cloning (and therefore the whole build) faster.
The checkout step goes from ~4m to ~30s on my host.

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17425

llvm-svn: 262513
2016-03-02 20:53:19 +00:00
Tamas Berghammer 45dbfa1f83 Upgrade the arm/thumb architecture used by the disassembler
Previously we were using thumbv7 and armv8.1a what ended up showing a
few undefined instruction when disassembling code. This CL update the
architectures used to armv8.2a and thumbv8.2a (newest available) so we
display all instruction in the disassambly.

llvm-svn: 262482
2016-03-02 12:42:43 +00:00
Eugene Zelenko df37055017 Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
llvm-svn: 262450
2016-03-02 02:18:18 +00:00
Eugene Zelenko 896ddd03e9 Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
llvm-svn: 262441
2016-03-02 01:09:03 +00:00
Ted Woodward 7071c5fd64 Fix bug with function resolution when using IR Interpreter
Summary: Recent changes to the expression parser broke function name resolution when using the IR interpreter instead of JIT. This patch changes the IRMemoryMap ivar in InterpreterStackFrame to an IRExecutionUnitSP (which is a subclass), allowing InterpreterStackFrame::ResolveConstantValue() to call FindSymbol() on the name of the Value when it's a FunctionVal. It also changes IRExecutionUnit::FindInSymbols() to call GetFileAddress() on the symball if ResolveCallableAddress() fails and there is no valid Process.

Reviewers: spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17745

llvm-svn: 262407
2016-03-01 21:53:26 +00:00
Tamas Berghammer f46c5259bd DWARFExpression: Don't resolve load address in DW_OP_plus
If we have a TargetLoadAddress on the top of the DWARF stack then a
DW_OP_plus or a DW_OP_plus_ucons sholudn't dereference (resolve) it
and then add the value to the dereferenced value but it should offset
the load address by the specified constant.

llvm-svn: 262339
2016-03-01 15:01:05 +00:00
Pavel Labath 0ddfde44ce Slightly improve logging in LLGS tests
we're sometimes getting an exception here, and I want to see why...

llvm-svn: 262333
2016-03-01 14:04:41 +00:00
Pavel Labath 109702ccb1 Fix warning in NSDictionary.cpp
llvm-svn: 262322
2016-03-01 11:40:47 +00:00
Jason Molenda cc9e92eb41 Update the on-device arm specific code to match the API changes
that happened in other parts of this file so it builds cleanly
for arm again.

llvm-svn: 262300
2016-03-01 05:34:05 +00:00
Eugene Zelenko 9b0a801797 Fix MSVC build failure in source/Target/Process.cpp.
Will be good idea to introduce macro/constexpr for NULL thread_result_t.

llvm-svn: 262287
2016-03-01 02:08:37 +00:00
Eugene Zelenko da8cf8af35 Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target/Process.cpp; other minor fixes.
llvm-svn: 262281
2016-03-01 00:55:51 +00:00
Enrico Granata 46d4aa211f When 'help' cannot find a command, produce additional help text that also points the user to the apropos and type lookup commands
This is useful in cases such as, e.g.

(lldb) help NSString
(the user meant type lookup)

or

(lldb) help kill
(the user is looking for process kill)

Fixes rdar://24868537

llvm-svn: 262271
2016-02-29 23:22:53 +00:00
Enrico Granata fe09d5e73a Fix a typo in my previous commit. This would cause mutable NSArrays to show up empty
llvm-svn: 262260
2016-02-29 21:41:19 +00:00
Enrico Granata 7a67ee263f Change the user-visible name for the argument type language to source-language
This makes it so that help language provides help on the language command and help source-language provides the list of source languages one can pass as an option

Fixes rdar://24869942

llvm-svn: 262259
2016-02-29 21:37:01 +00:00
Adrian McCarthy a7ad58b61c NFC: Refactor ProcessWinMiniDump to use a more traditional pimpl idiom.
This is a mechanical refactor.  There should be no functional changes in this commit.

Instead of encapsulating just the Windows-specific data, ProcessWinMiniDump now uses a private implementation class.  This reduces indirections (in the source).  It makes it easier to add private helper methods without touching the header and allows them to have platform-specific types as parameters.  The only trick was that the pimpl class needed a back pointer in order to call a couple methods.

llvm-svn: 262256
2016-02-29 21:15:23 +00:00
Adrian McCarthy 536183275d Fix TestInlines.py on Windows
The inlining semantics for C and C++ are different, which affects the test's expectation of the number of times the function should appear in the binary.  In the case of this test, C semantics means there should be three instances of inner_inline, while C++ semantics means there should be only two.

On Windows, clang uses C++ inline semantics even for C code, and there doesn't seem to be a combination of compiler flags to avoid this.

So, for consistency, I've recast the test to use C++ everywhere.  Since the test resided under lang/c, it seemed appropriate to move it to lang/cpp.

This does not address the other XFAIL for this test on Linux/gcc.  See https://llvm.org/bugs/show_bug.cgi?id=26710

Differential Revision: http://reviews.llvm.org/D17650

llvm-svn: 262255
2016-02-29 21:13:29 +00:00
Enrico Granata 936499ae4c Add an LLDB data formatter for single-element NSArray and NSDictionary Cocoa containers
Fixes rdar://23715118

llvm-svn: 262254
2016-02-29 21:06:50 +00:00
Eugene Zelenko bbd16815b0 Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; other minor fixes.
llvm-svn: 262246
2016-02-29 19:41:30 +00:00
Pavel Labath 6a291dee2b Revert a part of "Add/Improve complex, vector, aggregate types handling for SysV ARM (hard/soft) ABI."
This partially reverts commit r262218.

The commit added additional checks to a test case. The test case is too big so it's not feasible
to XFAIL it completely. Suggest to implement the checks as a separate test case, which can then
be XFAILed more surgically.

llvm-svn: 262223
2016-02-29 14:26:45 +00:00
Omair Javaid ef77ace9ae Add/Improve complex, vector, aggregate types handling for SysV ARM (hard/soft) ABI.
For details see:

Differential revision: http://reviews.llvm.org/D17708

llvm-svn: 262218
2016-02-29 13:39:20 +00:00
Pavel Labath 76d76bb006 Fix compiler warnings in the java code
llvm-svn: 262214
2016-02-29 11:44:15 +00:00
Todd Fiala 6993abff14 Revert "Fix bug with register values byte order in expression evaluation."
This reverts commit r262041, which caused asserts starting yesterday on the OS X testbot.

See details in:
https://llvm.org/bugs/show_bug.cgi?id=26758

llvm-svn: 262156
2016-02-27 22:48:50 +00:00
Greg Clayton cc2e27f098 Make LLDB safer to use with respect to the global destructor chain.
llvm-svn: 262090
2016-02-26 23:20:08 +00:00
Eugene Zelenko 4ea4d2ed30 Fix Clang-tidy modernize-use-nullptr warnings in remaining files in source/Plugins/ABI; other minor fixes.
llvm-svn: 262082
2016-02-26 22:26:21 +00:00
Chaoren Lin b6f76b3d47 Register value is not necessarily scalar.
Reviewers: aidan.dodds, mamai

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17658

llvm-svn: 262081
2016-02-26 22:12:35 +00:00
Greg Clayton 5cc45e0122 Make sure to #include <atomic> for the std::atomic<bool> that was recently added.
llvm-svn: 262055
2016-02-26 19:41:49 +00:00
Greg Clayton 04df8ee55e Make sure the Target, Process and Thread GetGlobalProperties() static methods are thread safe.
<rdar://problem/22595283>

llvm-svn: 262053
2016-02-26 19:38:18 +00:00
Jim Ingham 406ba45f24 SymbolFileDWARFDebugMap::FindTypes didn't obey the max_matches flag,
but kept looking through .o files even after it had found as many 
matches as were requested.

llvm-svn: 262051
2016-02-26 19:33:11 +00:00
Aidan Dodds 3cdf5516c6 remove unused local string in IRForTarget.cpp
Committed on behalf of: ldrumm <luke.drummond@codeplay.com>

Differential revision: http://reviews.llvm.org/D16412

llvm-svn: 262043
2016-02-26 18:03:06 +00:00
Aidan Dodds 5ba2b2af6e Fix bug with register values byte order in expression evaluation.
The evaluation of expressions containing register values was broken for targets for which endianness differs from host.

Committed on behalf of: mamai <marianne.mailhot.sarrasin@gmail.com>

Differential revision: http://reviews.llvm.org/D17167

llvm-svn: 262041
2016-02-26 17:40:50 +00:00
Greg Clayton 860582f78e The IOHandlerProcessSTDIO is the _only_ IOHandler that gets pushed and popped from functions that are run due to something that is NOT input from the user. All other IOHandler objects result from input from the user. An issue rose up where if a command caused the process to resume and stop and process state changed, where state changed Event objects were broadcast, it would cause the IOHandlerProcessSTDIO to have its IOHandlerProcessSTDIO::Cancel() function called. This used to always write a byte to the control pipe (IOHandlerProcessSTDIO::m_pipe) even if the IOHandlerProcessSTDIO::Run() was never called. What would happen is:
(lldb) command_that_steps_process_thousands_of_times

As the "command_that_steps_process_thousands_of_times" could be a python command that resumed the process thousands of times and in doing so the IOHandlerProcessSTDIO would get pushed when the process resumed, and popped when it stoppped, causing the call to IOHandlerProcessSTDIO::Cancel(). Since the IOHandler thread is currently in IOHandlerEditline::Run() for the command interpreter handling the "command_that_steps_process_thousands_of_times" command, IOHandlerProcessSTDIO::Run() would never get called, even though the IOHandlerProcessSTDIO is on the top of the stack. This caused the command pipe to keep getting 1 bytes written each time the IOHandlerProcessSTDIO::Cancel() was called and eventually we will deadlock since the write buffer is full.

The fix here is to make sure we are in IOHandlerProcessSTDIO::Run() before we write anything to the command pipe, and just call SetIsDone(true) if we are not.

<rdar://problem/22361364>

llvm-svn: 262040
2016-02-26 17:36:44 +00:00
Tamas Berghammer 7155be87cb Add new java plugin files to the xcode project
llvm-svn: 262028
2016-02-26 15:47:35 +00:00
Tamas Berghammer 0ed9c497ca Revert part of rL262014 as it caused issues on gcc-i386
llvm-svn: 262023
2016-02-26 15:33:32 +00:00
Aidan Dodds 7f6e9d53a3 Add mips32 software breakpoints into platform::GetSoftwareBreakpointTrapOpcode().
The software breakpoint definitions for mips32 should have been included in my
recent patch that moved the software breakpoint definitions into the base platform
class.

llvm-svn: 262021
2016-02-26 15:11:01 +00:00
Tamas Berghammer 31d315b349 Fix address class lookup for absolute symbols
llvm-svn: 262016
2016-02-26 14:21:27 +00:00
Tamas Berghammer 87a9769e9b Add a set of new plugins to handle Java debugging
The purpose of these plugins is to make LLDB capable of debugging java
code JIT-ed by the android runtime.

Differential revision: http://reviews.llvm.org/D17616

llvm-svn: 262015
2016-02-26 14:21:23 +00:00
Tamas Berghammer 5b42c7aa25 Add support for DW_OP_push_object_address in dwarf expressions
Additionally fix the type of some dwarf expression where we had a
confusion between scalar and load address types after a dereference.

Differential revision: http://reviews.llvm.org/D17604

llvm-svn: 262014
2016-02-26 14:21:10 +00:00
Sagar Thakur ba04ed4128 [LLDB][MIPS] Fix TestInferiorAssert.py for MIPS
Patch by Nitesh Jain.

Summary: The debug version of libc.so is require for backtracing which may not be available on all platforms.

Reviewers: ovyalov, clayborg
Subscribers: zturner, lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: http://reviews.llvm.org/D17131
llvm-svn: 262011
2016-02-26 13:30:34 +00:00
Oleksiy Vyalov e4ff8ec649 Make TestPlatformProcessConnect to support abstract/domain sockets.
llvm-svn: 261974
2016-02-26 04:01:58 +00:00
Chaoren Lin 6fc5c7f1f5 Clear alias argument vector for 'p' alias.
Summary: This fixes the 'p' command which should be aliased to 'expresion --'.

Reviewers: jingham

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17634

llvm-svn: 261969
2016-02-26 03:36:27 +00:00
Jim Ingham 970bb9e0ec Add the "block" keyword to "thread step-in -e", and an alias that uses it: "sif <target function>" - i.e. step-into-function
to allow you to step through a complex calling sequence into a particular function that may span multiple lines.  Also some
test cases for this and the --step-target feature.

llvm-svn: 261953
2016-02-26 01:37:30 +00:00
Eugene Zelenko 2c6bd903ed Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Plugins/ABI; other minor fixes.
llvm-svn: 261952
2016-02-26 01:33:58 +00:00
Greg Clayton cec91ef921 Fix all of the unannotated switch cases to annotate the fall through or do the right thing and break.
llvm-svn: 261950
2016-02-26 01:20:20 +00:00
Eugene Zelenko 50ff9fee00 Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectThread.cpp; other minor fixes.
llvm-svn: 261936
2016-02-25 23:46:36 +00:00
Eugene Zelenko f13e65232d Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectTarget.cpp; other minor fixes.
llvm-svn: 261920
2016-02-25 19:02:39 +00:00
Pavel Labath 5a8453d576 Fix PythonDataObjectsTests for python 2
Summary:
the python2 branch seems erroneous as it expected the object to be both a "String" and "Bytes".
Fix the expectation.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17545

llvm-svn: 261901
2016-02-25 17:41:59 +00:00
Aidan Dodds b129847aaa Improve readability and performance of ClangExpressionParser::FindFunctionInModule
Committed on behalf of: Luke Drummond

Differential Revision: http://reviews.llvm.org/D17274

llvm-svn: 261861
2016-02-25 13:07:04 +00:00
Tamas Berghammer 31a2f8f9f5 Add support for handling absolute symbols in ELF
Most address represented in lldb as section plus offset and handling of
absolute addresses is problematic in several location because of lack
of necessary information (e.g. Target) or because of performance issues.

This CL change the way ObjectFileELF handle the absolute symbols with
creating a pseudo section for each symbol. With this change all existing
code designed to work with addresses in the form of section plus offset
will work with absolute symbols as well.

Differential revision: http://reviews.llvm.org/D17450

llvm-svn: 261859
2016-02-25 12:23:43 +00:00
Tamas Berghammer 72ac8a840f Handle the case when a variable is only valid in part of the enclosing scope
DWARF stores this information in the DW_AT_start_scope attribute. This
CL add support for this attribute and also changes the functions
displaying frame variables to only display the variables currently in
scope.

Differential revision: http://reviews.llvm.org/D17449

llvm-svn: 261858
2016-02-25 12:23:37 +00:00
Eugene Zelenko 73ef3c7fbc Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectType.cpp; other minor fixes.
llvm-svn: 261817
2016-02-25 02:08:17 +00:00
Greg Clayton 479d545ca2 Fix "target modules add -s <filename>" to work if the file doesn't exist locally on the current machine.
<rdar://problem/24807382>

llvm-svn: 261812
2016-02-25 00:56:47 +00:00
Adrian McCarthy 17dd4fe27b XFail TestInlines.py on Windows with clang.
Test expects the breakpoint to resolve to three locations, but clang on windows yields only 2.

llvm.org/pr26710

llvm-svn: 261810
2016-02-25 00:24:07 +00:00
Adrian McCarthy 0a750820a3 Get register context for the 32-bit process in a WoW64 process minidump
32-bit processes on 64-bit Windows run in a layer called WoW64 (Windows-on-Windows64). If you capture a mini dump of such a process from a 32-bit debugger, you end up with a register context for the 64-bit WoW64 process rather than the 32-bit one you probably care about.

This detects WoW64 by looking to see if there's a module named wow64.dll loaded. For such processes, it then looks in the 64-bit Thread Environment Block (TEB) to locate a copy of the 32-bit CONTEXT record that the plugin needs for the register context.

Added some rudimentary tests.  I'd like to improve these later once we figure out how to get the exception information from these mini dumps.

Differential Revision: http://reviews.llvm.org/D17465

llvm-svn: 261808
2016-02-25 00:23:27 +00:00
Zachary Turner cbb1bf983b xfail case sensitivity test on Linux.
There are two tests in this file.  One which only runs on Windows
and tests that you can set a breakpoint with mismatched case.  And
another that only runs on non-Windows and tests that you cannot set
a breakpoint with mismatched case.  This latter test is failing on
non Windows platforms for some reason.  It could be that the test
is just written incorrectly, as I think the actual functionality
actually works correctly on non-Windows platforms.

llvm-svn: 261800
2016-02-24 22:41:04 +00:00
Zachary Turner f5e9b047ed Update the website with lots of new info about building / testing.
llvm-svn: 261795
2016-02-24 22:19:23 +00:00
Zachary Turner 47c03462f5 Some fixes for case insensitive paths on Windows.
Paths on Windows are not case-sensitive.  Because of this, if a file
is called main.cpp, you should be able to set a breakpoint on it
by using the name Main.cpp.  In an ideal world, you could just
tell people to match the case, but in practice this can be a real
problem as it requires you to know whether the person who compiled
the program ran "clang++ main.cpp" or "clang++ Main.cpp", both of
which would work, regardless of what the file was actually called.

This fixes http://llvm.org/pr22667

Patch by Petr Hons

Differential Revision: http://reviews.llvm.org/D17492
Reviewed by: zturner

llvm-svn: 261771
2016-02-24 21:26:47 +00:00
Greg Clayton 6ae1a11d4d Removed unused functions.
llvm-svn: 261768
2016-02-24 20:47:13 +00:00
Aidan Dodds 577570b4a5 [Renderscript] Change expression strings to use portable format specifiers.
Mips64 tests were failing on windows because the sscanf implementation differs between clang/gcc/msvc such that on windows %lx specifies a 32bits parameter and %llx is for 64bits. For us this meant that 64bit pointers were being truncated to 32bits on their way into a JIT'd expression.

llvm-svn: 261741
2016-02-24 14:17:33 +00:00
Omair Javaid 92a8dedaaa Fix test for homogeneity in case of aggregate consisting of containerized vector types
Details can be found here:

Differential revision: http://reviews.llvm.org/D17501

llvm-svn: 261734
2016-02-24 12:17:43 +00:00
Chaoren Lin 74a1fc6f87 Fix TestCStrings for Linux with i386 inferiors.
Summary: Temporarily revert part of r261704.

Reviewers: spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17557

llvm-svn: 261718
2016-02-24 03:15:21 +00:00
Eugene Zelenko 3f18ea0e38 Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261716
2016-02-24 02:05:55 +00:00
Sean Callanan fed0e758cb When looking for symbols, find load addresses in a more robust way.
IRExecutionUnit previously replicated a bunch of logic that already
existed elsewhere for the purpose of getting a load address for a
symbol.  This approach failed to resolve certain types of symbols.
Instead, we now use functions on SymbolContext to do the address
resolution.

This is a cleanup of IRExecutionUnit::FindInSymbols, and also fixes a
latent bug where we looked at the wrong SymbolContext to determine
whether or not it is external.

<rdar://problem/24770829>

llvm-svn: 261704
2016-02-23 23:09:06 +00:00
Pavel Labath 605b51b84e Work around a stepping bug in arm64 android M
Summary:
On arm64, linux<=4.4 and Android<=M there is a bug, which prevents single-stepping from working when
the system comes back from suspend, because of incorrectly initialized CPUs. This did not really
affect Android<M, because it did not use software suspend, but it is a problem for M, which uses
suspend (doze) quite extensively.  Fortunately, it seems that the first CPU is not affected by
this bug, so this commit implements a workaround by forcing the inferior to execute on the first
cpu whenever we are doing single stepping.

While inside, I have moved the implementations of Resume() and SingleStep() to the thread class
(instead of process).

Reviewers: tberghammer, ovyalov

Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits

Differential Revision: http://reviews.llvm.org/D17509

llvm-svn: 261636
2016-02-23 13:56:30 +00:00
Pavel Labath 7326c01aaa [linux] Remove all traces of signalfd(2)
Summary:
Signalfd is not used in the code anymore, and given that the same functionality can be achieved
with the new MainLoop class, it's unlikely we will need it in the future. Remove all traces of
it.

Reviewers: tberghammer, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

Differential Revision: http://reviews.llvm.org/D17510

llvm-svn: 261631
2016-02-23 12:26:08 +00:00
Tamas Berghammer a97aaa9a4b XFAIL TestInlines for Linux with gcc
llvm-svn: 261630
2016-02-23 11:35:38 +00:00
Saleem Abdulrasool 7ccf1373ac RenderScript: silence some -Wmissing-brace warnings
Silence some -Wmissing-brace warnings on Linux with clang 3.7.

llvm-svn: 261612
2016-02-23 04:56:31 +00:00
Eugene Zelenko 49bcfd802e Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261602
2016-02-23 01:43:44 +00:00
Sean Callanan e47387fc12 Actually commit the test for r261598.
llvm-svn: 261599
2016-02-23 00:52:34 +00:00
Sean Callanan 99cb022400 Fixed a problem where the DWARF for inline functions was mis-parsed.
Inline functions in DWARF have AT_abstract_origin set, but we only handled that
if the functions were C++ methods.  Inline functions -- C or C++ -- have this
also, and as a result they got one FunctionDecl for each inlined instance.  When
going to construct the locals, this meant that the arguments (which did properly
have their abstract origins handled) would get associated with the master
FunctionDecl, and the inlined FunctionDecls would all appear to have no locals.

This manifested as not being able to look up local variables when stopped in an
inline fuunction.  We should have had a test for this, but somewhere along the
line the relevant test case lost its .py file (or it never had one).

This patch fixes this problem and restores the .py file.

<rdar://problem/24712434>

llvm-svn: 261598
2016-02-23 00:51:52 +00:00
Eugene Zelenko 6e3d8e7f06 Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectCommands.cpp; other minor fixes.
llvm-svn: 261593
2016-02-22 23:46:47 +00:00
Eugene Zelenko 435c2c9def Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectPlatform.cpp; other minor fixes.
Add missing break for permissions-string case.

llvm-svn: 261555
2016-02-22 19:02:01 +00:00
Aidan Dodds 933d8db922 Refactor GetSoftwareBreakpointTrapOpcode
This patch aims to reduce the code duplication among all of the platforms in GetSoftwareBreakpointTrapOpcode by pushing all common code into the Platform base class.

Differential Revision: http://reviews.llvm.org/D17395

llvm-svn: 261536
2016-02-22 17:29:56 +00:00
Pavel Labath f92d8db836 Mark TestMiBreak.test_lldbmi_break_insert_function_pending as flaky on linux
Test has become flaky again. Attempts to investigate the triggering commit have failed, so I
suspect it was flaky all along..

llvm-svn: 261519
2016-02-22 09:51:32 +00:00
Eugene Zelenko 26cac3af0b Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261389
2016-02-20 00:58:29 +00:00
Eugene Zelenko c8ecc2a9fa Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in some files in source/Commands; other minor fixes.
llvm-svn: 261356
2016-02-19 19:33:46 +00:00
Ed Maste 28cbb8616e Remove expectedFailureFreeBSD decorator
All invocations are updated to use the generic expectedFailureAll.

Differential Revision:	http://reviews.llvm.org/D17455

llvm-svn: 261355
2016-02-19 19:25:03 +00:00
Zachary Turner 41331afaef Don't use an atexit handler for cleaning up the temp directory.
Differential Revision: http://reviews.llvm.org/D17420

llvm-svn: 261353
2016-02-19 19:20:44 +00:00
Ewan Crawford 615a807ee8 refactor/cleanup ClangExpressionParser::Parse
This patches does the following:

+ fix return type: ClangExpressionParser::Parse returns unsigned, but was actually returning a signed value, num_errors.
+ use helper clang::TextDiagnosticBuffer::getNumErrors() instead of counting the errors ourself.
+ limit scoping of block-level automatic variables as much as practical.
+ remove reused multipurpose TextDiagnosticBuffer::const_iterator in favour of loop-scoped err, warn, and note variables in the diagnostic printing code.
+ refactor diagnostic printing loops to use a proper loop invariant.

Author: Luke Drummond <luke.drummond@codeplay.com>
Differential Revision: http://reviews.llvm.org/D17273

llvm-svn: 261345
2016-02-19 17:55:10 +00:00
Ed Maste 06977c799c Remove XFAIL from test passing on FreeBSD
There is a report in the PR from several months ago that it failed
intermittently, but it is passing consistently for me on FreeBSD 10
and 11.  We can re-add a decorator if further testing shows it is
still flakey.

llvm.org/pr17214

llvm-svn: 261340
2016-02-19 17:35:01 +00:00
Ed Maste 7a2e8b3691 Remove XFAIL from test passing on FreeBSD
This is passing for me consistently on FreeBSD 10 and FreeBSD 11.

llvm.org/pr15989

llvm-svn: 261339
2016-02-19 17:31:05 +00:00
Ed Maste 622ab96c85 Remove XFAIL from test passing on FreeBSD
Both Linux and FreeBSD had a comment "This needs to be root-caused."
It looks like the failure has been fixed on both, and the Linux XFAIL
decorator was removed in r233716 (Mar 2015).

llvm-svn: 261333
2016-02-19 16:58:08 +00:00
Ewan Crawford 766492fde3 Delete unused function in ClangExpressionParser
[git 65dafa83] introduced the GetBuiltinIncludePath function copied from cfe/lib/Driver/CC1Options.cpp

This function is no longer used in lldb's expression parser and I believe it is safe to remove it.


Author: Luke Drummond <luke.drummond@codeplay.com>
Differential Revision: http://reviews.llvm.org/D17266

llvm-svn: 261328
2016-02-19 14:31:41 +00:00
Tamas Berghammer 73bcca5b3d Stack unwinding emulation: handle adjustment of FP
This change is improving the instruction emulation based unwinding to
handle when the frame pointer is adjusted (increment/decrement) after
it has been initialized. The situation can occur in the prologue of
some function where FP is adjusted before it is copied back to SP.

Example code (thumb, generated by gcc 4.8):
< +0>: push  {r4, r7, lr}
< +2>: sub   sp, #0x14
< +4>: add   r7, sp, #0x0
...
<+50>: adds  r7, #0x14 ; The CL fixes the handling of this instruction
<+52>: mov   sp, r7    ; Previously unwinding from here was broken
<+54>: pop   {r4, r7, pc}

Differential revision: http://reviews.llvm.org/D17295

llvm-svn: 261318
2016-02-19 10:59:25 +00:00
Pavel Labath 1274474c64 Enable TestUnicodeLiterals
Test should work everywhere except windows now.

llvm-svn: 261314
2016-02-19 10:36:38 +00:00
Pavel Labath b3b8fd3b00 Mark TestLldbGdbServer.test_software_breakpoint_set_and_remove_work_llgs as flaky on linux
The problem is the asynchronous arrival of inferior stdio (pr25652).

llvm-svn: 261313
2016-02-19 10:36:31 +00:00
Jason Molenda 878ae01889 This patch stops lldb from loading a .lldbinit file from the current
working directory by default -- a typical security problem that we
need to be more conservative about.

It adds a new target setting, target.load-cwd-lldbinit which may
be true (always read $cwd/.lldbinit), false (never read $cwd/.lldbinit)
or warn (warn if there is a $cwd/.lldbinit and don't read it).  The
default is set to warn.  If this is met with unhappiness, we can look
at changing the default to true (to match current behavior) on a 
different platform.

This does not affect reading of ~/.lldbinit - that will still be read,
as before.  If you run lldb in your home directory, it will not warn
about the presence of a .lldbinit file there.

I had to add two SB API - SBHostOS::GetUserHomeDirectory and 
SBFileSpec::AppendPathComponent - for the lldb driver code to be
able to get the home directory path in an OS neutral manner.

The warning text is

There is a .lldbinit file in the current directory which is not being read.
To silence this warning without sourcing in the local .lldbinit,
add the following to the lldbinit file in your home directory:
    settings set target.load-cwd-lldbinit false
To allow lldb to source .lldbinit files in the current working directory,
set the value of this variable to true.  Only do so if you understand and
accept the security risk.

<rdar://problem/24199163> 

llvm-svn: 261280
2016-02-19 00:05:17 +00:00
Jim Ingham 7b71c0ba6c Make sure code that is in the middle of figuring out the correct architecture
on attach uses the architecture it has figured out, rather than the Target's
architecture, which may not have been updated to the correct value yet.

<rdar://problem/24632895>

llvm-svn: 261279
2016-02-18 23:58:45 +00:00
Eugene Zelenko 9e85e5a8c9 Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in source/Commands/CommandObjectBreakpoint.cpp; other minor fixes.
llvm-svn: 261272
2016-02-18 22:39:14 +00:00
Ed Maste 88980d051a Remove expectedFlakeyFreeBSD decorator for prompt setting
The race condition/use after free involved in setting long prompts
appears to be fixed now (although I do not know which commit fixed it).

llvm.org/pr22611

llvm-svn: 261266
2016-02-18 21:38:24 +00:00
Enrico Granata c525d3d4c7 Fix a typo in FormatCache.cpp such that the cache would potentially return an invalid format in some cases
llvm-svn: 261246
2016-02-18 19:23:52 +00:00
Eugene Zelenko d70a6e71a9 Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Target; other minor fixes.
llvm-svn: 261242
2016-02-18 18:52:47 +00:00