Commit Graph

12745 Commits

Author SHA1 Message Date
Zachary Turner f2be3dfd81 Teach CMake to find versions of Python != 2.7
llvm-svn: 249466
2015-10-06 21:11:15 +00:00
Ryan Brown 2b56f86dab Add missing GoLanguageRuntime files.
llvm-svn: 249459
2015-10-06 20:31:08 +00:00
Ryan Brown 07a1c459f2 Create GoLanguageRuntime.
GoLanguageRuntime supports finding the runtime type for Go interfaces.

llvm-svn: 249456
2015-10-06 20:29:31 +00:00
Bruce Mitchener 39eb9de757 Remove GetShortPluginName.
Summary: This was deprecated and removed.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 249452
2015-10-06 20:15:27 +00:00
Todd Fiala 9f23680a16 Bungled my last change in a tweak.
I took out a skip_test check that wasn't necessary, but
didn't fully yank it out.  Would break a normal go install.

llvm-svn: 249448
2015-10-06 19:23:22 +00:00
Todd Fiala be5dfc5065 Address failing Go tests on go version from Ubuntu 14.04
Go tests fail on Ubuntu 14.04's go1.2.1.  This change puts a minimum
go version in the skipUnlessGoInstalled() decorator of go1.3.0.
Go maintainers are encouraged to modify as needed.  For now this fixes
failing tests on Ubuntu 14.04 x86_64 buildbots with stock distro go installed.

llvm-svn: 249446
2015-10-06 19:15:56 +00:00
Stephane Sezer d16d6c0046 Fix Darwin build of lldb-server.
Summary: We were missing the symbol for the version number.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 249434
2015-10-06 18:03:04 +00:00
Enrico Granata 4edfef454d Create a logging category that is specific to data formatters activity
llvm-svn: 249433
2015-10-06 17:55:14 +00:00
Todd Fiala 873111ec10 Convert expectedFlakeyDarwin to expectedFlakeyDsym for TestCallUserDefinedFunction.py
Closes:
https://llvm.org/bugs/show_bug.cgi?id=25076

llvm-svn: 249425
2015-10-06 15:57:55 +00:00
Todd Fiala 5c3cc83b26 Reduce load on TestMultipleDebuggers.
4-core CPUs have a hard time keeping up with the number of debuggers
we were simultaneously spawning.  This leads to a timeout, which
leaves processes hanging around in "suspended mode", which can't be
killed with signals.

llvm-svn: 249421
2015-10-06 15:33:51 +00:00
Todd Fiala 0f247a479e Switching TestCallUserDefinedFunction from xfail to flaky on OS X.
This is passing 50/50 times for me.  Moving to flaky as precautionary
measure.

llvm-svn: 249419
2015-10-06 15:23:52 +00:00
Tamas Berghammer 63e6bd3687 Rename a test case to avoid name conflict
Rename the python source file for DataFormatterOSTypeTestCase to match
the purpose of the test and to avoid a name conflict with
DataFormatterBoolRefPtr. The name conflict caused a race condition in
the test runner what we have to address separately.

llvm-svn: 249407
2015-10-06 14:39:05 +00:00
Bruce Mitchener b810314825 Fix virtual/override warnings in new MIPS code.
Reviewers: bhushan, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 249405
2015-10-06 14:19:32 +00:00
Bruce Mitchener eb284e4667 Fix segmentation fault in lldb_private::Symbols::LocateExecutableSymbolFile()
Summary:
When `module_spec.GetFileSpec().GetDirectory().AsCString()` returned a `nullptr` this line caused a segmentation fault:

`std::string module_directory = module_spec.GetFileSpec().GetDirectory().AsCString()`

Some context:
I was remote debugging an executable built with Clang in an Ubuntu VM on my Windows machine using lldb-mi. I copied the executable and nothing else from the Ubuntu VM to the Windows machine.

Then started lldb-server in the Ubuntu VM:

```
./bin/lldb-server gdbserver *:8888 -- /home/enlight/Projects/dbgmits/build/Debug/data_tests_target
```

And ran `lldb-mi --interpreter` on Windows with the following commands:

```
-file-exec-and-symbols C:\Projects\data_tests_target
-target-select remote 192.168.56.101:8888
-exec-continue

```

After which the segmentation fault occurred at the aforementioned line. Inside this method `module_spec.GetFileSpec()` returns an empty `FileSpec` (no dir, no filename), while `module_spec.GetSymbolFileSpec().GetFilename()` returns `"libc-2.19.so"`.

Patch thanks to Vadim Macagon.

Reviewers: brucem, zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 249387
2015-10-06 10:17:34 +00:00
Bhushan D. Attarde f55a0a47cf [MIPS] Emulate microMIPS instructions
SUMMARY:
    This patch includes:

    1. Emulation of prologue/epilogue and branch instructions for microMIPS.
    2. Setting up alternate disassembler (to be used for microMIPS).
       So there will be two disassembler instances, one for microMIPS and other for MIPS.
       Appropriate disassembler will be used based on the address class of instruction address.

    3. Some of the branch instructions does not have fixed sized delay slot, that means delay slot instruction can be of 2-byte or 4-byte.
       For this "m_next_inst_size" has been introduced which stores the size of next instruction (i.e size of delay slot instruction in case of branch).
       This can be used wherever the size of next instruction is required.

    4. A minor change to use mips32 register names instead of mips64 names.
    
    Reviewers: clayborg, tberghammer
    Subscribers: mohit.bhakkad, sagar, jaydeep, nitesh.jain, lldb-commits
    Differential Revision: http://reviews.llvm.org/D13282 

llvm-svn: 249381
2015-10-06 08:52:08 +00:00
Ewan Crawford 15f2bd9549 RenderScript command for printing allocation information
This patch adds a new command 'language renderscript allocation list' for printing the details of all loaded RS allocations.

In order to work out this information lldb JITs the runtime for the data it wants.
This has a penalty of a couple seconds latency, so is only done once for each allocation and the results cached.

If the user later wants to recalculate this information however, they can force lldb to do so with the --refresh flag.


Reviewed by: jingham, clayborg
Subscribers: lldb-commits, ADodds, domipheus, dean, tberghammer, danalbert, srhines 
Differential Revision: http://reviews.llvm.org/D13247

llvm-svn: 249380
2015-10-06 08:42:32 +00:00
Abhishek Aggarwal 2f00005cd7 Bug 25050: X87 FPU Special Purpose Registers
Summary:
  - For x86_64-FreeBSD Platform:
    -- LLDB now provides correct values of X87 FPU
       Special Purpose Registers like fstat, ftag, fctrl etc..

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

Reviewers: emaste, mikesart, clayborg

Subscribers: emaste

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

llvm-svn: 249379
2015-10-06 07:04:03 +00:00
Mohit K. Bhakkad acdff168e2 [LLDB][MIPS] Fix hit_count for mips watchpoints
Reviewers: clayborg, jingham.
Subscribers: jaydeep, bhushan, dsanders, sagar, nitesh.jain, zturner, jasonmolenda, lldb-commits.
Differential Revision: http://reviews.llvm.org/D13241

llvm-svn: 249377
2015-10-06 05:25:17 +00:00
Enrico Granata 8a9a8f3940 Introduce a FormattersMatchData class which contains all the information that data formatters need in one place, and also allows for lazy computation of expensive chunks of information if need be
This is a NFC commit that is essentially plumbing the new currency through the system

llvm-svn: 249366
2015-10-06 01:02:47 +00:00
Greg Clayton b3788eaf99 SBTarget::Attach(SBAttachInfo &) was changed to not be asynchronous back in February and this affected Xcode's abililty to cancel an attach to process by name.
Added the ability to specify if an attach by name should be synchronous or not in SBAttachInfo and ProcessAttachInfo.

<rdar://problem/22821480>

llvm-svn: 249361
2015-10-05 22:58:37 +00:00
Mohit K. Bhakkad 72207b167c [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPS
Reviewers: jaydeep.
Subscribers: lldb-commits.
Differential Revision: http://reviews.llvm.org/D13335

llvm-svn: 249299
2015-10-05 10:56:19 +00:00
Todd Fiala 65b9056f3d cmake: ensure readline python module target is added before finishing swig.
When the readline target exists (only for non-Android Linux currently),
ensure that target is made a dependency of the finish_swig python-wrap-up
steps.  This ensures it is built when building the lldb target.

Fixes:
https://llvm.org/bugs/show_bug.cgi?id=25038

llvm-svn: 249256
2015-10-04 01:28:51 +00:00
Sean Callanan 9fda9d2177 Add PersistentVariableDelegate to handle language-specific dematerialization.
The concept here is that languages may have different ways of communicating
results.  In particular, languages may have different names for their result
variables and in fact may have multiple types of result variables (e.g.,
error results).  Materializer was tied to one specific model of result handling.

Instead, now UserExpressions can register their own handlers for the result
variables they inject.  This allows language-specific code in Materializer to
be moved into the expression parser plug-in, and it simplifies Materializer.
These delegates are subclasses of PersistentVariableDelegate.

PersistentVariableDelegate can provide the name of the result variable, and is
notified when the result variable is populated.  It can also be used to touch
persistent variables if need be, updating language-specific state.  The
UserExpression owns the delegate and can decide on its result based on
consulting all of its (potentially multiple) delegates.

The user expression itself now makes the determination of what the final result
of the expression is, rather than relying on the Materializer, and I've added a
virtual function to UserExpression to allow this.

llvm-svn: 249233
2015-10-03 09:09:01 +00:00
Enrico Granata bd0998a1be Do not attempt to join the remote paths if none exist
llvm-svn: 249210
2015-10-02 22:53:32 +00:00
Zachary Turner 25b9ced0ed Re-disable TestBuiltinTrap on Windows.
This was inadvertently re-enabled as a in r248883.

llvm-svn: 249209
2015-10-02 22:47:37 +00:00
Zachary Turner a259116513 Updated xfail / skip status on a few tests.
TestDiamond and TestSBValueCast were due to a bug in clang.  That
bug has been fixed, so xfail is removed.  However fixing that bug
exposed another bug in clang, which is not yet fixed.  That bug
causes one test to start crashing, and another to fail unexpectedly
so the status of those tests is updated as well.

llvm-svn: 249208
2015-10-02 22:47:28 +00:00
Zachary Turner 89a7938291 Remove instance reference of static member function.
llvm-svn: 249207
2015-10-02 22:47:14 +00:00
Zachary Turner 6c3c0ed539 Have a clean(er) shutdown when detaching from a process.
llvm-svn: 249206
2015-10-02 22:47:04 +00:00
Oleksiy Vyalov a1733984f2 Fix TestCompDirSymLink.py - remove existing symlink leftovers if previous test run
was terminated (e.g., due timeout).

llvm-svn: 249203
2015-10-02 22:37:55 +00:00
Enrico Granata 6b2ed8bdca Fix the CMake build
llvm-svn: 249189
2015-10-02 21:14:38 +00:00
Enrico Granata 7de855c6d9 Add hooks that enable NSSet, NSDictionary and NSString formatting to apply to other types beyond the well-known ones
This is meant to support languages that can do some sort of bridging from<-->to these ObjC types via types that statically vend themselves as Cocoa types, but dynamically have an implementation that does not match any of our well-known types, but where an introspecting formatter can be vended by the bridged language

llvm-svn: 249185
2015-10-02 20:59:58 +00:00
Todd Fiala ae5dee8031 Fix race on subprocess.Popen return values.
This fixes:
https://llvm.org/bugs/show_bug.cgi?id=25019

llvm-svn: 249182
2015-10-02 20:51:11 +00:00
Sean Callanan a994b0b273 Made GetScratchTypeSystemForLanguage return an error if desired.
Also made it not store nullptrs in its TypeSystemMap, so it will retry to make
the AST context if it errored out last time.

llvm-svn: 249167
2015-10-02 18:40:30 +00:00
Tamas Berghammer b285e9e0d2 Change expected stop reason in TestInferiorAssert for Android API <= 16
llvm-svn: 249120
2015-10-02 12:00:04 +00:00
Tamas Berghammer f5ead561b3 Fix several issues around .ARM.exidx section handling
* Use .ARM.exidx as a fallback unwind plan for non-call site when the
  instruction emulation based unwind failed.
* Work around an old compiler issue where the compiler isn't sort the
  entries in .ARM.exidx based on their address.
* Fix unwind info parsing when the virtual file address >= 0x80000000
* Fix bug in unwind info parsing when neither lr nor pc is explicitly
  restored.

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

llvm-svn: 249119
2015-10-02 11:58:26 +00:00
Enrico Granata 72d8a72241 Teach 'type lookup' to pull types from clang modules; also add a test case
llvm-svn: 249117
2015-10-02 01:23:11 +00:00
Sean Callanan 9301ec1191 Eliminated redundant "constructors" for ClangExpressionVariable.
The ClangExpressionVariable::CreateVariableInList functions looked cute, but                                                                                                                                           
caused more confusion than they solved.  I removed them, and instead made sure                                                                                                                                         
that there are adequate facilities for easily adding newly-constructed                                                                                                                                                 
ExpressionVariables to lists.      

I also made some of the constructors that are common be generic, so that it's
possible to construct expression variables from generic places (like the ABI and
ValueObject) without having to know the specifics about the class.

llvm-svn: 249095
2015-10-01 23:07:06 +00:00
Dawn Perchik 8587212085 [lldb-mi] Add support for StopAtEntry in MI via "-exec-run --start".
This patch adds a --start option to the lldb-mi -exec-run command for
getting process stopped at entry point after launch.  It is equivelent
to the -s option in the lldb command line interpreter:
    process launch -s
and is therefore not supported on all hosts and/or targets.  To check
if the --start option is supported, see if the corresponding feature
"exec-run-start-option" is in the list of options reported by the lldb-mi
"-list-features" command.

Patch from engineer.developer@gmail.com (Kirill Lapshin)
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12977

llvm-svn: 249072
2015-10-01 21:15:43 +00:00
Oleksiy Vyalov af87713a81 Fix Android build after r249047.
llvm-svn: 249055
2015-10-01 19:08:00 +00:00
Enrico Granata 9b0af1b86f Add a 'type lookup' command. This command is meant to look up type information by name in a language-specific way.
Currently, it only supports Objective-C - C++ types can be looked up through debug info via 'image lookup -t', whereas ObjC types via this command are looked up by runtime introspection

This behavior is in line with type lookup's behavior in Xcode 7, but I am definitely open to feedback as to what makes the most sense here

llvm-svn: 249047
2015-10-01 18:16:18 +00:00
Oleksiy Vyalov d21ca280cb Use %HOME%/.lldb/module_cache as a default module cache directory.
http://reviews.llvm.org/D13323

llvm-svn: 249040
2015-10-01 17:48:57 +00:00
Sean Callanan 1ab1ee7620 Removed a mutex guard that I accidentally pasted in from other code.
It was causing deadlocks when stepping out.

llvm-svn: 249039
2015-10-01 17:48:25 +00:00
Sean Callanan b92bd7538e Made Target hold a map of languages to TypeSystems, and added some accessors.
Also added some target-level search functions so that persistent variables and
symbols can be searched for without hand-iterating across the map of
TypeSystems.

llvm-svn: 249027
2015-10-01 16:28:02 +00:00
Sagar Thakur 2ee26ee37b Romove accidentially added statement in r249020
llvm-svn: 249021
2015-10-01 15:15:42 +00:00
Sagar Thakur b8862c0107 [LLDB][MIPS] Fix gp register value for o32 applications on 64-bit target
GP registers for o32 applications were always giving zero value because SetType() on the RegisterValue was causing the accessor functions to pickup the value from m_scalar of RegisterValue which is zero.
In this patch byte size and byte order of register value is set at the time of setting the value of the register.

llvm-svn: 249020
2015-10-01 15:05:31 +00:00
Tamas Berghammer 3e8947be91 Fix Android-SDK detection on API 10 device
Run the getprop command with AdbClient::Shell instead of
Platform::RunShellCommand because getting the output from getprop
with Platform::RunShellCommand have some (currently unknown) issues.

llvm-svn: 249014
2015-10-01 13:58:01 +00:00
Tamas Berghammer 76011b63cd Fix breakpoint opcode calculation on Linux
Change the way we detect if we have to place a thumb breakpoint instead
of an arm breakpoint in the case when no symbol table or mapping symbols
are available. Detect it based on the LSB of the FileAddress instead of
the LSB of the LoadAddress because the LSB of the LoadAddress is already
masked out.

llvm-svn: 249013
2015-10-01 13:57:57 +00:00
Tamas Berghammer 3c47151d1a Restrict the scope of a hack in DYLDRendezvous
The hack is there to work around an incorrect load address reported
by the android linker on API 21 and 22 devices. This CL restricts the
hack to those android API levels.

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

llvm-svn: 249012
2015-10-01 13:57:54 +00:00
Tamas Berghammer 539cd118b2 Trim the output of mktem in PlatformAndroid::DownloadSymbolFile
Differential revision: http://reviews.llvm.org/D13293

llvm-svn: 248998
2015-10-01 09:42:23 +00:00
Pavel Labath 746ffd6980 Revert "Fixing a subtle issue on Mac OS X systems with dSYMs..."
This reverts commit r248985, as it was breaking all remote
expression-evaluating tests (on android at least).

llvm-svn: 248995
2015-10-01 09:03:33 +00:00