Commit Graph

12768 Commits

Author SHA1 Message Date
Greg Clayton 37191a2c2d Fixed up some first responder issues and added menubar support that isn't in use yet.
llvm-svn: 249600
2015-10-07 20:00:28 +00:00
Dawn Perchik 74b8f4cbdf [lldb-mi] Fix evaluation of strings containing characters from non-ascii range
If a string contained characters outside the ASCII range, lldb-mi would
print them as hexadecimal codes.  This patch fixes this behaviour by
converting to UTF-8 instead, by having lldb-mi use registered type
summary providers, when they are available.  This patch also fixes
incorrect evaluation of some composite types, like std::string, by
having them use a type registered type summary provider.

Based on patch from evgeny.leviant@gmail.com
Reviewed by: ki.stfu, granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13058

llvm-svn: 249597
2015-10-07 19:55:33 +00:00
Enrico Granata 675f49bbd5 This is the work I was building up to with my patches yesterday
Introduce the notion of Language-based formatter prefix/suffix
This is meant for languages that share certain data types but present them in syntatically different ways, such that LLDB can now have language-based awareness of which of the syntax variations it has to present to the user when formatting those values

This is goodness for new languages and interoperability, but is NFC for existing languages. As such, existing tests cover this

llvm-svn: 249587
2015-10-07 18:36:53 +00:00
Sylvestre Ledru 8b7faa7556 Revert commit -r249558 as it is not fixing the issue :/
llvm-svn: 249585
2015-10-07 18:26:29 +00:00
Bruce Mitchener 804f981fd0 Reduce header inclusion in Expression.
Reviewers: spyffe

Subscribers: lldb-commits

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

llvm-svn: 249570
2015-10-07 17:22:54 +00:00
Bruce Mitchener 13d21e9ae1 commands: Use override instead of virtual.
Summary:
This removes all uses of virtual on functions
where override could be used, including on destructors.

It also adds override where virtual was previously
missing.

Reviewers: clayborg, labath

Subscribers: lldb-commits

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

llvm-svn: 249564
2015-10-07 16:56:17 +00:00
Bruce Mitchener b8269c7228 Remove unused virtuals from ABISysV_ppc*
Summary:
The StackUsesFrames and FunctionCallsChangeCFA virtual functions
aren't used anywhere and aren't overridden by anything.

They were introduced when the ABISysV_ppc* code was added and weren't
used at the time. The review for the commit that added them can be
found at http://reviews.llvm.org/D5988

The commit comment notes that backtraces don't yet work:

    Backtraces don't work. This is due to PowerPC ABI using a
    backchain pointer in memory, instead of a dedicated frame
    pointer register for the backchain.

So there is a possibility these were added with the intent of using
them in the future.

Reviewers: clayborg, jingham, jhibbits, emaste

Subscribers: lldb-commits

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

llvm-svn: 249563
2015-10-07 16:48:33 +00:00
Ed Maste 848a0686a1 Add expectedFailureFreeBSD for Go runtime test
AssertionError: False is not True : No thread stopped at our breakpoint.

llvm.org/pr24895

llvm-svn: 249561
2015-10-07 16:21:43 +00:00
Sylvestre Ledru 88c47c8330 Fix a linking issue on lib lldb linking with the new Go support
llvm-svn: 249558
2015-10-07 16:13:10 +00:00
Pavel Labath fcc7f6622f Resumbit "Fix race condition during process detach"
This is a resubmission of r248371. It also incorporates the process event hijack patch by Kyrill
Lapshin in D12968.

llvm-svn: 249554
2015-10-07 15:11:11 +00:00
Tamas Berghammer 11db2d3ddd Fix race condition in the working directory cleanup code
llvm-svn: 249549
2015-10-07 14:52:16 +00:00
Tamas Berghammer f2addf8905 Remove working directory from remote platform in the test suite
Previously we haven't cleaned up the working directory we created on
the remote platform and because of it we run out of storage on some
android device/emulator (caused by the 2x increase of the number of
test cases because of dwo).

llvm-svn: 249541
2015-10-07 12:38:29 +00:00
Tamas Berghammer ca2bc7865d XFAIL new dwo test failing with totclang on linux i386
llvm-svn: 249539
2015-10-07 11:40:10 +00:00
Bruce Mitchener 4d31a482bb Fix minor typos in comments.
llvm-svn: 249533
2015-10-07 10:11:10 +00:00
Bruce Mitchener 7fa5cda9e1 [Go] Fix inconsistent-missing-override warnings.
llvm-svn: 249531
2015-10-07 10:02:24 +00:00
Tamas Berghammer 4c0c7a7f52 Run tests with dwo symbol files
dwo symbol files are generated when code compiled with the "-gsplit-dwarf"
command option (https://gcc.gnu.org/wiki/DebugFission). This CL modifies
the test system to run tests with inferiors compile with the "-gsplit-dwarf"

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

llvm-svn: 249530
2015-10-07 10:02:17 +00:00
Enrico Granata 73e8c4d09c Route the preferred-display-language mechanism to the ValueObjectPrinter and actually fill in a few gaps for dynamic and synthetic values to be able to adopt this in useful ways
llvm-svn: 249507
2015-10-07 02:36:35 +00:00
Enrico Granata d54f7fb8eb Enable the StringPrinter to have prefixes that are strings instead of just a single character; and also introduce a comparable suffix mechanism
llvm-svn: 249506
2015-10-07 02:06:48 +00:00
Enrico Granata 31fda9336c Introduce a variant of GetSummaryAsCString() that takes a LanguageType argument, and use it when crafting summaries by running selectors
This is the first in a series of commits that are meant to teach LLDB how to properly handle multi-language formatting of values

llvm-svn: 249503
2015-10-07 01:41:23 +00:00
Chaoren Lin 6c85598c5a Fix Android build.
llvm-svn: 249486
2015-10-07 00:01:06 +00:00
Ryan Brown 702c4b865e Simple readline functionality for interactive python on linux.
Differential Revision: http://reviews.llvm.org/D13268

llvm-svn: 249478
2015-10-06 22:21:08 +00:00
Todd Fiala 02c08d04e2 Modify minimumg go version to 1.4.0 for tests.
llvm-svn: 249477
2015-10-06 22:14:33 +00:00
Zachary Turner 6532c6a1e7 Update swig generation scripts to support Python 3.
llvm-svn: 249467
2015-10-06 21:11:28 +00:00
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