Commit Graph

10793 Commits

Author SHA1 Message Date
Jason Molenda 1bffc64a46 Build fix for building debugserver for ios.
llvm-svn: 232563
2015-03-17 23:16:42 +00:00
Zachary Turner 85bc48ca74 Convert CRLF to LF.
I accidentally let some Windows line endings slip in.  This is a
good reminder for me to use core.eol=lf.

llvm-svn: 232560
2015-03-17 22:51:21 +00:00
Siva Chandra 7523ec4f47 Enable TestDataFormatterStdIterator with GCC.
Summary:
This test now passes for Clang and GCC. I do not know why it was
disabled for GCC with link to a bug which should not have had an
effect on this test.

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

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 232552
2015-03-17 21:43:01 +00:00
Siva Chandra 8d88d08197 Implement formatter for std::vector<bool, ...> of libstdc++ in Python.
Summary:
The existing formatter in C++ has been removed as it was not being used. 
The associated test TestDataFormatterStdVBool.py has been enabled for
both Clang and GCC on Linux.

Test Plan: dotest.py -p TestDataFormatterStdVBool

Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 232548
2015-03-17 21:23:17 +00:00
Zachary Turner 0641ca1a2d Remove ScriptInterpreterObject.
This removes ScriptInterpreterObject from the codebase completely.
Places that used to rely on ScriptInterpreterObject now use
StructuredData::Object and its derived classes.  To support this,
a new type of StructuredData object is introduced, called
StructuredData::Generic, which stores a void*.  Internally within
the python library, StructuredPythonObject subclasses this
StructuredData::Generic class so that it can addref and decref
the python object on construction and destruction.

Additionally, all of the classes in PythonDataObjects.h such
as PythonList, PythonDictionary, etc now provide a method to
create an instance of the corresponding StructuredData type.  For
example, there is PythonDictionary::CreateStructuredDictionary.
To eliminate dependencies on PythonDataObjects for external
callers, all ScriptInterpreter methods now return only
StructuredData classes

The rest of the changes in this CL are focused on fixing up
users of PythonDataObjects classes to use the new StructuredData
classes.

llvm-svn: 232534
2015-03-17 20:04:04 +00:00
David Blaikie 5121c9aa92 Fix the clang -Werror build by suppressing -Wextended-offsetof
llvm-svn: 232507
2015-03-17 17:37:17 +00:00
David Blaikie 7d3cf0062a Add missing overrides to fix the clang -Werror build (-Winconsistent-missing-override)
llvm-svn: 232504
2015-03-17 17:26:41 +00:00
Ilia K 8a00a562c5 Fix broadcasters for interpreter and process:
# Fix CommandInterpreter.Broadcaster name (it should be the same as CommandInterpreter::GetStaticBroadcasterClass())
# Prevent the same error in Process.Broadcaster
# Fix SBCommandInterpreter::GetBroadcasterClass (it should call CommandInterpreter::GetStaticBroadcasterClass(), was Communication::GetStaticBroadcasterClass())

llvm-svn: 232500
2015-03-17 16:54:52 +00:00
Tamas Berghammer cb84eebb52 Change reinterpret_casts to static_casts in NativeProcessLinux
llvm-svn: 232491
2015-03-17 15:05:31 +00:00
Tamas Berghammer c7e6680637 Remove obsolate rdar comment from TestSetValues.py
llvm-svn: 232490
2015-03-17 15:05:28 +00:00
Tamas Berghammer 9f3658d211 Fix signature of ProcessInfo::SetArchitecture
llvm-svn: 232489
2015-03-17 15:05:25 +00:00
Tamas Berghammer 655b87f99d Remove unused handler registreation from GDBRemoteCommunicationServerLLGS
llvm-svn: 232488
2015-03-17 15:05:23 +00:00
Tamas Berghammer eadb2a9ed0 Report stopped by trace if none of the watchpoint was hit
Some linux kernel reports a watchpoint hit after single stepping even
when no watchpoint was hit. This CL looks for a watchpoint which was hit
and reports a stop by trace if it haven't found any.

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

llvm-svn: 232482
2015-03-17 14:40:57 +00:00
Hafiz Abid Qadeer 7658b2be16 Cleanup the MIReadMe.txt after the recent changes in lldb-mi.
This commit removed the redundant and out of date stuff from the file.

llvm-svn: 232477
2015-03-17 14:12:03 +00:00
Mohit K. Bhakkad 3df471c32d [MIPS] - Register Context for MIPS64
Patch by Jaydeep Patil

Summery:
1. Add MIPS variants by parsing e_flags of the ELF
2. Create RegisterInfoInterface and RegisterContext for MIPS64 and MIPS64EL

Reviewers: clayborg

Subscribers: tberghammer, bhushan, mohit.bhakkad, sagar

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

llvm-svn: 232467
2015-03-17 11:43:56 +00:00
David Blaikie 3dfb86b641 Fix the clang -Werror build & make the unit tests link under Linux
The order of libraries passed to the linker didn't work under linux (you
need the llvm libraries first, then the lldb libraries). I modelled this
after clang's setup here. Seemed simple enough to just be consistent.

llvm-svn: 232461
2015-03-17 03:32:21 +00:00
Vince Harron de0a0f3100 XFAIL flaky tests
llvm-svn: 232441
2015-03-17 00:10:51 +00:00
Oleksiy Vyalov 933f853030 Make ModuleList::GetSharedModule to use module_search_paths parameter.
http://reviews.llvm.org/D8365

llvm-svn: 232437
2015-03-16 23:44:30 +00:00
Siva Chandra 3b36038f45 Cleanup implementation of formatter for std::vector from libstdc++.
Summary: Removed unused variables and methods.

Test Plan: dotest.py -p TestDataFormatterStdVector

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 232434
2015-03-16 23:02:03 +00:00
Jim Ingham 6312991cdb Report an error for line number values that don't convert to integers during argument
parsing so that we can give a more accurate error message.

<rdar://problem/20145563>

llvm-svn: 232433
2015-03-16 22:47:38 +00:00
Siva Chandra 588ec02f19 Enable TestDataFormatterStdMap on linux (libstdc++) with clang.
Summary:
This test should have been enabled along with
7181dae1248cc1b03505cca1b7c6e3dfeffefc0a, but since the test was
actually crashing, I thought it was a much deeper problem. Turns out,
all I had to do was to add "-fno-limit-debug-info" when compiling
the test case.

The test is still skipped when the testcase is compiled with GCC.

Test Plan: dotest.py -p TestDataFormatterStdMap

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 232432
2015-03-16 22:45:05 +00:00
Siva Chandra 4da7a29a11 Skip TestDataFormatterStdMap on linux instead of xfailing.
Summary:
After 7181dae1248cc1b03505cca1b7c6e3dfeffefc0a, this test progresses
much further but crashes. Will skip this test while I fix this properly.

Test Plan: dotest.py -p TestDataFormatterStdMap

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 232403
2015-03-16 19:56:36 +00:00
Greg Clayton 75a19344ad Added an Python operating system plug-in test to verify that python can be used to add threads to an existing process.
The test does the following:
1 - runs a program to main without the OS plug-in and verifies no OS threads are in the process
2 - loads the OS plug-in and verifies the 3 OS plug-in threads are now in the current process
3 - verify the register contents of each thread that shows up
4 - unload the python OS plug-in and verify that the OS threads are gone.

llvm-svn: 232401
2015-03-16 19:54:22 +00:00
Siva Chandra 870602dd3c Handle PyLong return values in LLDBSwigPython_CalculateNumChildren.
Summary:
Also, change its return type to size_t to match the return types of
its callers.

With this change, std::vector and std::list data formatter tests
pass on Linux (when using libstdc++) with clang as well as with gcc.
These tests have also been enabled in this patch.

Test Plan: dotest.py -p <TestDataFormatterStdVector|TestDataFormatterStdList>

Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: zturner, lldb-commits

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

llvm-svn: 232399
2015-03-16 19:01:33 +00:00
Hafiz Abid Qadeer a40780e36c Remove redundant comments from lldb-mi source files.
Most of lldb-mi files have comments about environement, copyright etc which were neither needed nor uptodate.
This commit removes those comments.

llvm-svn: 232396
2015-03-16 18:18:18 +00:00
Hafiz Abid Qadeer 10fa53d26e Enabling the lldb-mi tests on Linux.
I think the issue that caused the random failure has been fixed. So I am enabling the tests again on Linux.
There are still some tests that are skipped on Linux due to different output. Those will be handled separately.

Tested with dotest.py and with "make check-lldb" and there was no MI related failure.

llvm-svn: 232380
2015-03-16 14:28:18 +00:00
Hafiz Abid Qadeer ace93f3a90 Fix the test for gcc.
Following 3 changes were made.
1. Test was assuming that function name will have () in the end. I dont know why lldb is generating function name like this but it looks like a bug. For this test, I have removed it.
2. Step instruction test was assuming that function call will not be the first instruction in the range of the line. This assumption failed with gcc. So I had fixed this.
3. Some minor adjustments with the line number.

Test with bot gcc and clang and all tests pass.

This test is still very fragile. We should be removing hardcoded line number.

llvm-svn: 232372
2015-03-16 12:16:19 +00:00
Hafiz Abid Qadeer 943483f451 Check that RestartedFromEvent flag before processing the state changed event.
Not checking for this flags caused lldb-mi to issue stop notification when target
has started running again. It also tried to get stack when target was running and
this caused randon failure.

Approved in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-March/006953.html

llvm-svn: 232370
2015-03-16 11:47:24 +00:00
Vince Harron 0fc6c6762f Added nullptr to fix build
llvm-svn: 232345
2015-03-16 03:54:22 +00:00
Vince Harron b63c1880f2 Use -fno-limit-debug-info instead of -fstandalone-debug in tests
This fixes tests on clang-3.4

AFAICT, these flags have the same affect and -fstandalone-debug wasn't
added until after clang-3.4

Committed to try to fix buildbot

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

llvm-svn: 232326
2015-03-15 18:05:53 +00:00
Zachary Turner 073951f28b Fix a bug related to arg escaping, and add unit tests.
A recent refactor had introduced a bug where if you escaped a
character, the rest of the string would get processed incorrectly.

This patch fixes that bug and adds some unit tests for Args.

llvm-svn: 232288
2015-03-14 23:39:42 +00:00
Zachary Turner eeba1a896a [CMake] Make the unittests link against everything...
Sigh.  There's really not a good alternative until we decouple
python from lldb better.  The only way the build works right now
is by having every executable link against every LLDB library.
This causes implicit transitive link dependencies on the union
of everything that LLDB brings in.  Which means that if all we
want is one header file from interpreter, we have to bring in
everything, including everything that everything depends on,
which means python.

There's outstanding efforts to address this, but it's not yet
complete.  So until then, this is all we can do.

llvm-svn: 232287
2015-03-14 23:39:28 +00:00
Ed Maste 1cd6c667eb Strip trailing whitespace from python-wrapper.swig
(To test the dependency added in r232256.)

llvm-svn: 232257
2015-03-14 08:06:56 +00:00
Ed Maste c3948b4af1 Make LLDBWrapPython.cpp depend on the .swig files (configure+make build)
This is equivalent to r232175 for the CMake build.

llvm-svn: 232256
2015-03-14 07:58:06 +00:00
Zachary Turner 2c04f79b01 [gtest] Fix gtest failures on Windows.
On Windows, you need to call WSAStartup() before making any socket
calls, and WSACleanup() before you shutdown.  This wasn't being
done, so all of the socket tests were failing.  This fixes
that, which brings the unit test suite to a fully working state
on Windows.

llvm-svn: 232247
2015-03-14 04:19:32 +00:00
Zachary Turner f4a501a5f3 [CMake] Convert TABs to spaces.
This file had been using TAB all along, but my recent change that
used spaces exposed the issue.

llvm-svn: 232244
2015-03-14 03:10:51 +00:00
Ed Maste ea627d728b Skip additional lldb-mi tests that failed on FreeBSD
llvm-svn: 232243
2015-03-14 02:54:57 +00:00
Enrico Granata 9370d2784f If creating a Python command via a class, the help text is handled directly by the class object, no need for setting it manually via the cmdline
llvm-svn: 232228
2015-03-13 22:35:44 +00:00
Vince Harron e72b71ff08 Revert test/Makefile to state before r232205
llvm-svn: 232227
2015-03-13 22:33:42 +00:00
Enrico Granata cc342da574 Add accessors on SBCommand to get and set the help texts for a command
llvm-svn: 232226
2015-03-13 22:32:11 +00:00
Enrico Granata 2fc62ed37d Introduce documentation for Python command objects
llvm-svn: 232225
2015-03-13 22:27:36 +00:00
Enrico Granata 6f79bb2d57 Add support for Python object commands to return custom short and long help by implementing
def get_short_help(self)
def get_long_help(self)

methods on the command object

Also, add a test case for this feature

llvm-svn: 232224
2015-03-13 22:22:28 +00:00
Zachary Turner 794e6a60a8 Fix makefiles to build shared library tests on Windows.
Abstracted away some POSIX-isms that caused MAKE to issue invalid
commands on Windows.  Added a new force-include for the test
programs so that we can use platform-specific macros.

TestSharedLib now builds and cleans up on Windows, though the test
still fails some of the expectations.

Differential Revision: http://reviews.llvm.org/D8277
Patch by: Adrian McCarthy
Issue Tracker: http://llvm.org/pr21727

llvm-svn: 232220
2015-03-13 21:51:11 +00:00
Zachary Turner a6ad7a542b [CMake] Fix unit test build on Linux.
A filename had been misspelled in the CMake.

llvm-svn: 232218
2015-03-13 21:33:34 +00:00
Zachary Turner 891af04d82 Create a check-lldb-unit target to run unit tests.
llvm-svn: 232212
2015-03-13 20:55:07 +00:00
Zachary Turner 719ec93a74 Rework the gtest directory structure.
This makes the directory structure mirror the canonical LLVM
directory structure for a gtest suite.

Additionally, this patch deletes the xcode project.  Nobody
is currently depending on this, and it would be better to have
gtest unit tests be hand-maintained in the Xcode workspace
rather than using this python test runner.  Patches to that
effect will be submitted as followups.

llvm-svn: 232211
2015-03-13 20:54:57 +00:00
Zachary Turner 26d7fcfc38 Create a CMake build for the gtest unit tests.
llvm-svn: 232210
2015-03-13 20:54:21 +00:00
Vince Harron 8974ce2735 Add support for XFAILing a test on specific clang versions
llvm-svn: 232205
2015-03-13 19:54:54 +00:00
Oleksiy Vyalov 6474721c10 Extend Platform(s) in order to cache remote executables using ModuleCache and make POSIX dynamic loader to use this flow when attaching to a remote target.
http://reviews.llvm.org/D8306

llvm-svn: 232194
2015-03-13 18:44:56 +00:00
Zachary Turner d3b7582c84 [CMake] Make LLDBWrapPython.cpp depend on the .swig files.
Previously it would only regenerate LLDBWrapPython.cpp if one of
the .i files changed, or if lldb.swig changed.  This patch also
makes it depend on the rest of the *.swig files, so that if any
of them changes it regenerates the CMake.

llvm-svn: 232175
2015-03-13 16:31:58 +00:00