Commit Graph

13045 Commits

Author SHA1 Message Date
Sean Callanan c3e3144df2 Don't codesign lldbserver if debugserver codesigning is disabled, because it
probably won't work.

llvm-svn: 251527
2015-10-28 17:14:27 +00:00
Todd Fiala 7c9aa073fb Fix build break on OS X from cleanup check-in.
I'll track down why our CI is not sending out emails on build breaks.

llvm-svn: 251522
2015-10-28 15:24:19 +00:00
Ravitheja Addepally f546b411d0 Changes for Bug 17384
Summary:
Virtual dynamic shared objects, or vdso files were 
not loaded for Linux OS.In Bug 17384 the call 
stack could not be unwinded from functions
residing in the vdso object.

This commit adds support for loading such files by
reading the Aux vectors since a vdso is invisibily 
mapped to the inferiors address space and the
 actual file is not present in the filesystem. The 
presence of the vdso is detected by inspecting 
the Aux vector for AT_SYSINFO_EHDR tag.

Reviewers: lldb-commits, ovyalov, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 251505
2015-10-28 09:47:29 +00:00
Eugene Zelenko 2d744d0423 Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Core; other minor fixes.
llvm-svn: 251470
2015-10-28 00:18:41 +00:00
Zachary Turner 9e84535351 Fix line endings to be LF instead of CRLF.
llvm-svn: 251462
2015-10-27 22:54:46 +00:00
Zachary Turner af383ff70c Preparation for turning lldbsuite into a Python package.
The idea behind this patch is to expose the meat of
LLDB's Python infrastructure (test suite, scripts, etc)
as a single package.  This makes reusability and code
sharing among sub-packages easy.

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

llvm-svn: 251460
2015-10-27 22:33:47 +00:00
Todd Fiala 0437f0351a Fix editline unindentation code for more recent libedits.
This code was modifying the cursor and then expecting the editline
API call to see the effect for the next operation.  This is misusing
the API.  Newer editlines break on this code, fixed by this.

llvm-svn: 251457
2015-10-27 21:53:39 +00:00
Zachary Turner 0a0490b152 Rename `lldb_shared` to `use_lldb_suite`.
llvm-svn: 251444
2015-10-27 20:12:05 +00:00
Chaoren Lin 339428232a Use accept4 workaround for MIPS Android build.
Summary: Similar to http://reviews.llvm.org/rL242319, which was for ARM.

Reviewers: chying, ovyalov

Subscribers: aemerson, tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 251439
2015-10-27 19:17:35 +00:00
Hafiz Abid Qadeer 6eb683891f Include <cstdio> to fix build errors.
This file uses things like fprintf and stderr and <cstdio> is the right
header to include. I was getting build errors without it.

llvm-svn: 251426
2015-10-27 17:56:23 +00:00
Oleksiy Vyalov a29d6475e6 Treat hostname in android URL as device id unless it matches "localhost".
http://reviews.llvm.org/D14101

llvm-svn: 251422
2015-10-27 17:41:34 +00:00
Hafiz Abid Qadeer cc8c0202b3 Add a file in Makefile build which is present in CMake build.
Since 219143, this file is missing from Makefile build. Committed as
obvious.

llvm-svn: 251421
2015-10-27 17:39:22 +00:00
Oleksiy Vyalov db4d9865b4 Add Socket::Create factory method which uses socket protocol to find an appropriate implementation class.
http://reviews.llvm.org/D14085

llvm-svn: 251417
2015-10-27 17:32:01 +00:00
Eugene Zelenko d5cc99c3dd Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/DataFormatters, Breakpoint and Utility; other minor fixes.
llvm-svn: 251416
2015-10-27 17:20:33 +00:00
Tamas Berghammer 458d3d6a5e Fix MSVC build after r251402
llvm-svn: 251403
2015-10-27 10:56:35 +00:00
Tamas Berghammer 9fa1147052 Some minor improvements on the symtab parsing code
* Remove an unneccessary re-computaion on arch spec from the ELF file
* Use a local cache to optimize name based section lookups in symtab
  parsing
* Optimize C++ method basename validation with replacing a regex with
  hand written code

These modifications reduce the time required to parse the symtab from
large applications by ~25% (tested with LLDB as inferior)

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

llvm-svn: 251402
2015-10-27 10:43:27 +00:00
Pavel Labath e272b77120 Deprecate -m/+m dotest options in favor of test categories
Summary:
This change deprecates -m/+m dotest options (the options are still recognized but they print an
error message pointing to the new options) and adds a new lldb-mi test category instead. To just
run lldb-mi tests, use '-G lldb-mi'. To skip lldb-mi tests, use '--skip-category lldb-mi'. All
lldb-mi tests are marked as such using the getCategories method on the base MiTestCaseBase class
and the @lldbmi_test decorator is not needed. In case one still needs to annotate a specific test
function as an lldb-mi test, one can use the @add_test_categories(['lldb-mi']) decorator to
achieve that.

Reviewers: tfiala, dawn, ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 251400
2015-10-27 09:34:34 +00:00
Pavel Labath 9e131f7fef Fix race condition in process resume
Summary:
Gdb-remote's async thread sent out the eBroadcastBitRunPacketSent message *before* actually
sending out the continue packet. Since it's this message the actually triggers the public state
transition, it could happen (and it did happen in TestAttachResume, which does an "process
interrupt" right after a continue) that we attempt to stop the inferior before it was actually
started (which obviously did not end well). This fixes the problem by moving the broadcast after
the packet was actually sent.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 251399
2015-10-27 09:23:55 +00:00
Omair Javaid d5510d1e5c Fix for Arm watchpoint cache corruption in case of ptrace failure
Differential revision: http://reviews.llvm.org/D14051

llvm-svn: 251386
2015-10-27 05:56:56 +00:00
Enrico Granata e7cbaf3e0e Minor cleanup of SBTypeSummary::CreateWithCallback to take an optional description argument
llvm-svn: 251377
2015-10-27 01:17:28 +00:00
Enrico Granata 9e9cf54eb2 Add calls to the SB API to access the multi-language formatter category feature
llvm-svn: 251376
2015-10-27 01:10:35 +00:00
Eugene Zelenko 222b937c55 Fix Clang-tidy modernize-use-override warnings in source/Plugins/LanguageRuntime and Platform; other minor fixes.
llvm-svn: 251374
2015-10-27 00:45:06 +00:00
Enrico Granata 6ed1d75a9f Change TestTypeCompletion to not rely on std::string
On some combination of platform and c++ library, this dependency was causing the test to fail for reasons tangential to its real objective

llvm-svn: 251368
2015-10-26 23:39:12 +00:00
Adrian McCarthy 3f989d4e6e Revert "Clang module compilation options need to be per-platform."
This reverts commit r251340.

Breaks the Windows build because Windows doesn't have getuid.  The fix is not obvious.

llvm-svn: 251354
2015-10-26 21:38:41 +00:00
Stephane Sezer 2a81c0c43a Remove some useless typedef's.
Summary:
This does not have any functionnal difference but I found myself
searching for 'struct RegisterInfo$' to find a definition and couldn't
find it. The version without typedef seems more common so let's try and
be consistent.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 251351
2015-10-26 21:32:31 +00:00
Sean Callanan df0ac7038f Clang module compilation options need to be per-platform.
On UNIX (but not Darwin) the username needs to be respected when creating a 
temporary module directory, so that different users don't pollute each others'
module caches.

llvm-svn: 251340
2015-10-26 20:33:24 +00:00
Zachary Turner cd236b8cc6 Python 3: Convert uses of `callable(x)` to `six.callable(x)`.
llvm-svn: 251329
2015-10-26 18:48:24 +00:00
Zachary Turner 1411668b6a Remove use of octal literals.
Python 3 has a different syntax for octal literals than Python 2
and they are incompatible with each other.  Six doesn't provide
a transparent wrapper around this, so the most sane thing to do
is to not use octal literals.  If you need an octal literal,
use a decimal literal and if it's not obvious what the value is,
provide the value in octal as a comment.

llvm-svn: 251328
2015-10-26 18:48:14 +00:00
Tamas Berghammer c9eb2fcd7d Fix an API missues in ParseTypeFromDWARF
The arguments for ClangASTContext::CreateMemberPointerType was passed
in in the wrong order.

llvm-svn: 251319
2015-10-26 18:10:55 +00:00
Greg Clayton 22fd3b1dee Fixed the test suite on MacOSX so that "test/api/multithreaded/TestMultithreaded.py" works without errors.
The problem was that the @skipIfNoSBHeaders on darwin was trying to use self.lib_dir when it hadn't been set yet.

I looked at the code and places were required to set "self.lib_dir" for no real reason as all places that used it just used the LLDB_LIB_DIR environment variable. So I removed all uses of self.lib_dir and replaced them to use 'os.environ["LLDB_LIB_DIR"]'. Did the same for self.implib_dir.

llvm-svn: 251315
2015-10-26 17:52:16 +00:00
Greg Clayton 5dff6969ea Re-use prologue parsing code that was already written instead of having two copies of code that parse line table prologues.
Also since we always read in the DWARF data or mmap it, we don't need to make a copy of the strings for the directories and file names, we can just store "cosnt char *" values. Every place that uses the prologues use them temporarily and then throw them away so no one is expecting the directory and filename strings to live longer than the parse functions.

llvm-svn: 251310
2015-10-26 17:16:50 +00:00
Eugene Zelenko 315b688457 Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes.
llvm-svn: 251309
2015-10-26 17:00:13 +00:00
Zachary Turner b2662a27ec Fix tabs and spaces in one of the python files.
llvm-svn: 251308
2015-10-26 16:51:36 +00:00
Zachary Turner 598c661d40 Wrap call to zip() in list()
llvm-svn: 251307
2015-10-26 16:51:28 +00:00
Zachary Turner da3dea6122 Python3 - Change sys.maxint to sys.maxsize.
Python3 has no analogue to sys.maxint since ints in Python 3 have
arbitrary size.  However, the distinction was not actually important
in any of these cases, and in a few cases using maxint was already
a bug to begin with.

llvm-svn: 251306
2015-10-26 16:51:20 +00:00
Zachary Turner f67f7e31e7 Convert `long` to `int`, and portably detect all integral types.
llvm-svn: 251305
2015-10-26 16:51:09 +00:00
Zachary Turner 36b225913c Python3 - Change `dict.has_key(x)` to `x in dict`
llvm-svn: 251304
2015-10-26 16:50:51 +00:00
Zachary Turner 210eb970de Convert deprecated unittest method names.
Plural methods were long deprecated, and in Python 3 they are gone.
Convert to the actual supported method names.

llvm-svn: 251303
2015-10-26 16:50:39 +00:00
Zachary Turner 744cd5d8ed Fix usages of range() and xrange() for Python 3.
llvm-svn: 251302
2015-10-26 16:49:57 +00:00
Pavel Labath c4645bb0e6 [lldb-server] Send PC of every thread along in the stop-reply packet
This avoids the need to query the PC for private resume operations (public resumes have the PC
from the bigger jStopInfo packet) and speeds up the stepping on an android target by about 10%
(it some cases even more).

llvm-svn: 251301
2015-10-26 16:25:28 +00:00
Ewan Crawford 018f5a7e0b [RenderScript] Add option to break on a specific kernel invocation
Adds option -c <x,y,z> to the 'language renderscript kernel breakpoint set' command.

Breaks only on the invocation of the kernel with specified coordinate.
Implemented by adding a callback to the kernel breakpoint which checks the coordinates of every invocation.

llvm-svn: 251293
2015-10-26 14:04:37 +00:00
Tamas Berghammer 29932b01f6 Fix a fission expression evaluation issue
This fix should eliminate the duplicate definition errors when debug
info is available in multiple dwo symbol file for the same type.

llvm-svn: 251282
2015-10-26 10:53:58 +00:00
Pavel Labath dc8b2d3d3a Port the python api decorator to use test categories
Summary:
Per discussions on the mailing list, I have implemented a decorator which annotates individual
test methods with categories. I have used this framework to replace the '-a' and '+a'
command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test
decorator (now @add_test_categories('pyapi')). The test suite now gives an error message
suggesting the new options if the user specifies the deprecated +/-a switches. If the general
direction is good, I will follow this up with other switches.

Reviewers: tberghammer, tfiala, granata.enrico, zturner

Subscribers: lldb-commits

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

llvm-svn: 251277
2015-10-26 09:28:32 +00:00
Sylvestre Ledru 4cfc919861 Fix a build issue on Debian unstable. The compiler rejected the convertion to ‘bool’ from ‘std::nullptr_t’
llvm-svn: 251276
2015-10-26 08:49:04 +00:00
Omair Javaid 4aa984c1a2 Corrects return values and typos in Arm watchpoint code
This is just a trivial patch that corrects a couple of return value account to function's return type.
Also corrects typo in hardware breakpoint handler.

llvm-svn: 251269
2015-10-25 23:18:35 +00:00
Todd Fiala 7b6f77e85b Fix a copy-and-paste error on new Editline test cmake configuration.
llvm-svn: 251264
2015-10-25 21:54:56 +00:00
Todd Fiala 528a30d62c Xcode: added lldb-gtest target to build and run the gtests in the unittests directory.
Also added a placeholder Editline gtest for some code that I'll add as soon
as I make sure this addition doesn't break any of the build bots.

This change also introduces some Xcode user-defined variables that I've used
to attempt to isolate the way Python is integrated into the build.  I don't have
the rest of LLDB using it yet, I'm using the gtests as my guinea pig on that.
Currently these are:
PYTHON_FRAMEWORK_PATH
PYTHON_VERSION_MAJOR
PYTHON_VERSION_MINOR

I will convert the rest over to it after this gets a little time to bake
and any kinks are worked out of it.

llvm-svn: 251261
2015-10-25 21:42:35 +00:00
Todd Fiala a80113a5ff Added some top-level unittests files that I missed in the last check-in.
I am also letting a debugserver-related project entry slide in
since Xcode seems to insist on inserting it, and when I remove it
the new files don't show up.

llvm-svn: 251243
2015-10-25 16:53:08 +00:00
Todd Fiala 3f1085d538 Add lldb/unittests files to the Xcode lldb project.
llvm-svn: 251240
2015-10-25 16:22:46 +00:00
Jason Molenda e376c40308 Remove some unnecessary macosx.internal SDK settings in
the debugserver xcode project file.

llvm-svn: 251221
2015-10-25 06:51:37 +00:00