Commit Graph

11234 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
Colin Riley c9c55a26bd Add language command and LanguageRuntime plugin changes to allow vending of command objects.
Differential Revision: http://reviews.llvm.org/D9402

llvm-svn: 236443
2015-05-04 18:39:38 +00:00
Jim Ingham 204d0ee01f Fix a typo in the warning.
<rdar://problem/20799707>

llvm-svn: 236429
2015-05-04 17:33:33 +00:00
Oleksiy Vyalov 19f731f0ea Mark TestTypedefArray as XFAIL with Gcc.
llvm-svn: 236425
2015-05-04 15:20:25 +00:00
Mohit K. Bhakkad 1c34f7cf18 [LLDB][MIPS] Emulate instruction using MCDisassembler
Patch by Jaydeep Patil

EmulateInstructionMIPS64 has been modified to use llvm::MCDisassembler instead of duplicating the decoding logic.
Added emulation of few branch instructions for software single stepping

Reviewers: clayborg, jasonmolenda
Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D9319

llvm-svn: 236411
2015-05-04 06:28:04 +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
Jason Molenda 8980e6bc10 Change process kill to call Process::Destroy (force_kill = true);
follow-up to the change in r235158.  Right now if you attach to 
a process and type "kill", lldb doesn't kill it, it detaches.
<rdar://problem/20691198> 

llvm-svn: 236363
2015-05-01 23:39:48 +00:00
Enrico Granata b0e8a55d4d Fix an issue where the UTF dumper was ignoring the direction to generate uncapped dumps
llvm-svn: 236362
2015-05-01 22:57:38 +00:00
Chaoren Lin b2b3ff1860 Fixed some compiler warnings because of bit-width mismatches.
llvm-svn: 236323
2015-05-01 16:58:18 +00:00
Chaoren Lin 3ea689b313 Support remote-android with multiple connected devices.
Summary:
This change introduces a new URL scheme for `platform connect`:
```
adb://device-id:port
```

Reviewers: vharron, tberghammer, clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 236321
2015-05-01 16:49:28 +00:00
Chaoren Lin ec53482aef PosixPipes should not be copyable but should be movable.
Summary: This addresses Oleksiy's comment in D9307.

Reviewers: clayborg, ovyalov

Reviewed By: clayborg, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 236320
2015-05-01 16:49:23 +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
Sean Callanan 09b41c0785 Fixed some compiler warnings because of bit-width
mismatches.

llvm-svn: 236295
2015-05-01 00:44:36 +00:00
Sean Callanan 1376469a61 Updated our use of clang::Preprocessor to reflect
a change in the API used to get macros.

llvm-svn: 236292
2015-05-01 00:19:44 +00:00
Jim Ingham 2c83e336a1 Don't return nullptr when you mean to return an empty llvm::StringRef...
<rdar://problem/20747164>

llvm-svn: 236287
2015-04-30 23:45:07 +00:00
Jason Molenda ebd01b0ae6 Guard against the case where the Write method is called with
an argument pointing into the middle of m_buffer and then
Write() calls GrowBuffer() to resize m_buffer, leaving 
the content argument pointing into deallocated memory.

Patch by Kate Stone.
<rdar://problem/20756722> 

llvm-svn: 236286
2015-04-30 23:42:56 +00:00
Jason Molenda 29db330ce7 Use #include "lldb/API/SBCommandReturnObject.h" instead of <...>.
llvm-svn: 236284
2015-04-30 23:31:04 +00:00
Sean Callanan 68f85e7d6a Made macros from modules be injected before our
global convenience expression prefix.  Also ensured
that if macros are defined by the modules we don't
try to redefine them.  Finally cleaned up a bit of
code while I was in there.

<rdar://problem/20756642>

llvm-svn: 236266
2015-04-30 21:49:58 +00:00
Zachary Turner 26c0a5ea0d Remove the NullLog class introduced in r236174.
Based on list discussions, a different approach is desired for
reducing the visual impact of logging statements on the
readability of the code.  Another mechanism will be added in
a followup patch, but for now, since NullLog is unreferenced,
this patch just removes it.

This patch does *not* remove the other half of r236174, which was
to delete some dead code surrounding logging flags.

llvm-svn: 236259
2015-04-30 21:03:37 +00:00
Ilia K d8c1475f46 Fix Process::ResumeSynchronous which waits a process even in case of error
llvm-svn: 236231
2015-04-30 13:10:32 +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
Pavel Labath d351bcc858 Fix typo in Core/Log
llvm-svn: 236222
2015-04-30 10:47:56 +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
Chaoren Lin 1d6ab11141 Add CMAKE_EXECUTABLE_SUFFIX to build with Android toolchain on Windows.
Reviewers: vharron, zturner, flackr

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 236185
2015-04-29 23:59:22 +00:00
Richard Smith 63a41277fe Fix build after Clang API change in r236176.
llvm-svn: 236182
2015-04-29 23:46:48 +00:00
Zachary Turner b74e279fe1 Fix build broken by r236174.
Apparently va_list is literally a char* on Windows.

llvm-svn: 236177
2015-04-29 23:24:12 +00:00
Zachary Turner c1592658d5 Introduce a NullLog class, which ignores all messages.
The purpose of this class is so that GetLogIfAllCategoriesSet
can always return an instance of some class, whether it be a real
logging class or a "null" class, which ignores messages.  Code
that is littered with if statements that only log if the pointer
is non-null can get very unwieldy very quickly, so this should
help code readability in such circumstances.

Since I'm in this code anyway, I'm also deleting the
PrintfWithFlags methods, as well as all the flags, since they
appear to be dead code that have been superceded by newer
mechanisms and all the flags are simply ignored.

llvm-svn: 236174
2015-04-29 22:55:28 +00:00
Jason Molenda 3114703b5c Don't force a vendor check in ProcessMachCore::CanDebug() -- if this
is a Mach-O file and it is a Mach-O core file, activate the 
ProcessMachCore plugin.
<rdar://problem/20739989> 

llvm-svn: 236170
2015-04-29 22:17:45 +00:00
Jason Molenda 0e78cab17b Update to build sysv-arm/sysv-arm64/sblanguageinfo/registercontextlinux_arm64.
llvm-svn: 236169
2015-04-29 22:16:19 +00:00
Chaoren Lin 4dc65069a1 lldb-gdbserver should not use unnamed pipes on Windows.
llvm-svn: 236138
2015-04-29 19:01:43 +00:00
Chaoren Lin 66f2e12f7a Expose Close{Read/Write}FileDescriptor for pipes.
llvm-svn: 236136
2015-04-29 18:25:18 +00:00
Chaoren Lin a52f48412d Add file descriptor constructor for PipePosix.
llvm-svn: 236133
2015-04-29 17:36:58 +00:00
Chaoren Lin 3eb4b4589e Remove trap code from disassembly.
Summary:
NativeProcessProtocol uses ReadMemory internally for setting/checking
breakpoints but also for generic memory reads (Handle_m), this change adds a
ReadMemoryWithoutTrap for that purpose. Also fixes a bunch of misuses of addr_t
as size/length.

Test Plan: `disassemble` no longer shows the trap code.

Reviewers: jingham, vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 236132
2015-04-29 17:24:48 +00:00
Omair Javaid b78e05fead This patch adds support aarch64-linux-gnu (SysV) abi in lldb.
This code is also an import from MacOSx implementation as SysV abi is
similar to what has been implemented for MacOS but may require a few tweaks.

http://reviews.llvm.org/D8538

llvm-svn: 236098
2015-04-29 11:52:35 +00:00
Omair Javaid 52f825bd1c This patch adds required piece of code for SysV Abi for arm.
Its mostly imported from MacOSx ABI for arm which is similar.

Further tweaking a updates may be required at a later stage.

http://reviews.llvm.org/D8539

llvm-svn: 236097
2015-04-29 10:49:45 +00:00
Aidan Dodds ed9f612639 Fix bug in gdb-remote xml parser which failed to parse xml split over multiple rsp packets.
llvm-svn: 236095
2015-04-29 10:08:17 +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
Hafiz Abid Qadeer 7f2f0ccb0a Replace sprintf with snprintf to avoid a crash.
During testing -data-list-register-values, I saw a crash here due to buffer overflow.
This commit should fix the crash. There is still problem with printing 1-byte register
in some cases that I will fix separately.

No regression on MI test cases.

llvm-svn: 235991
2015-04-28 14:16:00 +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