summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add -std=c99 for building the test case of TestValueVarUpdate - for Siva ↵Shawn Best2014-11-111-0/+1
| | | | | | Chandra : http://reviews.llvm.org/D6201 llvm-svn: 221694
* Substitute cc with c++ when compiling c++ test files for Siva Chandra : ↵Shawn Best2014-11-111-2/+18
| | | | | | http://reviews.llvm.org/D6199 llvm-svn: 221692
* Added a testcase that checks that fairly complicatedSean Callanan2014-11-112-0/+37
| | | | | | | | | | | | structures are parsed safely by the Objective-C runtime. Also made some modifications to the way we parse structs in the runtime to avoid mis-parsing @ followed by the name of the next field. <rdar://problem/18887634> llvm-svn: 221643
* Fix a problem reported by Ed Maste where the test harness was failing to ↵Enrico Granata2014-11-101-1/+1
| | | | | | call bound methods as cleanup hooks llvm-svn: 221624
* Fix new noreturn test on !darwin platformsEd Maste2014-11-101-2/+3
| | | | | | | | r221575 introduced a NoreturnUnwind test that did not skip the dsym test on non-darwin platforms, and had the @dwarf_test case as an exact copy of the dsym case (including the test name, test_with_dsym). llvm-svn: 221611
* Fix a corner case with the handling of noreturn functions.Jason Molenda2014-11-083-0/+131
| | | | | | | | | | | | | | | | | | If a noreturn function was the last function in a section, we wouldn't correctly back up the saved-pc value into the correct section leading to us showing the wrong function in the backtrace. Also add a backtrace test with an attempt to elicit this particular layout. It happens to work out with clang -Os but other compilers may not quite get the same layout I'm getting at that opt setting. We'll still be exercising the basic noreturn handling in the unwinder even if we don't get one function at the very end of a section. <rdar://problem/16051613> llvm-svn: 221575
* fix for unit tests finding path to LLDB.h http://reviews.llvm.org/D6177Shawn Best2014-11-081-1/+4
| | | | llvm-svn: 221566
* Fixes so tests compile and run remotely.Greg Clayton2014-11-0611-48/+51
| | | | | | | | | | Fixes include: - dont set or change LDFLAGS, but set LD_EXTRAS instead - fix compilation errors for iOS based builds with objective C code - fix test cases to create classes instead of relying on classes from AppKit - rename things where it makes sense llvm-svn: 221496
* Changed program to go along with the previous commit to allow this test to ↵Greg Clayton2014-11-061-12/+13
| | | | | | be run remotely via lldb-platform. llvm-svn: 221494
* Fix the test to not have to run the binary separately first to get the ↵Greg Clayton2014-11-061-19/+26
| | | | | | | | golden output, use the process STDOUT instead. This helps this test be able to be run remotely. llvm-svn: 221493
* Make sure stderr is filtered out in case xcodebuild or xcrun print errors ↵Greg Clayton2014-11-061-1/+1
| | | | | | when getting the SDK path and use xcrun to find the SDK path. llvm-svn: 221492
* Handle types from the runtime that conform toSean Callanan2014-11-062-0/+37
| | | | | | | | protocols. <rdar://problem/18883778> llvm-svn: 221476
* Pick better floating point numbers (ones that can be exactly represented) in ↵Greg Clayton2014-11-062-9/+9
| | | | | | | | floating point instead of something that can't to avoid test suite failures on different devices and architectures. <rdar://problem/18826900> llvm-svn: 221468
* fixed minor code indenting http://reviews.llvm.org/D6127Shawn Best2014-11-061-4/+3
| | | | llvm-svn: 221467
* Allow inline test case to register actually useful teardown hooks by ↵Enrico Granata2014-11-053-5/+13
| | | | | | allowing a hook to be passed back the test instance, were it not to be already bound to self. Use this ability to make the reversal of escape-non-printables a teardown hook for added reliability of the testing logic llvm-svn: 221402
* Fixed the Objective-C stripped ivar test to ensureSean Callanan2014-11-051-0/+2
| | | | | | | | | | | that we load debug information properly. If we don't explicitly add-dsym, sometimes Spotlight will help out and tell us about the dSYM but we shouldn't be relying on that. Thanks to Jim for catching this. <rdar://problem/16424661> llvm-svn: 221400
* Add a setting escape-non-printables that drives whether the StringPrinter ↵Enrico Granata2014-11-052-0/+26
| | | | | | | | | | | should or should not escape sequences such as \t, \n, .. and generally any non-printing character The recent StringPrinter changes made this behavior the default, and the setting defaults to yes If you want to change this behavior and see non-printables unescaped (e.g. "a\tb" as "a b"), set it to false Fixes rdar://12969594 llvm-svn: 221399
* Fix a problem where ValueObjectVariable was not correctly setting its 'has ↵Enrico Granata2014-11-043-0/+84
| | | | | | value changed' flag for scalar valued variables. This fixes rdar://17851144 llvm-svn: 221298
* Fixed SBTarget::ReadMemory() to work correctly and the TestTargetAPI.py test ↵Greg Clayton2014-11-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | case that was reading target memory in TargetAPITestCase.test_read_memory_with_dsym and TargetAPITestCase.test_read_memory_with_dwarf. The problem was that SBTarget::ReadMemory() was making a new section offset lldb_private::Address by doing: size_t SBTarget::ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error) { ... lldb_private::Address addr_priv(addr.GetFileAddress(), NULL); bytes_read = target_sp->ReadMemory(addr_priv, false, buf, size, err_priv); This is wrong. If you get the file addresss from the "addr" argument and try to read memory using that, it will think the file address is a load address and it will try to resolve it accordingly. This will work fine if your executable is loaded at the same address (no slide), but it won't work if there is a slide. The fix is to just pass along the "addr.ref()" instead of making a new addr_priv as this will pass along the lldb_private::Address that is inside the SBAddress (which is what we want), and not always change it into something that becomes a load address (if we are running), or abmigious file address (think address zero when you have 150 shared libraries that have sections that start at zero, which one would you pick). The main reason for passing a section offset address to SBTarget::ReadMemory() is so you _can_ read from the actual section + offset that is specified in the SBAddress. llvm-svn: 221213
* Added a test case for reading ivars from theSean Callanan2014-11-042-0/+14
| | | | | | | | Objective-C runtime. We'll need to do more (subclasses, partially-defined classes, etc.) but this tests that at least the basics work. llvm-svn: 221208
* Fix this test to set a breakpoint at the correct location that will always ↵Greg Clayton2014-11-032-2/+2
| | | | | | get hit so it doesn't intermittently fail on MacOSX. llvm-svn: 221201
* Fixed a test suite error on MacOSX where people were using ".data" as the ↵Greg Clayton2014-11-031-1/+10
| | | | | | data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX). llvm-svn: 221197
* Fixed a test suite error on MacOSX where people were using ".data" as the ↵Greg Clayton2014-11-031-1/+9
| | | | | | data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX). llvm-svn: 221196
* Remove hex character number from wchar_t testEd Maste2014-10-301-1/+1
| | | | | | | After r220894 (StringPrinter change) it is no longer emitted. Update the test rather than considering it a bug as the new format is preferred. llvm-svn: 220914
* Temporarily disable test on FreeBSD that is assertingEd Maste2014-10-291-0/+1
| | | | | | llvm.org/pr21325 llvm-svn: 220871
* Skip test that's hanging on FreeBSD until it can be investigatedEd Maste2014-10-291-0/+3
| | | | | | llvm.org/pr21411 llvm-svn: 220856
* Add a feature where a string data formatter can now be partially composed of ↵Enrico Granata2014-10-284-0/+89
| | | | | | | | | | | | | | Python summary functions This works similarly to the {thread/frame/process/target.script:...} feature - you write a summary string, part of which is ${var.script:someFuncName} someFuncName is expected to be declared as def someFuncName(SBValue,otherArgument) - essentially the same as a summary function Since . -> [] are the only allowed separators, and % is used for custom formatting, .script: would not be a legitimate symbol anyway, which makes this non-ambiguous llvm-svn: 220821
* Added the ability to add attributes to inlineSean Callanan2014-10-282-5/+21
| | | | | | | | | | | testcases. Also fixed one of the testcases to not run on the platforms that don't support Objective-C. We want to do better with the Objective-C attribute but we'll do that in a future commit. llvm-svn: 220820
* When trying to get the element type of an array type, do not go to the ↵Enrico Granata2014-10-282-0/+17
| | | | | | canonical type, since that will strip typedefs where we want them to be preserved. Fixes rdar://15453076 llvm-svn: 220810
* Add a test for setting and hitting the C++ Exception throw breakpoint.Jim Ingham2014-10-283-0/+76
| | | | llvm-svn: 220743
* This looks like the actual path under which the builder looks for LLDB ↵Enrico Granata2014-10-271-1/+1
| | | | | | headers, so use this path instead llvm-svn: 220718
* Skip ObjC test on FreeBSD that does not buildEd Maste2014-10-271-0/+1
| | | | llvm-svn: 220681
* Fix the TestCreateAfterAttach test for llgs-local on ptracer lock-down.Todd Fiala2014-10-271-0/+19
| | | | llvm-svn: 220661
* Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.Todd Fiala2014-10-271-1/+22
| | | | llvm-svn: 220660
* Fix up TestRegisters for Linux ptracer lock-down.Todd Fiala2014-10-261-0/+17
| | | | | | | | All of these test fixups are prep work for when llgs is running with llgs for local process debugging, where these tests fail without the ptracer lock-down suppression. llvm-svn: 220656
* Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown.Todd Fiala2014-10-261-0/+17
| | | | | | | | | | | | Similar to previous fix, this augments the test inferior to immediately indicate it may be ptraced by any Linux process when the appropriate symbols are defined. This seems to indicate we need to fix our lldb attach logic to catch when an attach fails, and trigger an appropriate error instead of the current behavior of hanging indefinitely. llvm-svn: 220654
* Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.Todd Fiala2014-10-261-0/+20
| | | | | | | | | | | | | | | | Similar to a recent test I fixed for gdb-remote attach scenarios, this fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and later, where ptrace starts requiring a ptracer to be an ancestor of the inferior to be ptraced. This change checks for Linux and the ptrace-related flags. If they're found, it tries to switch on the "allow any ptracer" mode for the inferior as the first statements in the program. It's a best-effort solution - if the prctl call fails, the failure is ignored, and probably will lead to the test failing. The ptrace security behavior can be modified system-wide, but is outside the scope of the test to address. Hence I went with this particular solution. llvm-svn: 220650
* Remove duplicated new file contentEd Maste2014-10-243-93/+0
| | | | llvm-svn: 220591
* Patch from ovyalov@google.com:Jim Ingham2014-10-241-4/+4
| | | | | | | Handle pexpect exceptions correctly so that processes spawned with pexpect are always reaped. llvm-svn: 220583
* This test case should not rely on stepping behavior because that might ↵Enrico Granata2014-10-232-13/+7
| | | | | | chance due to inlining. Set breakpoints where you want them instead. Fixes rdar://18724175 llvm-svn: 220513
* Fix a problem where an SBType was advertising its static type class even ↵Enrico Granata2014-10-232-0/+37
| | | | | | though a dynamic type was available. Solves rdar://18744420 llvm-svn: 220511
* Disable dsym tests on !Darwin hostsEd Maste2014-10-231-0/+2
| | | | | | | | This was missing from r219984 llvm.org/pr21324 llvm-svn: 220485
* Reorganize some of the data formatters code to simplify ↵Enrico Granata2014-10-222-0/+24
| | | | | | CXXFormattersFunction.h. Also, add a synthetic child provider for libc++'s version of std::initializer_list<T> llvm-svn: 220421
* Fixed a problem in the lldbinline logic where C++ files could not be validly ↵Enrico Granata2014-10-221-1/+1
| | | | | | compiled llvm-svn: 220420
* Fix a problem where summary strings could not use a synthetically generated ↵Enrico Granata2014-10-222-0/+12
| | | | | | value as part of themselves llvm-svn: 220414
* Sort unit test failures by name - submitted for Vince Harron ↵Shawn Best2014-10-221-0/+1
| | | | | | http://reviews.llvm.org/D5904 llvm-svn: 220406
* Added functions to the C++ API, for the benefit of non-8-bit byte architectures.Matthew Gardiner2014-10-226-0/+337
| | | | | | | | | | | | New functions to give client applications to tools to discover target byte sizes for addresses prior to ReadMemory. Also added GetPlatform and ReadMemory to the SBTarget class, since they seemed to be useful utilities to have. Each new API has had a test case added. http://reviews.llvm.org/D5867 llvm-svn: 220372
* The breakpoint location hit counts were getting incremented inJim Ingham2014-10-221-1/+5
| | | | | | | | | | | | | | | BreakpointLocation::ShouldStop. That worked but wasn't really right, since there's nothing to guarantee that won't get called more than once. So this change moves that responsibility to the StopInfoBreakpoint directly, and then it uses the BreakpointSite to actually do the bumping. Also fix a test case that was assuming if you had many threads running some code with a breakpoint in it, the hit count when you stopped would always be 1. Many of the threads could have hit it at the same time... <rdar://problem/18577603> llvm-svn: 220358
* Make the "synchronous" mode actually work without race conditions.Greg Clayton2014-10-211-0/+1
| | | | | | There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be. llvm-svn: 220254
* Skip dsym test on !DarwinEd Maste2014-10-201-0/+1
| | | | | | | | | | | r219978 fixed this test to work on Darwin, and removed the expected failure decorator, but it then started running (and failing) on FreeBSD. I'd think @dsym_test should skip the test on all non-Darwin operating systems. It seems not to be the case, so for now skip it the same way as done for other @dsym_test tests. llvm-svn: 220219
OpenPOWER on IntegriCloud