Commit Graph

10998 Commits

Author SHA1 Message Date
Sean Callanan c2203a1cc3 Made the struct types test case a little stricter,
by verifying that we can pass a struct-typed variable
to a function that takes structs.

llvm-svn: 234348
2015-04-07 20:19:37 +00:00
Chaoren Lin 32c7265a12 Fix bug where an additional O packet is sent after inferior exits.
Summary:
ConnectionFileDescriptor::Read was returning eConnectionStatusError instead of 0
on m_shutting_down, which caused the caller to think that some number of bytes
were read.

Reviewers: jingham, vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 234341
2015-04-07 18:45:03 +00:00
Oleksiy Vyalov 1c1d76b379 Delete port forwarding if ConnectRemote fails.
http://reviews.llvm.org/D8826

llvm-svn: 234332
2015-04-07 17:23:15 +00:00
Sean Callanan 157f1af743 Fixed a problem where the second @import statement
in a session would be silently ignored by the compiler
because the compiler looked at its SourceLocation and
decided it had already handled it.

Also updated the relevant test case.

<rdar://problem/20315447>

llvm-svn: 234330
2015-04-07 17:02:02 +00:00
Tamas Berghammer c85b580e98 Fix host config for Android and remove android specific part form Linux.
llvm-svn: 234322
2015-04-07 16:08:32 +00:00
Pavel Labath 76d5df132a Remove check for windows when compiling scripts directory
this is a followup to r234319, change requested in http://reviews.llvm.org/D8855.

llvm-svn: 234321
2015-04-07 15:30:23 +00:00
Pavel Labath e4651eb033 Don't compile scripts directory if LLDB_DISABLE_PYTHON is set
Summary:
What looks like a typo has caused the scripts/Python directory to be compiled on non-Windows
platforms even with LLDB_DISABLE_PYTHON, which failed if Python.h was unavaiable. This changes
the condition to avoid compilation if LLDB_DISABLE_PYTHON is set.

Test Plan: Remove Python.h, verify compilation is successful.

Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 234319
2015-04-07 14:55:11 +00:00
Pavel Labath 67239b2f73 Add some documentation about cross-compilation to www.
Reviewers: zturner, vharron, tberghammer, omjavaid

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 234317
2015-04-07 14:36:23 +00:00
Tamas Berghammer 83544cf660 Ignore mapping symbols on aarch64
ELF symbol tables on aarch64 may contains some mapping symbols. They
provide information about the underlying data but interfere with symbol
look-up of lldb. They are already ignored on arm32. With this CL they
will be ignored on aarch64 also.

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

llvm-svn: 234307
2015-04-07 10:43:50 +00:00
Ilia K 68757ed2e9 implement gdb-set output-radix
Summary: Patch from chuckr@microsoft.com

Reviewers: abidh, ChuckR

Reviewed By: abidh

Subscribers: paulmaybee, ki.stfu, greggm, scarroll, lldb-commits

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

llvm-svn: 234305
2015-04-07 09:47:23 +00:00
Sean Callanan a85f0e82dc Fixed a crash because we weren't generating
type-safe relocations against @reloc_placeholder.

<rdar://problem/20438754>

llvm-svn: 234260
2015-04-06 23:51:08 +00:00
Ted Woodward e7e8e3cd89 Fix check for options in "command alias"
Summary:
"command alias" can add invalid options to the command. "command alias start process launch -s" will add an extra argument, "<no-argument>" to the alias, so it runs "process launch -s <no-argument>", which launches the process with args that include "<no-argument>".

This patch changes the text compare of the variable value with "<OptionParser::eNoArgument>" to a compare of variable value_type with OptionParser::eNoArgument. It also moves the previous test inside the if, so it won't add a trailing space if there is no argument.

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 234244
2015-04-06 21:55:14 +00:00
Siva Chandra c077b3d0ac Enable a test in TestSTL for GCC.
Summary:
Remove @skipIfGcc from a test in TestSTL as that test passes with GCC
now. Also, mark one of the dsym tests with @skipUnlessDarwin in TestSTL.

Test Plan: dotest.py -C gcc -p TestSTL

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 234243
2015-04-06 21:52:10 +00:00
Enrico Granata 30f3b220d6 Fix an issue where LLDB could crash when trying to figure out the return value layout for an invalid type
llvm-svn: 234239
2015-04-06 21:39:56 +00:00
Enrico Granata dc3c3ee852 If memory read does not find a NULL terminator, still print whatever it gathered instead of just NOP'ing out
However, remark that this is an incomplete chunk of data by still emitting the "no NULL found" warning

rdar://20330073

llvm-svn: 234194
2015-04-06 18:41:17 +00:00
Chaoren Lin b3015da7e4 Ignore IOError from missing child.log.
Summary:
TestMiCliSupport (among other TestMi*) fails on Linux with

```
IOError: [Errno 2] No such file or directory: 'child.log'
```

Reviewers: clayborg, ki.stfu

Reviewed By: ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 234191
2015-04-06 18:23:48 +00:00
Greg Clayton b23c24c2a8 We have an issue where if you use a C function right now that has no prototype, it isn't marked as extern "C" and the name to lookup is some C++ mangled form of the name.
This used to be the case for "printf" before a function prototype was added to the builtin expression prefix file. This fix makes sure that if we get a mangled name that we don't find in the current target, that we only fall back to looking up function by basename if the function isn't contained in a namespace or class (no decl context).

llvm-svn: 234178
2015-04-06 17:14:02 +00:00
Zachary Turner 6f21907a89 Fix printing of function names during unwind logging.
llvm-svn: 234172
2015-04-06 16:23:30 +00:00
Ed Maste 0f434e625b test: Move amd64 -> x86_64 translation to getArchitecture()
Rather than sprinkling this knowledge throughout the test suite, just
translate amd64 to x86_64 globally.

llvm-svn: 234166
2015-04-06 15:50:48 +00:00
Ed Maste af15b6dad9 test: Add amd64 architecture alias for x86_64
64-bit x86 is called amd64 on FreeBSD.

llvm-svn: 234164
2015-04-06 15:23:21 +00:00
Chaoren Lin 090132563b Copy paste error in gdb-remote doc.
llvm-svn: 234102
2015-04-04 19:09:18 +00:00
Chaoren Lin d702203c5e Use insert instead of append when adding to sys.path.
Similar problem as in the last part of r200486.

llvm-svn: 234071
2015-04-04 01:11:31 +00:00
Zachary Turner 43bac098b0 [dotest.py] Present a better error when lldb module can't be found.
We try to run lldb -P and jump through a bunch of other hoops
to figure out where the Python module is so that we can add its
location to sys.path.  The error message printed when this
doesn't work was left over from the time when Mac was the only
platform, so it presented a Mac-specific diagnostic on all
platforms related to the LLDB Framework.  This patch prints
a more useful diagnostic when not on Mac that gives a number
of other diagnostic messages to check.

llvm-svn: 234049
2015-04-03 20:56:15 +00:00
Ed Maste 4b1063c76c Fix FreeBSD crash after r233837
The FreeBSD debug register access is a little usual, but in any case
different from Linux. As it stands it's not possible to share an
implementation of DR_OFFSET, so revert that part of r233837 and provide
a separate FreeBSD and Linux implementation.

We'll still want a better fix, but this should restore basic
functionality (and the buildbot).

llvm-svn: 234048
2015-04-03 20:49:08 +00:00
Zachary Turner eaa9266ec5 Don't use literal slashes when concatenating paths in Python.
This patch fixes the swig generation scripts to use os.path.join
instead, which produces correctly normalized paths for platforms
that don't use the standard forward slash separator.

llvm-svn: 234030
2015-04-03 17:19:43 +00:00
Sean Callanan 9df9a67bdb Marked the modules tests as expected failures,
because the OS X builders aren't happy with them.

<rdar://problem/20416388>

llvm-svn: 234028
2015-04-03 17:17:12 +00:00
Adrian McCarthy 1d57433c50 Fix LLDB test tracing to include the output (stdout and stderr) of each shell command.
llvm-svn: 234025
2015-04-03 17:10:30 +00:00
Sean Callanan 7176ca2749 A new testcase had a silly integer-value mismatch.
Fixed that.

llvm-svn: 234023
2015-04-03 17:08:45 +00:00
Sean Callanan 8505434011 Added a testcase that covers loading a module and
verifying that the types from that module don't
override types from DWARF.  Also added a target setting
to LLDB so we can tell Clang where to look for these
local modules.

<rdar://problem/18805055>

llvm-svn: 234016
2015-04-03 15:39:47 +00:00
Benjamin Kramer 012e719574 Add missing semicolon in the windows plugin.
llvm-svn: 234007
2015-04-03 11:05:12 +00:00
Benjamin Kramer 3f69fa6f56 Sprinkle some #include <mutex> in files that use std::call_once.
llvm-svn: 234005
2015-04-03 10:55:00 +00:00
Bruce Mitchener 488c89ed77 Fix typo, fix build.
This typo was introduced as part of http://reviews.llvm.org/D8760

llvm-svn: 234003
2015-04-03 09:13:18 +00:00
Colin Riley 9e14f61f51 Adding the RenderScript language type.
Differential Revision: http://reviews.llvm.org/D8803

llvm-svn: 234002
2015-04-03 09:03:15 +00:00
Davide Italiano c8d69828ee [Plugin/Process] Use std::call_once() to initialize.
This replaces the home-grown initialization mechanism used before.

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

llvm-svn: 233999
2015-04-03 04:24:32 +00:00
David Blaikie 63097d3212 Fix the Linux build.
llvm-svn: 233990
2015-04-03 01:12:52 +00:00
Vince Harron 20952ccf90 TestRecursiveInferior fixed on Linux
Summary:
Updated test to reflect that Linux and Darwin behave the same now.

Removed @expectedFailureLinux for passing tests.

Test Plan: run tests

Reviewers: clayborg, sivachandra

Subscribers: lldb-commits

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

llvm-svn: 233989
2015-04-03 01:00:06 +00:00
Sean Callanan 2974e27682 Added a C language test case that verifies that
DWARF types and types from modules can coexist even
if they have the same name and refer to two different
things.

<rdar://problem/18805055>

llvm-svn: 233988
2015-04-03 00:24:32 +00:00
Sean Callanan 4e2de36443 Add checks to the modules test case to ensure
that module types and runtime types play well
together.

llvm-svn: 233976
2015-04-02 21:35:04 +00:00
Zachary Turner 48b475cbaa Fix warnings generated by clang-cl.
There were a couple of real bugs here regarding error checking and
signed/unsigned comparisons, but mostly these were just noise.

There was one class of bugs fixed here which is particularly
annoying, dealing with MSVC's non-standard behavior regarding
the underlying type of enums.  See the comment in
lldb-enumerations.h for details.  In short, from now on please use
FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which
contain values larger than can fit into a signed integer.

llvm-svn: 233943
2015-04-02 20:57:38 +00:00
Zachary Turner d4e1b8685e Fix error resulting from llvm r233938.
llvm-svn: 233942
2015-04-02 20:37:10 +00:00
Greg Clayton ff0cf4f56d Don't return a reference to a temp variable.
llvm-svn: 233940
2015-04-02 20:17:08 +00:00
Greg Clayton c00ca313fd Fix a crasher that could happen when you run LLDB and evaluate an expression where the objective C runtime registers a helper function, and also have an Objective C or C++ exception breakpoint. When shutting down the process in Process::Finalize() we clear a STL collection class and that causes objects to be destroyed that could re-enter Process and cause it to try to iterate over that same collection class that is being destroyed.
Guard against this by setting a new "m_finalizing" flag that lets us know we are in the process of finalizing.

<rdar://problem/20369152>

llvm-svn: 233935
2015-04-02 18:44:58 +00:00
Greg Clayton b0a650aca2 Fix a few more test suite errors where a cleanup lambda was calling self.runCmd() which requires the command returns successfully. Using self.dbg.HandleCommand() doesn't require success.
llvm-svn: 233934
2015-04-02 18:42:12 +00:00
Greg Clayton e0d0a7652d Many many test failures after some recent changes. The problem is lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin".
There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a:

lldbtest.platformIsDarwin()

which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function:

lldbtest.getDarwinOSTriples()

Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well.

llvm-svn: 233933
2015-04-02 18:24:03 +00:00
Tamas Berghammer dcc8e595cb Use objcopy provided next to the compiler on android
Differential revision: http://reviews.llvm.org/D8765

llvm-svn: 233908
2015-04-02 11:09:28 +00:00
Tamas Berghammer 2e16902084 Fix test expectation for aarch64 in several test case
These test cases check if they are able to read registers after the
inferior is crashed. Previously they did it with reading the eax
register what is only available on i386 and x86_64. Thic CL add code to
do the check based on the target architecture (currently i386, x86_64
and aarch64 is supported)

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

llvm-svn: 233907
2015-04-02 11:07:55 +00:00
Jason Molenda dfb02a9e0d Handle LC_ENCRYPTION_64 in addition to LC_ENCRYPTION load commands in
Mach-O files.
<rdar://problem/20113673> 

llvm-svn: 233893
2015-04-02 05:19:33 +00:00
Jason Molenda c48ef341e1 Add a tiny bit of hardening to the eh_frame and compact unwind parsing.
When we're seeing offsets that exceed the size of our section, don't 
try to use that unwind info.
<rdar://problem/20113673> 

llvm-svn: 233886
2015-04-02 04:35:32 +00:00
Siva Chandra 2af5dbb1dd Remove the unused m_ast_context member of ClangExpressionParser.
Test Plan: Build LLDB.

Reviewers: spyffe

Subscribers: lldb-commits

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

llvm-svn: 233868
2015-04-02 00:02:46 +00:00
Sean Callanan bc0217396e Fixed a bug where we didn't return a value from a
lambda in SymbolFileDWARFDebugMap.

<rdar://problem/20261196>

llvm-svn: 233858
2015-04-01 22:12:57 +00:00