Commit Graph

7525 Commits

Author SHA1 Message Date
Greg Clayton ea4a5bb8bb Check for null compile unit so we don't crash.
llvm-svn: 246887
2015-09-04 22:29:46 +00:00
Enrico Granata 964211f25f Add a --language (-l) option to type category {enable|disable} to allow people to turn on and off formatters for a given language
llvm-svn: 246884
2015-09-04 22:07:48 +00:00
Enrico Granata c6bbb8b69a Never mind, I see what the problem is on the Windows build. Attempt a fix
llvm-svn: 246876
2015-09-04 21:22:54 +00:00
Enrico Granata 33e97e63a5 Move the C++ data formatters to the C++ language plugin
llvm-svn: 246873
2015-09-04 21:01:18 +00:00
Sean Callanan bc8ac34e61 This patch separates the generic portion of ClangExpressionVariable, which
stores information about a variable that different parts of LLDB use, from the
compiler-specific portion that only the expression parser cares about.

http://reviews.llvm.org/D12602

llvm-svn: 246871
2015-09-04 20:49:51 +00:00
Hafiz Abid Qadeer 23a4df27ab Use correct #ifdef check for ProcessWindowsLog::Terminate() call.
The call to ProcessWindowsLog::Initialize() is protected by #if defined(_MSC_VER).
But the call to ProcessWindowsLog::Terminate() was using __WIN32__. This commit
makes it use _MSC_VER too.

Committing as it seems obvious change.

llvm-svn: 246859
2015-09-04 16:34:19 +00:00
Tamas Berghammer 980662ee9d Fix TestLoadUnload.test_load_unload for android API > 21
* Change Module::MatchesModuleSpec to return true in case the file spec
  in the specified module spec matches with the platform file spec, but
  not with the local file spec
* Change the module_resolver used when resolving a remote shared module
  to always set the platform file spec to the file spec requested

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

llvm-svn: 246852
2015-09-04 12:42:41 +00:00
Pavel Labath a04668ff34 Move GetOptInc to the common namespace
Summary:
GetOptInc provides getopt(), getopt_long() and getopt_long_only().

Windows (for defined(_MSC_VER)) doesn't ship with all of the getopt(3) family members and needs all of them. NetBSD requires only getopt_long_only(3).

While there fix the code for clang diagnostics.

Author: Kamil Rytarowski

Reviewers: joerg

Subscribers: labath, zturner, lldb-commits

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

llvm-svn: 246843
2015-09-04 09:06:15 +00:00
Ewan Crawford 9815658332 RenderScript pending kernel breakpoints.
Currently the RS breakpoint command can only find a kernel if it's in an already loaded RS module.
This patch allows users to set pending breakpoints on RenderScript kernels which will be loaded in the future.
Implemented by creating a RS breakpoint resolver, to limit search scope to only RS modules.

Reviewed by: clayborg, jingham
Subscribers: lldb-commits, ADodds, domipheus
Differential Revision: http://reviews.llvm.org/D12360

llvm-svn: 246842
2015-09-04 08:56:52 +00:00
Abhishek Aggarwal 2cf87a895d SysV ABI for i386 Architecture
Summary:
  - Capability to force return user specified values
    from inside of a function on lldb command terminal

  - Support for Integral, Pointer and Floating Point values

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: jingham, clayborg

Subscribers: tberghammer

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

llvm-svn: 246841
2015-09-04 07:44:05 +00:00
Jason Molenda 125adcf0aa Change the (internal to this file only) enum names from gcc_ to
ehframe_ & from gdb_ to stabs_ for clarity.

Also document the fact that i386 eh_frame on Darwin has the register
numbers swapped for ebp/esp from the DWARF register numbers so no one
copies these defines for other i386 ABI plugins.  This bug only ever
existed on Darwin.

No code changes, just renaming variables.

llvm-svn: 246834
2015-09-04 03:40:29 +00:00
Dawn Perchik 009d110de4 Set the default language to use when evaluating to that of the frame's CU.
* Use the frame's context (instead of just the target's) when evaluating,
  so that the language of the frame's CU can be used to select the
  compiler and/or compiler options to use when parsing the expression.
  This allows for modules built with mixed languages to be parsed in
  the context of their frame. 
* Add all C and C++ language variants when determining the language options
  to set.
* Enable C++ language options when language is C or ObjC as a workaround since
  the expression parser uses features of C++ to capture values.
* Enable ObjC language options when language is C++ as a workaround for ObjC
  requirements.
* Disable C++11 language options when language is C++03.
* Add test TestMixedLanguages.py to check that the language being used
  for evaluation is that of the frame.
* Fix test TestExprOptions.py to check for C++11 instead of C++ since C++ has
  to be enabled for C, and remove redundant expr --language test for ObjC.
* Fix TestPersistentPtrUpdate.py to not require C++11 in C.

Reviewed by: clayborg, spyffe, jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11102

llvm-svn: 246829
2015-09-04 01:02:30 +00:00
Enrico Granata 419d79189f Nuke CXXFormatterFunctions.cpp - split the contents of it across different files, so that things are better organized along the C++/ObjC line
This is preparatory work for moving these formatters into language categories

llvm-svn: 246827
2015-09-04 00:33:51 +00:00
Bruce Mitchener 3921fc7de7 Only export public symbols with the cmake build.
Summary:
This also moves the xcode support files to be near or the same
as the ones used for cmake.

The source/API/liblldb.xcodes.exports differs from the
source/API/liblldb.exports in that one contains the actual
symbol names (_ prefixed) while the other contains the symbol
names as they are in the code. The liblldb.exports file is
preprocessed by the cmake scripts into the correct per-platform
file needed (like a linker script on Linux).

This is not enabled on Windows as Windows doesn't use the same
name mangling and so it won't be valid there. Also, this is handled
already in a different way on Windows (via dll exports).

Reviewers: emaste, clayborg, labath, chaoren

Subscribers: lldb-commits

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

llvm-svn: 246822
2015-09-04 00:00:41 +00:00
Bruce Mitchener cfe7d6c486 SystemRuntime/MacOSX no longer need ObjCRuntime header.
Summary:
The AppleGetQueuesHandler code no longer needs to include a header
from the AppleObjCRuntime, so we can remove workarounds that were
present in the build systems.

Reviewers: clayborg, jasonmolenda

Subscribers: lldb-commits

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

llvm-svn: 246821
2015-09-03 23:57:09 +00:00
Siva Chandra 0f4873d7d0 Lookup function using full name if one with mangled name is not found.
Summary:
Remove expected failure decorators from tests which now should start
passing.

Reviewers: clayborg, spyffe

Subscribers: lldb-commits

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

llvm-svn: 246820
2015-09-03 23:27:10 +00:00
Stephane Sezer 5506a1d96e NetBSD ships with paccept(2), a superset of accept4(2)
Summary: accept4(2) and paccept(2) are nonstandard extensions.

Reviewers: joerg, sas

Subscribers: emaste, sas, lldb-commits

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

Change by Kamil Rytarowski <n54@gmx.com>

llvm-svn: 246787
2015-09-03 17:11:31 +00:00
Pavel Labath ea3fb8e378 Fix logging message
llvm-svn: 246776
2015-09-03 15:44:14 +00:00
Pavel Labath 5055685cda Fix deadlock while attaching to inferiors
Summary:
There was a race condition in the AsyncThread, where we would end up sending a vAttach
notification to the thread before it got a chance set up its listener (this can be reproduced by
adding a sleep() at the very beginning of ProcessGDBRemote::AsyncThread()). This event would then
get lost and we LLDB would deadlock. I fix this by setting up the listener early on, in the
ProcessGDBRemote constructor.

This should improve the stability of all attach tests. For now, I am removing XTIMEOUT from
TestAttachResume, and will watch the buildbots for signs of trouble.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 246756
2015-09-03 09:36:22 +00:00
Pavel Labath a9a43373e1 Fix rare failure in TestProcessIO
Summary:
There was a race condition in Process class, where we would not wait for process stdout to
propagate fully before we would shut down the connection (repro case: slow down the stdio thread
by placing a sleep right at the end of the while loop in Communication::ReadThread). The Process
class already tried to solve this problem by synchronizing with the read thread in
Process::ShouldBroadcastEvent, but unfortunately the connection got closed before that in
Process::SetExitStatus. I solve this issue by delaying the connection shutdown until we get a
chance to process the event and synchronize. Alternatively, I could have moved the
synchronization point to an earlier point in SetExitStatus, but it seems safer to delay the
shutdown until other things get a chance to notice the process has exited.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 246753
2015-09-03 09:30:17 +00:00
Bruce Mitchener db25a7a245 [cmake] Remove LLVM_NO_RTTI.
Summary:
This doesn't exist in other LLVM projects any longer and doesn't
do anything.

Reviewers: chaoren, labath

Subscribers: emaste, tberghammer, lldb-commits, danalbert

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

llvm-svn: 246749
2015-09-03 08:46:55 +00:00
Bruce Mitchener 49948af9cd Fix cmake build.
llvm-svn: 246746
2015-09-03 04:17:57 +00:00
Sagar Thakur 66089382d9 [MIPS64] Emulate MSA branch instructions
This patch adds MSA branch instruction emulation for MIPS64.

Reviewers: tberghammer, jaydeep
Subscribers: tberghammer, lldb-commits, nitesh.jain, mohit.bhakkad (Mohit Bhakkad), bhushan (Bhushan Attarde)
Differential: http://reviews.llvm.org/D12356
llvm-svn: 246745
2015-09-03 03:57:44 +00:00
Jim Ingham 0d5a2bd6f7 Purge a few places where *LanguageRuntime.h was being used when it
wasn't needed.

llvm-svn: 246744
2015-09-03 01:40:51 +00:00
Enrico Granata d87cc31960 CXXFormatterFunctions.{h|cpp} is not a good thing to have around, so start splitting stuff in different files in preparation for removing it and factoring formatters to the plugins where they belong
llvm-svn: 246743
2015-09-03 01:29:42 +00:00
Jim Ingham 59365b0ba6 Remove the list of all languages in the help for "help language" since
almost all the elements on the list can't actually be passed to the language
command and all the ones that can have already been listed in the subcommands 
list.

<rdar://problem/22551082>

llvm-svn: 246740
2015-09-03 01:13:26 +00:00
Sean Callanan 30e339749f Jim told me about a cleaner way to include headers from plug-ins.
This is still something I need to fix, but at least it's not so ugly, and it's
consistent with the other code that does that so we will catch it when we purge
all such code.

llvm-svn: 246738
2015-09-03 00:48:23 +00:00
Sean Callanan e33724f371 In preparation for factoring persistent variables into a generic part and a
Clang-specific part, create the ExpressionVariable source/header file and
move ClangExpressionVariable into the Clang expression parser plugin.

It is expected that there are some ugly #include paths... these will be resolved
by either (1) making that code use generic expression variables (once they're
separated appropriately) or (2) moving that code into a plug-in, often
the expression parser plug-in.

llvm-svn: 246737
2015-09-03 00:35:46 +00:00
Jim Ingham e90dc827e0 Fix ObjCLanguage::MethodName::GetCategory after r246616; I was just moving things around too fast...
llvm-svn: 246736
2015-09-03 00:03:13 +00:00
Zachary Turner 022c3c85df When redirecting stdio, use FILE_SHARE_DELETE.
Some tests were failing because the test would try to delete the
file before inferior had exited, but on Windows this will fail by
default unless you specify FILE_SHARE_DELETE when opening the file.

Can't think of a good reason not to do this, so here it is.

llvm-svn: 246682
2015-09-02 17:59:19 +00:00
Zachary Turner 12004ebe2f Try to fix FreeBSD build.
llvm-svn: 246672
2015-09-02 16:47:47 +00:00
Sean Callanan ecb17985c5 Removed comments that suggested that asserts in the ClangASTImporter should be
debug-only.  This is not the case; when they fire we are about to crash or do
something horrible anyway, so they should stay in.

llvm-svn: 246667
2015-09-02 16:40:59 +00:00
Sean Callanan 4a2a71fbe4 Improved logging for deported types in the ClangASTImporter.
llvm-svn: 246666
2015-09-02 16:39:23 +00:00
Tamas Berghammer c17469bb88 Only create alternative thumb disassembler if the main one is arm
This fixes a regression caused by r245645 where creating alternative
thumb disassembler was enabled even when the main disassembler is
already thumb.

llvm-svn: 246649
2015-09-02 13:31:18 +00:00
Tamas Berghammer ff417efa1d Fix arm disassambler with specifying armv8.1a architecture
If no architecture is defined for the disassambler command then it uses
the architecture of the target. In case of arm it will be "arm" what is
treated as the oldest arm version by the LLVM disassambler causing a lot
of invalid opcode in the output.

This change forces the use of "armv8.1a" (the newest arm architecture) if
no sub architecure was specified (either by the user or by the target) to
disassamble all instruction.

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

llvm-svn: 246648
2015-09-02 13:24:50 +00:00
Tamas Berghammer 89d3f090b2 Fix tab completion for command arguments containing spaces
If a command argument contains a space then it have to be escaped with
backslash signs so the argument parsing logic can parse it properly.
This CL fixes the tab completion code for the arguments to create
complitions with correctly escaped strings.

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

llvm-svn: 246639
2015-09-02 10:35:27 +00:00
Pavel Labath 1fb7e202d9 Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards
patch by Eugene Zelenko.

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

llvm-svn: 246628
2015-09-02 09:33:09 +00:00
Jim Ingham aa816b8f3b Move more functionality from the LanguageRuntimes to the Languages.
llvm-svn: 246616
2015-09-02 01:59:14 +00:00
Enrico Granata 28b3831e39 Add a Language::ForAllLanguages helper function
llvm-svn: 246614
2015-09-02 01:31:10 +00:00
Enrico Granata 578c8a7841 Use Language::LanguageIsCPlusPlus instead of doing the same switch over language
llvm-svn: 246613
2015-09-02 01:28:24 +00:00
Enrico Granata df7e79e646 Move the functions that FormatManager uses to actually load formatters into their own file
These are useful helpers over the low-level API of the FormattersContainer, and since we're actually going to start moving formatters into plugins, it makes sense to simplify things

llvm-svn: 246612
2015-09-02 01:21:31 +00:00
Jim Ingham 0e0984eebb Move things from the LanguageRuntime that obviously belong in the new Language plugin instead.
llvm-svn: 246611
2015-09-02 01:06:46 +00:00
Bruce Mitchener e8433cc179 Simplify find_first_of & find_last_of on single char.
Summary:
When calling find_first_of and find_last_of on a single character,
we can instead just call find / rfind and make our intent more
clear.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 246609
2015-09-01 23:57:17 +00:00
Bruce Mitchener 11deaae8a1 Remove ABIMacOSX_i386::PrepareNormalCall().
Summary:
This was removed from the other ABI plugins long ago. This removes
a warning that was happening in this unused code as a result of
adding 2 new types to Scalar.h (e_uint128 and e_sint128).

Reviewers: clayborg

Subscribers: llvm-commits

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

llvm-svn: 246608
2015-09-01 23:51:30 +00:00
Jim Ingham 5a3bb64fca Fix ProcessKDP.cpp for the change in r246578.
llvm-svn: 246601
2015-09-01 22:56:59 +00:00
Enrico Granata b6f8ca152a std::initializer_list is not safe to return from a function, as copies are not guaranteed to extend the lifetime of the underlying storage
llvm-svn: 246597
2015-09-01 22:24:35 +00:00
Enrico Granata 45a98fffa5 Add logging to a couple of regions of code
llvm-svn: 246580
2015-09-01 20:11:13 +00:00
Zachary Turner 1d397bfe40 Make ProcessWindows not create a strong reference to itself.
llvm-svn: 246579
2015-09-01 20:02:44 +00:00
Zachary Turner 7529df9abd Have the Process hold a weak_ptr to the Target.
llvm-svn: 246578
2015-09-01 20:02:29 +00:00
Oleksiy Vyalov e7eabbb550 Make remote-android platform to use dynamic local tcp ports when forwarding device ports.
http://reviews.llvm.org/D12510

llvm-svn: 246574
2015-09-01 19:02:14 +00:00