Commit Graph

13801 Commits

Author SHA1 Message Date
Saleem Abdulrasool 329860e495 Revert r258546.
Seems that the patch was rebased on top of another change which obsoleted the
change but wasnt caught.

Thanks to nbjoerg for pointing this out!

llvm-svn: 258821
2016-01-26 17:43:48 +00:00
Benjamin Kramer 79dad1d056 Update for LLVM change
llvm-svn: 258819
2016-01-26 16:45:00 +00:00
Ewan Crawford b649b0053b [RenderScript] Provide option to specify a single allocation to print
Patch replaces the 'renderscript allocation list' command flag --refresh, with a new option --id <ID>.
This new option only prints the details of a single allocation with a given id, rather than printing all the allocations.
Functionality from the removed '--refresh' flag will be moved into its own command in a subsequent commit.

llvm-svn: 258800
2016-01-26 10:41:08 +00:00
Enrico Granata dd54a3a887 Reverting r258759 as it is breaking the OSX build
llvm-svn: 258791
2016-01-26 04:53:10 +00:00
Zachary Turner a37eac51de Fix TestRerun.py on Windows.
This is another example of a test that was looking for the thread
at index 0 instead of requesting the thread that was stopped at
the created breakpoint.  This assumption isn't true on Windows 10.

llvm-svn: 258764
2016-01-26 01:19:50 +00:00
Sean Callanan bca81c5a18 Fix the lldbinline tests so they make well-formed Makefiles.
lldbinline tests previously did not run correctly unless there was already a
Makefile for them.  This was because the syntax of the emitted Makefile made the
default make rule be the "cleanup" rule, which is pretty unhelpful.  Now the
default rule is the one included from Makefile.rules, which is much better.

llvm-svn: 258763
2016-01-26 01:15:57 +00:00
Zachary Turner ff33e3636d Remove XFAIL Windows from a test that was fixed by r258758.
llvm-svn: 258761
2016-01-26 01:09:38 +00:00
Zachary Turner 00b87282cd Write the session log file in UTF-8.
Previously we were writing in the default encoding, which depends
on the operating system and is not guaranteed to be unicode aware.
On Python 3, this would lead to a situation where writing unicode
text to the log file generates an exception.  The fix here is to
write session logs using the proper encoding, which incidentally
fixes another test, so xfail is removed from that.

llvm-svn: 258759
2016-01-26 00:59:42 +00:00
Adrian McCarthy c35b91cee2 Set symbol types for function symbols loaded from PE/COFF
This fixes the regression of several tests on Windows after rL258621.

The root problem is that ObjectFilePECOFF was not setting type information for the symbols, and the new CL rejects symbols without type information, breaking functionality like thread step-over.

The fix sets the type information for functions (and creates a TODO for other types).

Along the way, I fixed some typos and formatting that made the code I was debugging harder to understand.

In the long run, we should consider replacing most of ObjectFilePECOFF with the COFF parsing code from LLVM.

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

llvm-svn: 258758
2016-01-26 00:58:09 +00:00
Zachary Turner 240c72b72c Fix TestSyntheticCapping for Python 3.
In Python 3, whitespace inconsistences are errors.  This synthetic
provider had mixed tabs and spaces, as well as inconsistent
indentation widths.  This led to the file not being imported,
and naturally the test failing.  No functional change here, just
whitespace.

llvm-svn: 258751
2016-01-26 00:07:09 +00:00
Zachary Turner 4407396fb9 Fix some issues with bytes and strings in Python 3.
SBProcess::ReadMemory and other related functions such as
WriteMemory are returning Python string() objects.  This means
that in Python 3 that are returning Unicode objects.  In reality
they should be returning bytes objects which is the same as a string
in Python 2, but different in Python 3.  This patch updates the
generated SWIG code to return Python bytes objects for all
memory related functions.

One quirk of this patch is that the C++ signature of ReadCStringFromMemory
has it writing c-string data into a void*.  This confuses our swig
typemaps which expect that a void* means byte data.  So I hacked up
a custom typemap which maps this specific function to treat the
void* as string data instead of byte data.

llvm-svn: 258743
2016-01-25 23:21:18 +00:00
Zachary Turner bea3a85151 Fix more occurrences of string/bytes/bytearray in swig typemaps.
llvm-svn: 258742
2016-01-25 23:21:13 +00:00
Zachary Turner f9d6d204e8 Fix swig typemap for SBEvent.
This needs to be able to handle bytes, strings, and bytearray objects.
In Python 2 this was easy because bytes and strings are the same thing,
but in Python 3 the 2 cases need to be handled separately.  So as not
to mix raw Python C API code with PythonDataObjects code, I've also
introduced a PythonByteArray class to PythonDataObjects to make the
paradigm used here consistent.

llvm-svn: 258741
2016-01-25 23:21:09 +00:00
Adrian McCarthy 60897300c5 Fix TestSourceManager.py on Windows.
Python 3.5 is picky about writing strings to binary files, so we now open the
file in text mode, and we explicitly set the newline mode to avoid re-writing
it with CR+LF on Windows (which causes git to think the file had changed).

llvm-svn: 258704
2016-01-25 19:13:35 +00:00
Sagar Thakur 9986ed6aa8 [LLDB][MIPS] Fix TestPrintStackTraces.py
Patch by Nitesh Jain.

Summary: The thread_start function in libc doesn't contain any epilogue and prologue instructions. Hence unwinding fail when we are stopped in thread_start.

Reviewers: ovyalov, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: reviews.llvm.org/D16136
llvm-svn: 258685
2016-01-25 12:33:03 +00:00
Sagar Thakur 60481839c0 [LLDB][MIPS] Fix TestExprsChar.py
Patch by Nitesh Jain.

Summary: When incorrect type used for 'char' then (at least) one of the expression evaluates to incorrect value. Please refer to bug llvm.org/pr23069

Reviewers: ovyalov, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: reviews.llvm.org/D16132
llvm-svn: 258684
2016-01-25 12:27:46 +00:00
Mohit K. Bhakkad 0d9dd7df60 [LLDB] Consider only valid symbols while resolving by address
Reviewers: clayborg.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D16397

llvm-svn: 258621
2016-01-23 10:36:06 +00:00
Todd Fiala efbb273ea0 Skipped IncompleteModulesTestCase on OS X
This is hitting an assert in clang when evaluating the
module load.  I am seeing it locally on Xcode 7.3 public Beta 1
and on the llvm.org Green Dragon buildbot supposedly running
Xcode 7.0.

Tracked by:
https://llvm.org/bugs/show_bug.cgi?id=26267

llvm-svn: 258602
2016-01-23 02:34:16 +00:00
Todd Fiala 299d42a170 fixed TestConsecutiveBreakpoints test on OS X
Also renamed directory and class name to fix typos.

llvm-svn: 258601
2016-01-23 02:24:41 +00:00
Zachary Turner ec56018938 Fix missing function argument passthrough.
llvm-svn: 258592
2016-01-23 00:49:11 +00:00
Zachary Turner 8012496a91 Decode files with UTF-8 in lldbutil.line_number.
Since Unicode support is different in Py2 and Py3, Py3 was throwing
exceptions about being unable to decode the file with the default
encoding.

llvm-svn: 258588
2016-01-22 23:54:49 +00:00
Zachary Turner 9bd1c596dd Un xfail TestSettings.test_run_args_and_env_vars_with_dwarf
llvm-svn: 258587
2016-01-22 23:54:45 +00:00
Zachary Turner 1da094a5ec More fixes related to counting threads on Windows.
The Windows 10 loader spawns threads at startup, so
tests which count threads or assume that a given user
thread will be at a specific index are incorrect in
this case.  The fix here is to use the standard mechanisms
for getting the stopped thread (which is all we are
really interested in anyway) and correlating them with
the breakpoints that were set, and doing checks against
those things.

This fixes about 6 tests on Windows 10.

llvm-svn: 258586
2016-01-22 23:54:41 +00:00
Todd Fiala 8c8c9fb5d4 candidate fix for Green Dragon lldb testbot
The python test run target started failing recently.
I tracked it down to what looks like the passing of
environment variables into the python script.

This locally fixes the vast majority of errors that
were ultimately inferior test build command failures.
Not sure what caused that to start happening.

llvm-svn: 258585
2016-01-22 23:50:57 +00:00
Enrico Granata 6eeb5e70e7 Add a helper function to ProcessStructReader to allow one to inquire about the offset of a field
llvm-svn: 258584
2016-01-22 23:50:46 +00:00
Adrian McCarthy bce5d9adce XFail a test from TestConditionalBreak.py on Windows.
Filed a bug to investigate later:  llvm.org/pr26265

llvm-svn: 258578
2016-01-22 23:05:47 +00:00
Adrian McCarthy 3ca8aa5af6 XFail TestNamespaceLookup tests on Windows.
There's already a pr:  https://llvm.org/bugs/show_bug.cgi?id=25819

llvm-svn: 258577
2016-01-22 23:05:29 +00:00
Todd Fiala 16c4e16c35 added test fixture to EditlineTest gtest
Primarily a trial test for me to try out the
git clang-format integration.  Works like a charm!

This change adds a gtest fixture for the EditlineTest
common setup and teardown code.

llvm-svn: 258565
2016-01-22 21:58:55 +00:00
Saleem Abdulrasool c98d969e9f Commands: silence dumb -Wextra warning from GCC
This is a rather unhelpful warning indicating that the ternary operator return
types are mismatched, returning an integer and an enumeral type.  Since the
integeral type is shorter to type, cast the enumeral type to `int`.  Silences
the -Wextra warning from GCC.

llvm-svn: 258548
2016-01-22 20:26:34 +00:00
Saleem Abdulrasool 79e6749da3 Target: fix -Wcast-qual warning
We were unnecessarily stripping the const qualifier on the temporary variable.
Restore the constness to avoid the warning.  NFC.

llvm-svn: 258547
2016-01-22 20:26:32 +00:00
Saleem Abdulrasool 27ea26b7c0 Silence -Wreturn-type warnings
Address a couple of instances of -Wreturn-type warning from GCC.  The switches
are covered, add an llvm_unreachable to the end of the functions to silence the
warning.  NFC.

llvm-svn: 258546
2016-01-22 20:26:30 +00:00
Todd Fiala f8f8a6de06 fixed test suite crash when --platform-name doesn't start with 'remote-'
Also removes Darwin test case files from the expectedTimeout hard-coded
file list.

See:
http://reviews.llvm.org/D16423

llvm-svn: 258542
2016-01-22 20:20:48 +00:00
Pavel Labath 4b70eb7b2b Revert "Enable test log collection from remote debug servers"
Unfortunately, this turns out not to be working on the lldb-server tests, as there the server is
started in a different way. Since this was a bit of a hack to start with, I am removing it until
I can solve the problem more holistically.

llvm-svn: 258501
2016-01-22 14:50:29 +00:00
Bhushan D. Attarde b56e5d231f Use "_$" prefix instead of "$" for dynamic checker function inserted by LLDB during expression evaluation
SUMMARY:
    The symbol "$" has a special meaning for MIPS i.e it is marker for temporary symbols for MIPS.
    So this patch uses additional _ prefix for "$__lldb_valid_pointer_check" so that it wont be marked as temporary symbol in case of MIPS.
    
    Reviewers: clayborg, spyffe
    Subscribers: dean, emaste, mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential http://reviews.llvm.org/D14111

llvm-svn: 258485
2016-01-22 05:02:02 +00:00
Eduard Burtescu d05b899252 [opaque pointer types] [NFC] Fix fallout from DataLayout::getIndexedOffset changes (rL258478).
llvm-svn: 258481
2016-01-22 03:43:23 +00:00
Adrian McCarthy 524afae807 Fix TestImport.py to work with Python 3.5.
Differential Revision: http://reviews.llvm.org/D16431

llvm-svn: 258448
2016-01-21 23:07:48 +00:00
Greg Clayton a5d1f62d2d Always try to read DW_TAG_typedef types from DWO files first if we can.
A lot of C code uses code like:

typedef struct 
{
   int a;
} FooType;
          
This creates debug info with an anonymous struct (a DW_TAG_structure_type with no DW_AT_name) and then a DW_TAG_typedef that points to the anonymous structure type. When a typedef is from a module and clang uses -gmodules and -fmodules, then we can end up trying to resolve an anonymous structure type in a DWO symbol file. This doesn't work very well when the structuture has no name, so we now check if a typedef comes from a module, and we directly resolve the typedef type in the module and copy it over. The version we copy from the module of course is correctly able to find the structure in the DWO symbol file, so this fixes the issues we run into.

<rdar://problem/24092915> 

llvm-svn: 258443
2016-01-21 22:26:13 +00:00
Adrian McCarthy f0a275e035 NFC. Corrects name of test class and a comment.
llvm-svn: 258433
2016-01-21 21:10:00 +00:00
Zachary Turner 783550be62 Remove assumptions that thread 0 is always the main thread.
Starting with Windows 10, the Windows loader is itself multi-threaded,
meaning that the loader spins up a few threads to do process
initialization before it executes main.  Windows delivers these
notifications asynchronously and they can come out of order, so
we can't be sure that the first thread we get a notification about
is actually the zero'th thread.

This patch fixes this by requesting the thread stopped at the
breakpoint that was specified, rather than getting thread 0 and
verifying that it is stopped at a breakpoint.

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

llvm-svn: 258432
2016-01-21 21:07:30 +00:00
Adrian McCarthy 225d3ea340 Add CalculateSymbolSizes in ObjectFilePECOFF::GetSymtab to ensure that (nearly) all the symbols have sizes.
This fixes the `thread step-over` regression exposed by http://reviews.llvm.org/D16186 , which depends on the symbols having actual sizes.  Nine tests on Windows had started failing as a result.  They all work again with this fix.

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

llvm-svn: 258429
2016-01-21 20:58:12 +00:00
Pavel Labath e3e6be2aab Enable test log collection from remote debug servers
Summary:
We already have the ability to collect the server logs when doing local debugging. This enables
the collection of remote logs as well. This relies on specifying a relative path "server.log" for
LLDB_DEBUGSERVER_LOG_FILE when starting remote platform. Since we always set the platform working
directory to a fresh folder to avoid conflicts, the actual file path will always be different and
we can pick the logs up from there.

Reviewers: tfiala

Subscribers: lldb-commits

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

llvm-svn: 258414
2016-01-21 17:54:14 +00:00
Jason Molenda 1a75b0d14f When ObjectFileMachO reads a Mach-O file for a 32-bit arm cpu,
set the triple's "vendor" field to Apple.  

We don't want to assume a vendor of Apple for all Mach-O files -
this breaks x86_64 EFI debugging where they put non-Apple binaries
in a Mach-O format for ease of handling.

But on armv7, Apple's ABI always uses r7 as the frame pointer
register; if we don't set the Vendor field to Apple, we can pick
up a generic armv7 ABI where the fp is r11 (or r7 for thumb) which
breaks backtracing altogether.

Greg is reluctant for us to make any assumptions about the Vendor
here, but we'll see how this shakes out.  It's such a big problem
on armv7 if we don't know this is using the Apple ABI that it's worth
trying this approach.

<rdar://problem/22137561> 

llvm-svn: 258387
2016-01-21 04:38:05 +00:00
Enrico Granata 35e0639018 Fix a problem where we were not calling fcntl() with the correct arguments for F_DUPFD
On Mac OS X, this was working just fine in debug builds (presumably, because the right value ended up being at the right location for the variadic ABI), but not in Release builds
As a result, we were seeing failures with commands that set their own immediate output stream - only in Release builds, which always makes for a fun little investigation

I have removed those fcntl() calls and replaced them with dup() calls. This fixes the issue in both Debug and Release builds

llvm-svn: 258367
2016-01-20 23:20:10 +00:00
Sean Callanan 10badfc924 Fixed some #ifdefs. We were erroneously not supporting certain simulators.
We had some #ifdefs that were looking for the wrong #defines and as a result
debugserver didn't have support for certain simulators.  This patch resolves
the problem.

llvm-svn: 258365
2016-01-20 23:12:39 +00:00
Omair Javaid 94b94421a4 Mark arm/aarch64 specific xfails with expectedFailureLinux decorator
This patch marks some known failures and puts on expectedFailureLinux decorator to have testsuite xfail them.

Affected tests are: 

test/functionalities/watchpoint/step_over_watchpoint.py
test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
test/tools/lldb-server/TestGdbRemoteSingleStep.py
test/tools/lldb-server/TestGdbRemote_vCont.py

llvm-svn: 258315
2016-01-20 15:01:54 +00:00
Pavel Labath a975959996 Fix clang warning in RenderScriptRuntime
std::array should have "the same semantics as a struct holding a C-style array T[N] as its only
non-static data member", so the initialization should have one more level of braces. Hopefully,
no compiler will object to that.

llvm-svn: 258306
2016-01-20 12:23:23 +00:00
Pavel Labath db1958d136 Enable TestInlineStepping on linux i386
Test has been passing at least the last 200 buildbot runs.

llvm-svn: 258305
2016-01-20 12:17:26 +00:00
Pavel Labath 806ad5977d Enable TestConcurrentEvents on i386 linux
The test has been passing reliably the last 100 runs of the build bot.

llvm-svn: 258304
2016-01-20 12:09:12 +00:00
Ewan Crawford 4f8817c2db [RenderScript] New command for viewing coordinate of current kernel invocation
Patch adds command 'language renderscript kernel coordinate' for printing the kernel index in (x,y,z) format.
This is done by walking the call stack and looking for a function with suffix '.expand', as well as the frame variables containing the coordinate data. 

llvm-svn: 258303
2016-01-20 12:03:29 +00:00
Jason Molenda c197e81d07 Some 32-bit arm corefiles on darwin may have their general purpose
register set indicated by ARM_THREAD_STATE32 (value 9) instead of
the old ARM_THREAD_STATE (value 1); this patch changes lldb to
accept either register set flavor code.

<rdar://problem/24246257>

llvm-svn: 258289
2016-01-20 05:17:13 +00:00