Commit Graph

2972 Commits

Author SHA1 Message Date
Siva Chandra a3747a9d31 [ValueObject] Do not return address of eValueTypeHostAddress values.
Summary:
This fixes TestRegisterVariables for clang and hence it is enabled in this commit.


Test Plan: dotest.py -C clang -p TestRegisterVariables

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 236447
2015-05-04 19:43:34 +00:00
Oleksiy Vyalov 19f731f0ea Mark TestTypedefArray as XFAIL with Gcc.
llvm-svn: 236425
2015-05-04 15:20:25 +00:00
Vince Harron f9900379b4 TestCModules - fixed for gcc
Changed restrict keyword to something understood by gcc

llvm-svn: 236410
2015-05-04 06:26:13 +00:00
Vince Harron 0da0d4a948 XFAILing a test that fails with gcc 4.9 x86_64
llvm-svn: 236407
2015-05-04 03:53:22 +00:00
Vince Harron 410a9e1e1e un-skipped a bunch of tests on Linux
Some have been marked as skipIfLinux for years.
The seem to be passing so I've enabled them.

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

llvm-svn: 236403
2015-05-04 03:06:04 +00:00
Vince Harron c849267a69 Fixed skipIfLinuxClang to check the target architecture
Instead of the host architecture

This decorator isn't in use anywhere currently.
Add it to a test and run

llvm-svn: 236402
2015-05-04 02:59:19 +00:00
Vince Harron f2e3760ad8 Enabled libc++ formatter tests on Linux
Refactored TestInitializerList to not be an inline test.
Refactored Makefiles to use USE_LIBCPP instead of adding FLAGS directly
Fixed copy/paste error in TestDataFormatterUnordered class name

Differenttial Revision: http://reviews.llvm.org/D9426

llvm-svn: 236401
2015-05-04 02:56:32 +00:00
Vince Harron 026137628f TestMultithreaded improvements
These tests link against host lldb API. Compiler's target triple
must match liblldb triple. Instead of naively skipping i386, I added
a check of the liblldb arch against the compiler target arch.

This is useful for 32 bit API builds (planned for Windows)

Since remote is disabled, we can assume the os is the same.

Also, removed skipIfLinuxClang because it's passing

llvm-svn: 236396
2015-05-04 00:17:53 +00:00
Siva Chandra 6b921144ce Mark the other test of TestFdLeak also as xfail to keep the bot green.
Summary:
r235916 marked only one of the tests as xfail, but the other also has
been failing intermitantly on the buildbot.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

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

llvm-svn: 236366
2015-05-02 00:37:12 +00:00
Sean Callanan 80c9759ef7 Added support for locating and importing functions
(including inline functions) from modules in the
expression parser.  We now have to retain a reference
to the code generator in ClangExpressionDeclMap so
that any imported function bodies can be appropriately
sent to that code generator.

<rdar://problem/19883002>

llvm-svn: 236297
2015-05-01 00:47:29 +00:00
Ilia K 70dd606f25 Fix MiLibraryLoadedTestCase.test_lldbmi_library_loaded test on Linux (MI)
llvm-svn: 236229
2015-04-30 12:37:05 +00:00
Ilia K 715eab12e5 Use \d+ pattern instead of hard-coded line number in MiBreakTestCase (MI)
llvm-svn: 236228
2015-04-30 12:28:26 +00:00
Pavel Labath 6884aa1b43 Enabling two watchpoint tests on linux
After recent changes, these tests should be stable. Please let me know if you still see failures.

llvm-svn: 236226
2015-04-30 11:28:06 +00:00
Ilia K ebb4dfd350 Rework =shlibs-added/=shlibs-removed
Summary:
This patch includes the following:
* Rename =shlibs-added/=shlibs-removed to standard =library-loaded/=library-unloaded
* Remove redundant fields
* Add extra symbols-loaded/symbols-path and loaded_addr fields
* Rename CMICmnMIOutOfBandRecord::eOutOfBand_TargetModulesLoaded/eOutOfBand_TargetModulesUnloaded to CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded/eOutOfBand_TargetModuleUnloaded

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

Reviewers: jasonmolenda, jingham, abidh

Reviewed By: abidh

Subscribers: lldb-commits, jingham, jasonmolenda, abidh

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

llvm-svn: 236225
2015-04-30 11:08:31 +00:00
Pavel Labath ac8be96242 Add expectedFailureLinux to TestProcessAttach
The test is skipped anyway due to timeout, but adding XFAIL improves grepability.

llvm-svn: 236224
2015-04-30 11:00:15 +00:00
Ilia K 4ba3aee138 Add -data-info-line command (MI)
Summary: Add -data-info-line command + test

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

Reviewers: abidh

Reviewed By: abidh

Subscribers: lldb-commits, abidh

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

llvm-svn: 236208
2015-04-30 07:14:24 +00:00
Hafiz Abid Qadeer fda237d09f Add support for -stack-list-variables.
This command is able to list both local variables and stack arguments for a specific thread/frame.
Args are denoted with 'arg="1"'.
Patch from Chuck Ries.

llvm-svn: 236090
2015-04-29 08:18:41 +00:00
Siva Chandra e6303cc3a1 [TestMiVar] Enable one of the tests for GCC.
Summary:
The "internal" name of vars is different between clang and GCC. All this
change does is to use a regex instead of the hardcoded internal name.

Test Plan: dotest.py -C <clang|gcc> -p TestMiVar

Reviewers: ki.stfu

Reviewed By: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 236024
2015-04-28 19:21:57 +00:00
Ilia K 7f83624222 Add language option in -gdb-show command (MI)
Summary:
Add language option in -gdb-show command + test:
```
$ bin/lldb-mi ~/p/hello
[...]
b main
[...]
r
[...]
(gdb)
-gdb-show language
^done,value="c++"
(gdb)
quit
```

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

Reviewers: abidh, granata.enrico, jingham, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, jingham, granata.enrico, clayborg, abidh

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

llvm-svn: 235983
2015-04-28 12:51:16 +00:00
Pavel Labath bbaba96860 Skip TestProcessAttach.py on Linux
The test was already XFAILed. Changing this to skip, because the test timeouts and gets flagged
as an error anyway.

llvm-svn: 235979
2015-04-28 12:28:08 +00:00
Bruce Mitchener 41ad9c4128 LLDB-MI: -var-list-children with no children doesn't need a children value in the response.
Summary:
When using GDB with MI, if there aren't children for a variable,
it doesn't include a "children" value in the response. LLDB does
and sets it to "[]" while variables with children have an unquoted
list: children=[...].

This removes the children value entirely when there are no children
making this match GDB in behavior.

Test Plan: Ran tests on Mac OS X and they passed.

Reviewers: abidh, domipheus

Subscribers: lldb-commits

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

llvm-svn: 235974
2015-04-28 10:03:55 +00:00
Siva Chandra 0bbe4f2c8e [TestProcessAttach] Decorate with expectedFailureLinux
Summary: Link to PR: llvm.org/pr23360

Test Plan: dotest.py -p TestProcessAttach

Reviewers: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 235947
2015-04-27 23:56:23 +00:00
Chaoren Lin cae516117a XFail flakey test.
llvm-svn: 235916
2015-04-27 20:57:24 +00:00
Pavel Labath 53ffb319d1 XFAIL two mi tests on gcc to stabilise build bots
llvm-svn: 235851
2015-04-27 09:10:30 +00:00
Ilia K cf0c0bce01 Disable MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string test on Linux
llvm-svn: 235808
2015-04-25 20:37:41 +00:00
Ilia K 94b8ebcacf Add -gdb-set/-gdb-show aggregate-field-names option (MI)
Use this option to print/skip field names (default is on):
```
-var-create var1 * complx
^done,name="var1",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0"
-var-create var2 * complx_array
^done,name="var2",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0"
-gdb-set print aggregate-field-names off
^done
-var-create var3 * complx
^done,name="var3",numchild="3",value="{3,{3},0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0"
-var-create var4 * complx_array
^done,name="var4",numchild="2",value="{{4,{4},0x[0-9a-f]+},{5,{5},0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0"
```

llvm-svn: 235807
2015-04-25 20:33:02 +00:00
Ilia K 81bd06d787 Add -gdb-set/-gdb-show expand-aggregates option (MI)
Use this option to expand complex types always:
```
-var-create var1 * complx
^done,name="var1",numchild="3",value="{...}",type="complex_type",thread-id="1",has_more="0"
-var-create var2 * complx_array
^done,name="var2",numchild="2",value="[2]",type="complex_type [2]",thread-id="1",has_more="0"
-gdb-set print expand-aggregates on
^done
-var-create var3 * complx
^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0"
-var-create var4 * complx_array
^done,name="var4",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0"
```

llvm-svn: 235805
2015-04-25 20:10:02 +00:00
Ilia K aa82b4af84 Add -gdb-set/-gdb-show print char-array-as-string option (MI)
llvm-svn: 235804
2015-04-25 19:44:56 +00:00
Adrian McCarthy f60daf7ca2 Eliminate redundant Alias test and improve Common Short Spellings test http://reviews.llvm.org/D9268
llvm-svn: 235790
2015-04-24 23:18:15 +00:00
Ilia K 1107b015c2 Use self.fail() in MiGdbSetShowTestCase.test_lldbmi_gdb_set_target_async_off (MI)
llvm-svn: 235712
2015-04-24 11:41:42 +00:00
Ilia K afef49267a Fix CMICmnLLDBDebuggerHandleEvents::GetProcessStdout/GetProcessStderr to use stream-record (MI)
llvm-svn: 235711
2015-04-24 11:33:36 +00:00
Adrian McCarthy 2304b6ff44 Factor resolution of abbreviations and aliases so that they can be tested directly. http://reviews.llvm.org/D9033
llvm-svn: 235633
2015-04-23 20:00:25 +00:00
Ilia K 3b0494c304 MI fix allowing multiple logging instances of lldb-mi to run simultaneously.
Summary:
Currently if two instances of lldb-mi are running with logging enabled using '--log' the log file conflicts. This produces the following error 
MI: Error: File Handler. Error Permission denied opening 'C:\Users\Ewan\LLVM\build\Debug\bin\lldb-mi-log.txt'

Fixed in this patch by renaming lldb-mi-log.txt based on the date, e.g. lldb-mi-log.txt-20150316163631.log, and moving the file into the temp directory by using the --log-dir option.

Regrading previous review comments the P_tmpdir macro is defined in Windows but always points to "\", which doesn't help much. Also when using the Windows API for GetTempPath() dynamic memory seems much more messy.

Patch from ewan@codeplay.com

Reviewers: abidh, EwanCrawford

Subscribers: zturner, lldb-commits, deepak2427

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

llvm-svn: 235589
2015-04-23 12:48:42 +00:00
Tamas Berghammer f959520efc Fix test expectation in TestNoreturnUnwind
The test case lookinhg for the abort function in the stack trace.
Previously it lookd for a function which ends with "abort" but on some
system there are multiple such functions (e.g.: on android abort calls
__libc_android_abort) what made the test fail. This CL change the
behaviour to look for the abort function based on a fix list of names.

llvm-svn: 235584
2015-04-23 10:54:27 +00:00
Ed Maste 5ff2140527 Add decorator for signal test failing on FreeBSD
llvm.org/pr23318

llvm-svn: 235523
2015-04-22 17:06:48 +00:00
Ed Maste 6078597370 Skip additional lldb-mi tests that failed on FreeBSD
llvm-svn: 235510
2015-04-22 14:55:34 +00:00
Pavel Labath c32e04d82c XFAILing a single test in TestConcurrentEvents
apparently, TestConcurrentEvents is still not fixed. One test has failed on Linux i386 build.
Will disable the failing test on i386 for now, and see how it goes..

llvm-svn: 235504
2015-04-22 13:20:03 +00:00
Pavel Labath 5c3c43afc1 Enable TestConcurrentEvents on Linux
After the latest changes in NativeProcessLinux, these tests should be stable now. Please revert
(and let me know) if any issue crops up.

llvm-svn: 235502
2015-04-22 12:21:06 +00:00
Ying Chen 7091c2ca3f XFAIL tests that are failed on linux with gcc-4.9.2
Summary:
- add decorator functions to xfail and skip test on specific os, architecture and version of comipler
- xfail failing test with gcc-4.9.2 on linux
- add one usage of skipIf function

Test Plan:
Run tests with different archs, and version of compilers to verify decorator function working as expected
Run tests with gcc-4.9.2 and no failure reported

Reviewers: sivachandra, ovyalov, vharron, chaoren

Subscribers: lldb-commits

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

llvm-svn: 235368
2015-04-21 01:15:47 +00:00
Ying Chen 1ff46f2060 Add Makefile for typedef_array
-Makefile was deleted by r235313 causing test failure of TestTypedefArray.py, add it back

Summary: -Makefile was deleted by r235313 causing test failure of TestTypedefArray.py, add it back

Test Plan: Run lldb test locally with change, TestTypedefArray.py passed and no regression observed.

Reviewers: chaoren, sivachandra, vharron

Subscribers: lldb-commits

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

llvm-svn: 235346
2015-04-20 20:34:31 +00:00
Robert Flack fa8aa172ad Allow specifying tool path/prefix for tests with CROSS_COMPILE.
CROSS_COMPILE environment variable is a common convention to specify the path
and/or prefix to cross compilation tools (e.g. ar, objcopy).

Test Plan:
dotest.py $DOTEST_OPTS -t -p 'TestBSDArchives.py|TestBreakpointCommandsFromPython.py|TestFormats.py|TestObjCDynamicValue.py'
All of these tests now compile successfully and pass running macosx -> linux
using a cross compilation toolchain prefixed by CROSS_COMPILE without requiring
changing your PATH. They still pass when run locally on macosx.

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

llvm-svn: 235320
2015-04-20 18:07:55 +00:00
Sean Callanan f0c5aeb690 This patch implements several improvements to the
module-loading support for the expression parser.

- It adds support for auto-loading modules referred
  to by a compile unit.  These references are
  currently in the form of empty translation units.
  This functionality is gated by the setting

  target.auto-import-clang-modules (boolean) = false

- It improves and corrects support for loading
  macros from modules, currently by textually
  pasting all #defines into the user's expression.
  The improvements center around including only those
  modules that are relevant to the current context -
  hand-loaded modules and the modules that are imported
  from the current compile unit.

- It adds an "opt-in" mechanism for all of this
  functionality.  Modules have to be explicitly
  imported (via @import) or auto-loaded (by enabling
  the above setting) to enable any of this
  functionality.

It also adds support to the compile unit and symbol
file code to deal with empty translation units that
indicate module imports, and plumbs this through to
the CompileUnit interface.

Finally, it makes the following changes to the test
suite:

- It adds a testcase that verifies that modules are
  automatically loaded when the appropriate setting
  is enabled (lang/objc/modules-auto-import); and

- It modifies lanb/objc/modules-incomplete to test
  the case where a module #undefs something that is
  #defined in another module.

<rdar://problem/20299554>

llvm-svn: 235313
2015-04-20 16:31:29 +00:00
Pavel Labath bd7cbc5a97 NativeProcessLinux: Merge operation and monitor threads
Summary:
This commit moves the functionality of the operation thread into the new monitor thread. This is
required to avoid a kernel race between the two threads and I believe it actually makes the code
cleaner.

Test Plan: Ran the test suite a couple of times, no regressions.

Reviewers: ovyalov, tberghammer, vharron

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 235304
2015-04-20 13:53:49 +00:00
Chaoren Lin 2daf3a27c4 TestMiBreak - func isn't always ??.
Summary: Caused a failure because it showed up as `__printf`.

Reviewers: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 235214
2015-04-17 17:33:43 +00:00
Ilia K e56335c265 Fix the MiVarTestCase.test_lldbmi_var_create_register test to expect 32bit value on 32bit systems
llvm-svn: 235204
2015-04-17 16:55:36 +00:00
Ilia K 6812223c08 Fix the MiVarTestCase.test_lldbmi_var_create_register test on 32bit systems
llvm-svn: 235197
2015-04-17 15:45:32 +00:00
Ilia K d854180afb MI support for '-var-create $regname' command.
Summary:
This command is currently processed using expression evaluation, meaning the variable binds to the result of the expression not the register.
Therefore any subsequent calls to '-var-assign' will not update the register. Fixed by detecting '$' prefix for registers according to specification.

Thanks, Ewan

Patch from ewan@codeplay.com

Reviewers: EwanCrawford

Subscribers: lldb-commits, deepak2427

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

llvm-svn: 235195
2015-04-17 14:49:54 +00:00
Ilia K 908cba40b6 Use lazy regex in lldb-mi tests
This patch also fixes the timing issue in MiBreakTestCase.test_lldbmi_break_insert_function test.

llvm-svn: 235189
2015-04-17 13:21:34 +00:00
Tamas Berghammer 3215d04a6d Make several test case arm32 compatible
llvm-svn: 235172
2015-04-17 09:37:06 +00:00
Pavel Labath 634b602983 XFAILing TestPrintStackTraces on linux to stabilize the build bot
llvm-svn: 235169
2015-04-17 09:05:26 +00:00