Commit Graph

13022 Commits

Author SHA1 Message Date
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
Dawn Perchik b5d425ecfb [lldb-mi] Fix expansion of anonymous structures and unions
A variable of type:
    struct S {
       union {
           int            i1;
           unsigned u1;
       };
       union {
           int            i2;
           unsigned u2;
       };
    };
had been impossible to evaluate in lldb-mi, because MI assigns '??' as the
variable name to each of the unnamed unions after "-var-list-children" command.
Also '??' incorrectly goes to 'exp' field which is treated by IDE as a
structure field name and is displayed in watch window.

The patch fixes this returning empty string as type name for unnamed union and
assigning $N to variable name, where N is the field number in the parent entity.

Patch from evgeny.leviant@gmail.com
Reviewed by: clayborg, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13947

llvm-svn: 251176
2015-10-24 02:01:28 +00:00
Dawn Perchik e3f250dbda [debugserver] Fix OSX build for older XCode versions after r251091.
This fixes the OSX build for XCode versions older than 7 by skipping
references to LC_VERSION_MIN_TVOS and LC_VERSION_MIN_WATCHOS if
TARGET_OS_TV or TARGET_OS_WATCH aren't defined.

Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D14036

llvm-svn: 251172
2015-10-24 01:31:12 +00:00
Bruce Mitchener ac1cb4fadf Add initial gmake glue for the NetBSD platform
Summary:
These changes aren't everything what is needed for the autotools target, but it's significantly approaching it.

These changes shouldn't effect the build process on other platforms.

Patch by Kamil Rytarowski, thanks!

Reviewers: joerg, brucem

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

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

llvm-svn: 251171
2015-10-24 01:28:24 +00:00
Eugene Zelenko 0722f08da3 Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to fix MSVC builds failures.
llvm-svn: 251170
2015-10-24 01:28:05 +00:00
Dawn Perchik 51ac8a0e17 [debugserver] Fix indentation in RNBRemote.cpp.
llvm-svn: 251169
2015-10-24 01:24:00 +00:00
Eugene Zelenko edb35d95d1 Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
llvm-svn: 251167
2015-10-24 01:08:35 +00:00
Bruce Mitchener 284350e540 [lldb-mi] Fix unused variable warning.
llvm-svn: 251166
2015-10-24 00:30:18 +00:00
Bruce Mitchener 64f74da568 Add initial CMake glue for the NetBSD platform
Summary:
These changes aren't everything what is needed for the CMake target, but it's significantly approaching it.

These changes shouldn't effect the build process on other platforms.

Patch by Kamil Rytarowski, thanks!

Reviewers: joerg, brucem

Subscribers: lldb-commits

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

llvm-svn: 251164
2015-10-24 00:27:04 +00:00
Eugene Zelenko fe4ae5e7a4 Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Interpreter; other minor fixes.
Differential Revision: http://reviews.llvm.org/D14025

llvm-svn: 251162
2015-10-24 00:20:14 +00:00
Enrico Granata 79c4ee4d98 Lower the depth of the recursion in this test since it would on occasion timeout and add noise to test runs
llvm-svn: 251161
2015-10-24 00:15:57 +00:00
Sean Callanan 3b436d23ca Fixed some issues with reporting "this" when the current function is not listed
in DWARF as a member of a class, but it has a "this" parameter.  Specifically,
*this needs to have the LLDB expression added as a method.

This fixes TestWithLimitDebugInfo.

llvm-svn: 251151
2015-10-23 21:45:02 +00:00
Siva Chandra 671dadd8f6 [TestBreakpointCommand] Fix after r251121
Summary:
"from __future__ import print_function" was added to the test file but
not to the embedded interpreter. This change uses file.write instead to
avoid all problems with print.

Reviewers: zturner

Subscribers: zturner, lldb-commits

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

llvm-svn: 251150
2015-10-23 21:38:04 +00:00
Zachary Turner 58968ac83f Make uses of unicode literals portable.
Six provides six.u() which resolves to either u"" or "" depending on
Python version, and and six.unichr() which resolves to either unichr()
or chr() depending on Python version.  Use these functions anywhere
where we were relying on u"" or unichr().

llvm-svn: 251139
2015-10-23 19:52:36 +00:00
Eugene Zelenko 8f30a65ca3 Fix Clang-tidy modernize-use-override warnings in source/Target; other minor fixes.
llvm-svn: 251134
2015-10-23 18:39:37 +00:00
Zachary Turner a3cebaf5e9 Disable a compiler warning on MSVC.
This is caused by a bug in MSVC's library implementation.  It's
fixed in the next version of the compiler, but for now the only
way to silence this is to disable the warning.

llvm-svn: 251130
2015-10-23 17:54:00 +00:00
Zachary Turner 606e1e33ef Python3 - Wrap more statements in calls to list()
llvm-svn: 251129
2015-10-23 17:53:51 +00:00
Zachary Turner 3ad38749fd Remove argparse_compat.
We don't support versions of Python less than 2.7

llvm-svn: 251128
2015-10-23 17:53:30 +00:00
Zachary Turner 35d017f0fc Add from __future__ import print_function everywhere.
Apparently there were tons of instances I missed last time, I
guess I accidentally ran 2to3 non-recursively.  This should be
every occurrence of a print statement fixed to use a print function
as well as from __future__ import print_function being added to
every file.

After this patch print statements will stop working everywhere in
the test suite, and the print function should be used instead.

llvm-svn: 251121
2015-10-23 17:04:29 +00:00
Eugene Zelenko 8157a8874d Fix Clang-tidy modernize-use-override warnings in source/Plugins/ObjectContainer and ObjectFile; other minor fixes.
llvm-svn: 251119
2015-10-23 16:56:07 +00:00
Tamas Berghammer ce26b7a6ee Fix arm lldb-server on aarch64 device
* Use PTRACE_GETVFPREGS/PTRACE_SETVFPREGS to access the floating point
  registers instead of the old PTRACE_GETFPREGS/PTRACE_SETFPREGS. The
  new call is available since armv5.
* Work around a kernel issue in PTRACE_POKEUSER with reading out the full
  register set, modifying the neccessary value and then writing it back.

llvm-svn: 251111
2015-10-23 13:36:31 +00:00
Tamas Berghammer 5ee6b7f4b2 Try to fix MSVC build after r251105
llvm-svn: 251109
2015-10-23 10:53:31 +00:00
Tamas Berghammer e7ec227839 Disable the strict-aliasing warnings produced by gcc
GCC produce a lot of strict-aliasing warning for the LLDB codebase
what makes reading the compile output very difficult. This change
disable these warnings to reduce the noise as we already ignore them.

We should consider re-enabling the warning if we fix all (or most)
strict-aliasing violation first.

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

llvm-svn: 251107
2015-10-23 10:34:53 +00:00
Tamas Berghammer 2ff8870b6f Re-commit "Make dwarf parsing multi-threaded"
Re-commit the change after fixing a lot of race condition in LLDB
exposed by this change

Loading the debug info from a large application is the slowest task
LLDB do. This CL makes most of the dwarf parsing code multi-threaded.

As a result the speed of "attach; backtrace; exit;" when the inferior
is an LLDB with full debug info increased by a factor of 2.

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

llvm-svn: 251106
2015-10-23 10:34:49 +00:00