Commit Graph

11425 Commits

Author SHA1 Message Date
Tamas Berghammer 45176c2341 Fix test expectation in TestThreadExit after r237566
llvm-svn: 237578
2015-05-18 16:08:06 +00:00
Pavel Labath 8dd974f735 Update the failure reason of TestConvenienceVariables and tighten the XFAIL
llvm-svn: 237577
2015-05-18 15:48:48 +00:00
Pavel Labath 482b9d0ef8 Fix typo in previous commit
llvm-svn: 237575
2015-05-18 15:41:50 +00:00
Pavel Labath dc3ecf4c88 Update TestMiVar with a bug id
llvm-svn: 237571
2015-05-18 15:35:42 +00:00
Tamas Berghammer f4553e014e Fix encoding of BX instrucion in EmulateInstructionARM
llvm-svn: 237570
2015-05-18 14:55:51 +00:00
Ilia K 055ad9beba Add --move-to-nearest-code / target.move-to-nearest-code options (attempt 2)
This patch initially was committed in r237460 but later it was reverted (r237479) due to 4 new failures:
* TestExitDuringStep.py
* TestNumThreads.py
* TestThreadExit.py
* TestThreadStates.py

This patch also fixes these tests.

llvm-svn: 237566
2015-05-18 13:41:01 +00:00
Vince Harron a0c955251f XFAIL'd some flakey tests on Darwin
llvm-svn: 237543
2015-05-17 15:32:14 +00:00
Vince Harron 41b94d9bfc XFAIL'd some tests that fail very, very rarely
llvm-svn: 237515
2015-05-16 07:05:15 +00:00
Enrico Granata bb642e5456 Constant result ValueObjects are - well - constant
And they also do not have a thread/frame attached to them

That makes dynamic and synthetic values attached to them impossible to update - which, among other things, makes it impossible to properly display persistent variables of types that could have such dynamic/persistent values

Fix this by making it so that a ValueObject can control its constantness (hint: dynamic and synthetic values cannot be constant) and whether it wants to let itself be updated when an invalid thread is around

llvm-svn: 237504
2015-05-16 01:27:00 +00:00
Vince Harron 341eda4ca7 Fixed arm64 build error
llvm-svn: 237493
2015-05-16 00:26:20 +00:00
Greg Clayton 898c1b2cfe Don't crash if we have bad debug info that has a DW_TAG_inheritance with a bad DW_AT_type reference. Emit an error with instructions to file a bug.
<rdar://problem/20944860>

llvm-svn: 237485
2015-05-15 22:31:18 +00:00
Greg Clayton 9438056b83 Don't crash if a function has no name by calling 'strcmp(name, "main")'.
<rdar://problem/20925061>

llvm-svn: 237484
2015-05-15 22:20:29 +00:00
Vince Harron fc872b205a XFAIL'd MiVarTestCase.test_lldbmi_eval on gcc-4.9/i386
It times out on TestMyVar:113

self.expect("\^done,value=\"0x[0-9a-f]+\"")

llvm-svn: 237480
2015-05-15 21:54:02 +00:00
Vince Harron a66c695340 Reverting r237460 to fix test failures introduced on OSX & Linux
TestExitDuringStep.py
TestNumThreads.py
TestThreadExit.py
TestThreadStates.py

llvm-svn: 237479
2015-05-15 21:43:26 +00:00
Greg Clayton 67d49488a7 Don't allow infininte recursion when trying to resolve re-exported symbols.
<rdar://problem/20821289>

llvm-svn: 237477
2015-05-15 21:27:16 +00:00
Robert Flack eb83fabfa0 Only check _ZN function prefix in Linux and FreeBSD targets in SymbolFileDWARF
In http://reviews.llvm.org/D9754 I enabled the mangled symbol name lookup
workaround used to find global and anonymous namespace symbols in linux binaries
for all platforms, however we should still only check for these symbols when
processing Linux or FreeBSD binaries where they are relevant. This patch makes
this change.

Test Plan: The tests from the original revision still pass:
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestExprs.py
TestExprsChar.py
TestNamespace.py
TestOverloadedFunctions.py
TestRvalueReferences.py
TestThreadExit.py

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

llvm-svn: 237467
2015-05-15 18:59:59 +00:00
Robert Flack 4629c4b9cb Choose stdlib for test suite based on target platform.
When compiling programs for the test suite we currently choose which stdlib to
use based on the host platform, but should be basing this on the target
platform.

Test Plan: ./dotest.py $DOTEST_OPTS -t -p TestThreadExit.py
This test previously failed mac->linux most of the time due to using the mac
host's atomic declaration.

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

llvm-svn: 237466
2015-05-15 18:54:32 +00:00
Greg Clayton 1548440c45 OperatingSystem plug-ins need to avoid running code when fetching thread lists. This patch helps with that by making all SBValue objects that are fetched not try to do dynamic type resolution. Objective C can end up running code to fetch a list of all ISA pointers so we can tell when something is dynamic and this running code could cause the OS plug-in to continue the target.
This fix disabled dynamic types, fetches the new threads from the OS plug-in, then restores the setting.

<rdar://problem/20768407> 

llvm-svn: 237465
2015-05-15 18:40:24 +00:00
Greg Clayton 286ea2342d Fix the lldb-mi Xcode project build target to it compiles.
llvm-svn: 237464
2015-05-15 18:38:04 +00:00
Ilia K d9f1a78aa0 Add --move-to-nearest-code / target.move-to-nearest-code options
Summary:
This option forces to only set a source line breakpoint when there is an exact-match

This patch includes the following commits:
# Add the -m/--exact-match option in "breakpoint set" command
## Add exact_match arg in BreakpointResolverFileLine ctor
## Add m_exact_match field in BreakpointResolverFileLine
## Add exact_match arg in BreakpointResolverFileRegex ctor
## Add m_exact_match field in BreakpointResolverFileRegex
## Add exact_match arg in Target::CreateSourceRegexBreakpoint
## Add exact_match arg in Target::CreateBreakpoint
## Add -m/--exact-match option in "breakpoint set" command
# Add target.exact-match option to skip BP if source line doesn't match
## Add target.exact-match global option
## Add Target::GetExactMatch
## Refactor Target::CreateSourceRegexBreakpoint to accept LazyBool exact_match (was bool)
## Refactor Target::CreateBreakpoint to accept LazyBool exact_match (was bool)
# Add target.exact-match test in SettingsCommandTestCase
# Add BreakpointOptionsTestCase tests to test --skip-prologue/--exact-match options
# Fix a few typos in lldbutil.check_breakpoint_result func
# Rename --exact-match/m_exact_match/exact_match/GetExactMatch to --move-to-nearest-code/m_move_to_nearest_code/move_to_nearest_code/GetMoveToNearestCode
# Add exact_match field in BreakpointResolverFileLine::GetDescription and BreakpointResolverFileRegex::GetDescription, for example:
was:
```
1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, locations = 1, resolved = 1, hit count = 2
  1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2
```
now:
```
1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, exact_match = 0, locations = 1, resolved = 1, hit count = 2
  1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2
```

Test Plan:
./dotest.py -v --executable $BUILDDIR/bin/lldb functionalities/breakpoint/
./dotest.py -v --executable $BUILDDIR/bin/lldb settings/
./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/breakpoint/

Reviewers: jingham, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, clayborg, jingham

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

llvm-svn: 237460
2015-05-15 18:16:15 +00:00
Ilia K 236714c67a Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)
llvm-svn: 237454
2015-05-15 16:13:51 +00:00
Pavel Labath 9eb1ecb9af [NativeProcessLinux] Fix removal of temporary breakpoints
Summary:
There was an issue in NPL, where we attempted removal of temporary breakpoints (used to implement
software single stepping), while some threads of the process were running. This is a problem
since we currently always use the main thread's ID in the removal ptrace call. Therefore, if the
main thread was still running, the ptrace call would fail, and the software breakpoint would
remain, causing all kinds of problems. This change removes the breakpoints after all threads have
stopped. This fixes TestExitDuringStep on Android arm and can also potentially help in other
situations, as previously the breakpoint would not get removed if the thread stopped for another
reason.

Test Plan: TestExitDuringStep passes, other tests remain unchanged.

Reviewers: tberghammer

Subscribers: tberghammer, aemerson, lldb-commits

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

llvm-svn: 237448
2015-05-15 13:49:01 +00:00
Robert Flack fd8893fd96 Add EmulateInstructionMIPS to the xcode project file to fix build after r237420.
llvm-svn: 237446
2015-05-15 13:37:02 +00:00
Pavel Labath 6e35163cca [NativeProcessLinux] Fix potential race during thread exit
Summary:
This is the same issue as we had in D9145 for thread creation. Going through the full
ThreadDidStop/RequestResume cycle can cause a deferred notification to fire, which is not correct
when we are ignoring an event and resuming the thread. In this case it doesn't matter much since
the thread will die after that anyway, but for correctness, we should do the same thing here.
Also treating the SIGTRAP case the same way.

Test Plan: Tests continue to pass.

Reviewers: chaoren, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 237445
2015-05-15 13:30:59 +00:00
Robert Flack 6e1fd35bfe Skip TestPluginCommands.py if host lldb library is incompatible with remote.
TestPluginCommands.py attempts to build a library which links against the host
built lldb library. This will only work if the remote is compatible with
binaries produced by the host.

Test Plan:
./dotest.py $DOTEST_OPTS -v -t -p TestPluginCommands.py
Test is skipped if remote platform is incompatible with host platform (i.e. mac
-> linux).

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

llvm-svn: 237444
2015-05-15 12:39:33 +00:00
Ilia K 3ac979c4da Fix CMICmdArgValPrintValues::Validate & enable 4 tests that were XFAIL'ed in r237437 (MI)
llvm-svn: 237443
2015-05-15 12:33:04 +00:00
Ilia K 25d29ba5ec Set specific values for VariableInfoFormat_e enum and remove kNumVariableInfoFormats (MI)
llvm-svn: 237438
2015-05-15 11:55:09 +00:00
Ilia K fbc88aa1dd XFAIL 4 lldb-mi tests to get Linux build green back (MI)
llvm-svn: 237437
2015-05-15 11:51:52 +00:00
Pavel Labath 48fca3b982 Fix StopInfoWatchpoint handling after r237411
r237411 exposed the following issue: ProcessGDBRemote used the description field in the
stop-reply to set the description of the StopInfo. In the case of watchpoints, the packet
description contains the raw address that got hit, which is not exactly the information we want
to display to the user as the stop info. Therefore, I have changed the code to use the packet
description only if the StopInfo does not already have a description. This makes the behavior
equivalent to the pre-r237411 behavior as then the SetDecription call got ignored for
watchpoints.

llvm-svn: 237436
2015-05-15 10:14:51 +00:00
Tamas Berghammer 69fc298a94 Fix virtual step handling in ThreadPlanStepInRange
Differential revision: http://reviews.llvm.org/D9773

llvm-svn: 237435
2015-05-15 10:14:15 +00:00
Ilia K 27e2c058c9 Fix parsing of print-values arg (MI)
# Add CMICmdArgValPrintValues argument
# Rework -stack-list-arguments/-stack-list-locals/-stack-list-variables/-var-update/-var-list-children
  commands to use the CMICmdArgValPrintValues argument instead of usage of pair of non-mandatory
  arguments like: CMICmdArgValNumber(0) || CMICmdArgValLongOptions("no-values")

llvm-svn: 237429
2015-05-15 09:46:28 +00:00
Ilia K 06d2855fb3 Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI)
# Add SBProcess::GetInterruptedFromEvent
# Add vrEvent arg in CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateStopped
  and CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal
# Refactor CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal
## Clean up and fix typos
## Remove vwrbShouldBrk arg
# Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_{local,remote}
  to expect SIGSTOP instead of SIGINT

llvm-svn: 237426
2015-05-15 09:29:09 +00:00
Ilia K d50ea2fc15 Fix a few compile warnings
llvm-svn: 237425
2015-05-15 09:15:27 +00:00
Omair Javaid cdad63b33d LLDB build broke after applying patch http://reviews.llvm.org/D9706
This patch fixes the issue.

llvm-svn: 237421
2015-05-15 08:30:29 +00:00
Bhushan D. Attarde 794a4d5a9f Assembly profiler for mips32
Summary:
Implementation of assembly profiler for MIPS32 using EmulateInstruction which currently scans only prologue/epilogue assembly instructions. It uses llvm::MCDisassembler to decode assembly instructions.

Reviewers: clayborg, jasonmolenda

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

llvm-svn: 237420
2015-05-15 06:53:30 +00:00
Omair Javaid ea8c25a802 This patch adds support for setting/clearing hardware watchpoints and breakpoints on AArch64 (Arm v8) 64-bit hardware.
http://reviews.llvm.org/D9706

llvm-svn: 237419
2015-05-15 06:29:58 +00:00
Oleksiy Vyalov 9953f0886b Reverting r237392 since it broke TestNumThreads on ubuntu builder.
llvm-svn: 237415
2015-05-15 02:05:10 +00:00
Jason Molenda 0453be9bd9 The StopInfo base class has an m_description std::string.
Remove the m_description ivar from the StopInfoBreakpoint
and StopInfoWatchpoint subclasses of StopInfo.  Also,
initialize the m_description ivar in the StopInfo ctor.
<rdar://problem/20902950> 

llvm-svn: 237411
2015-05-15 00:19:28 +00:00
Zachary Turner 275806f90b Don't bother dynamic loading the Windows Slim RW Lock API.
This API has been present since XP, and I think it's safe to
drop support for XP (since other things have been introduced long
ago which already don't work on XP anyway).

With this patch, we can statically bind against the exports and
not bother falling back to a CRITICAL_SECTION if we can't load
the API.

llvm-svn: 237402
2015-05-14 22:50:19 +00:00
Adrian McCarthy d26b0c4d31 Enable multithreaded debugging on Windows.
llvm-svn: 237392
2015-05-14 21:07:59 +00:00
Siva Chandra b8c238c080 [TestSendSignal] Include signal.h instead of sys/signal.h in the test case.
Summary:
Android API-9 does not have sys/signal.h. However, all sys/signal.h
has when present is an include of signal.h.

Test Plan: dotest.py -p TestSendSignal on linux and Android.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 237381
2015-05-14 19:02:13 +00:00
Ed Maste 31bc506987 Avoid Linux-specific header in platform-independent tests
llvm-svn: 237371
2015-05-14 16:39:02 +00:00
Ed Maste 4dd8fba21e XTIMEOUT tests timing out on the FreeBSD buildbot
llvm-svn: 237369
2015-05-14 16:25:52 +00:00
Siva Chandra ff2b29d0ea [TestAttachDenied] Use a file instead of a pipe for synchronization.
Summary:
One cannot use mknod or mkfifo on user Android devices. This commit
changes the use of pipe to a file to synchronize between the inferior
and the test.

Test Plan: dotest.py -P TestAttachDenied

Reviewers: ovyalov, chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 237328
2015-05-14 01:36:47 +00:00
Enrico Granata b2d643146f Implement an objc tagged-pointer info command that will provide information about what LLDB thinks an ObjC tagged pointer represents
llvm-svn: 237322
2015-05-14 00:46:47 +00:00
Vince Harron de92b52015 Added XTIMEOUT for TestAttachDenied.py
llvm-svn: 237319
2015-05-13 23:59:03 +00:00
Ed Maste da04cb2643 Add mips64el trap opcode to PlatformFreeBSD as well
llvm-svn: 237315
2015-05-13 23:12:51 +00:00
Ed Maste af0494f158 Restore breaks lost in shuffling GetSoftwareBreakpointTrapOpcode
llvm-svn: 237313
2015-05-13 23:09:43 +00:00
Ed Maste dfef0cecd4 Add AArch64 and MIPS breakpoint opcodes and sort cases
New opcodes from PlatformLinux.cpp

llvm-svn: 237306
2015-05-13 22:40:01 +00:00
Ed Maste a157bc8539 Initial FreeBSD/arm live debugging support
Patch by Tom Rix, except using the RegisterContextFreeBSD_arm files
added in r235305 instead.

llvm-svn: 237303
2015-05-13 22:33:12 +00:00