Commit Graph

6314 Commits

Author SHA1 Message Date
Greg Clayton 8df92678a1 <rdar://problem/13121056>
Fixed a crasher when the ConnectionFileDescriptor was used in a process with over FD_SETSIZE (1024) files open. It would corrupt the stack and cause the stack checker to assert and kill the program.

The final fix was to "#define _DARWIN_UNLIMITED_SELECT" at the top of the one and only file that uses select () in the LLDB codebase and then make an array of "fd_set" objects so they can handle more than 1024 file descriptors. The new code can handle as many file descriptors as a process can create.    
    

llvm-svn: 175378
2013-02-16 22:53:04 +00:00
Greg Clayton e48310dc6b Added a kqueue class which isn't being used yet, but was part of trying to work around the limitations with the unix select() call and how it is limited to FD_SETSIZE file descriptors.
Also added a TimeSpecTimeout class which can be used with any calls that take a "struct timespec *" as an argument. It is used by the KQueue class.

Also updated some project settings.

llvm-svn: 175377
2013-02-16 22:46:58 +00:00
Filipe Cabecinhas 103e16e4cc Include a small argparse compatibility layer for Python < 2.7
llvm-svn: 175341
2013-02-16 09:05:23 +00:00
Greg Clayton 7a168161de Get rid of a warning.
llvm-svn: 175337
2013-02-16 01:47:52 +00:00
Enrico Granata f615b80d08 NSSet formatter is now C++ code
Split some NS* formatters in their own source files
Refactored a utility function for the C++ formatters to use
Fixed the skip-summary test case to be explicit about requiring libstdc++ for operation

llvm-svn: 175323
2013-02-15 23:38:37 +00:00
Sean Callanan c8675507aa Fixes in the IRInterpreter:
- removed an unnecessary variable
- fixed an issue where we sometimes
  wrote too much data into a buffer
- made the recognition of variables
  as "this" a little more conservative

<rdar://problem/13216268>

llvm-svn: 175318
2013-02-15 23:07:52 +00:00
Daniel Malea cbaef26678 Improve test harness for the buildbots
- Add a "parsable" mode to dotest.py that outputs test results in exactly the same format as clang's lit tests
- Improve dosep script to output list of failing tests (output should look like clang test failure summaries)
- Cleanup lldb/test/Makefile to remove needless parameters and environment variables
- Switch makefile tests to use parsable-mode output; should make the buildbot results parsable
- Switch makefile tests to use dosep to log catch crashing tests (instead of halting the test suite)

llvm-svn: 175309
2013-02-15 21:31:37 +00:00
Daniel Malea e78ecc2cc7 More test case cleanup (Linux and Mac):
- remove expectedFailure decorator from resolved rdar 12566646 and 10887661
- remove expectedFailure from TestBitfields testcase not actually affected by bug
- skip the (non-deterministic) TestStopHookMechanism.py to avoid a noisy suite on Linux

llvm-svn: 175307
2013-02-15 21:27:14 +00:00
Daniel Malea 2dd69bb5f2 Fix misuse of python subprocess module (caused "leaking" processes and garbling the terminal)
- fixed cleanup of Popen objects by pushing spawn logic into test Base and out of test cases
- connect subprocess stdin to PIPE (rather than the parent's STDIN) to fix silent terminal issue

Tested on Linux and Mac OS X

llvm-svn: 175301
2013-02-15 21:21:52 +00:00
Daniel Malea b7eec015d0 Rename [Enable|Disable]Breakpoint() to [Enable|Disable]BreakpointSite() in POSIX plugin
- needed due to r175241

llvm-svn: 175290
2013-02-15 20:23:25 +00:00
Daniel Malea 654b12c6a5 Linux test case cleanup:
- Enable TestFormatters.py: expressions with "new" work
- Enable TestChangeValueAPI.py: llvm.org/PR15039 fixed
- Disable expression_command/call-restarts due to llvm.org/PR15278
- Disable expression_command/call-throws due to ObjC test program

llvm-svn: 175287
2013-02-15 19:37:48 +00:00
Greg Clayton 79978fc0fc Added missing include.
llvm-svn: 175279
2013-02-15 17:44:31 +00:00
Filipe Cabecinhas 2f4ed2a8df Only enable RTTI for cxa_demangle.cpp
If testing on Linux+clang proves it needs RTTI, wa can remove the
conditionals.

llvm-svn: 175242
2013-02-15 02:36:40 +00:00
Jim Ingham 299c0c1c09 A little cleanup. {Disable/Enable}Breakpoint actually disables/enables BreakpointSites not breakpoints, it is confusing
to have it not named appropriately.  Also in StopInfoMachException, we aren't testing for software or not software, just
whether the thing is a breakpoint we set.  So don't use "software"...

llvm-svn: 175241
2013-02-15 02:06:30 +00:00
Enrico Granata 8628bc59e0 Daniel Malea caught an issue where calling dotest.py with an invalid directory would cause the progressbar init code to raise an exception
This commit fixes it

llvm-svn: 175229
2013-02-15 00:32:05 +00:00
Enrico Granata 75dfb43270 <rdar://problem/13204647>
The SEL data formatter was working hard to ensure that pointers-to-selectors could be formatted by the same block of code. In that effort, we were taking the address-of a SEL.
This operation fails when the SEL lives in a register, and was causing problems.
The formatter has been fixed to work correctly without assuming &selector will be a valid object.

llvm-svn: 175227
2013-02-15 00:06:04 +00:00
Daniel Malea 8d7b7a434a Fix TestSBData.py test case (tested fix Linux/Mac)
- stop ignoring the error-codes in the 'error' variable
- removed out-of-bounds accesses with read-only array fields such as:

  self.assertTrue(data2.uint8[6] == 0, 'binary 0 terminator')

Since SBData wraps a (6-character) python string literal, trying to read the
null-terminator raises an exception. Instead, I replaced the out-of-bounds
read with a length-check.

Other out-of-bounds reads (via accessor function like SBData.GetUnsignedInt8)
don't throw and are OK. I just added asserts that errors are set for these
negative cases.

llvm-svn: 175223
2013-02-14 23:38:33 +00:00
Filipe Cabecinhas 55fcb10542 Bring lldb up to date with clang revision 175141.
llvm-svn: 175213
2013-02-14 22:02:57 +00:00
Greg Clayton 790ecc01d7 <rdar://problem/13218655>
"target modules add" should resolve bundle executables, as should anything else that tries to create a module from a bundle path.

llvm-svn: 175210
2013-02-14 21:09:56 +00:00
Jim Ingham 6394479e4f One to many always's.
llvm-svn: 175202
2013-02-14 19:30:35 +00:00
Jim Ingham 719d2c9d36 Mention the inline-breakpoint-strategy in the lldb-gdb.html file.
llvm-svn: 175201
2013-02-14 19:17:49 +00:00
Greg Clayton 0ee809b71c <rdar://problem/13064893>
Poor network connections aren't handled well; commands fail instead of retrying.

llvm-svn: 175198
2013-02-14 19:11:23 +00:00
Jim Ingham 289aca642e Make it clear that if you #include .c/.cpp/.m/.mm etc files, you will have to
change the breakpoint-inline-strategy for the breakpoints to take.

<rdar://problem/13189024>

llvm-svn: 175197
2013-02-14 19:10:36 +00:00
Greg Clayton eee5e98658 <rdar://problem/12693921>
Rename the monitor command from "qCmd" (incorrect) to "qRcmd".

llvm-svn: 175191
2013-02-14 18:39:30 +00:00
Greg Clayton 25d5941e2a <rdar://problem/13207948>
"watchpoint set expression" fails if "--" is present without any option. Made this command match exactly what "expression" does.

llvm-svn: 175136
2013-02-14 04:15:23 +00:00
Greg Clayton 8938f8daf0 <rdar://problem/13200878>
When launching in the shell, make sure if you specify a relative path, and if the current working directory has a space in it, that we don't hose the shell invocation.

Currently if we launch with a relative path, we prepend the current working directory to the PATH using:

PATH=`cwd`:$PATH a.out ...

We needed to add quotes around the value for PATH to make sure if any paths in PATH contained spaces, that we don't hose the shell command. Now we do a:

PATH="`cwd`:$PATH" a.out ...

llvm-svn: 175135
2013-02-14 03:54:39 +00:00
Greg Clayton c5d33d8359 <rdar://problem/13198767>
When dumping instructions, resolve the address specified as a file address if the target doesn't have anything loaded.

llvm-svn: 175131
2013-02-14 03:26:35 +00:00
Jim Ingham 0ac5709027 Add a test for handling a function call that throws an exception, and make it work.
<rdar://problem/13183944>

llvm-svn: 175127
2013-02-14 03:05:42 +00:00
Jim Ingham 367efe7d34 Probably should return that value we took the trouble to compute.
llvm-svn: 175125
2013-02-14 03:04:50 +00:00
Daniel Malea 90e9fd9cbb Fix broken testcase: ignore LLDB output that warns about more elements than can be displayed.
- test could be re-written at some point, but right now just trying to clean up known failures for the linux buildbot.

llvm-svn: 175114
2013-02-14 00:30:40 +00:00
Daniel Malea e651aee927 Marking two tests expected-to-fail on Linux
- PR-15260: lldb does not display correct value of 1-bit field
- PR-16261: lldb does not display size of (file/class) static array

llvm-svn: 175111
2013-02-14 00:20:44 +00:00
Greg Clayton 399107a936 Centralized the expression prefixes that are used for both expressions and utility functions.
llvm-svn: 175108
2013-02-13 23:57:48 +00:00
Greg Clayton e40346050a A lot more cleanup on the AppleObjCRuntimeV2 class.
llvm-svn: 175106
2013-02-13 23:22:26 +00:00
Greg Clayton c03e3c198a Cleaned up and removed unused code.
llvm-svn: 175105
2013-02-13 23:09:45 +00:00
Matt Kopec 3c0ed76a9d Skip another two other tests asserting on Linux in RecordLayoutBuilder::updateExternalFieldOffset().
llvm-svn: 175103
2013-02-13 22:59:58 +00:00
Greg Clayton a66c4d96f0 <rdar://problem/13210494>
Parse objective C information as efficiently as possible and without taking dangerous runtime locks.

Reworked the way objective C information is parsed by:
1 - don't read all class names up front, this is about 500K of data with names
2 - add a 32 bit hash map that maps a hash of a name to the Class pointer (isa)
3 - Improved name lookups by using the new hash map
4 - split up reading the objc runtime info into dynamic and shared cache since the shared cache only needs to be read once.
5 - When reading all isa values, also get the 32 bit hash instead of the name
6 - Read names lazily now that we don't need all names up front
7 - Allow the hash maps to not be there and still have this function correctly

There is dead code in here with all of the various methods I tried. I want to check this in first to not lose any of it in case we need to revert to any of the extra code. I will promptly cleanup and commit again.

llvm-svn: 175101
2013-02-13 22:56:14 +00:00
Daniel Malea 5a52f2ec73 Skip test that causes lldb to assert due to inferior getting a SIGSEGV with si_code == SI_KERNEL (PR-15258)
- crash does not always reproduce

llvm-svn: 175095
2013-02-13 22:05:18 +00:00
Daniel Malea 5703bdcc49 Allow expression evaluation to work when multiple threads exist in the inferior (on Linux)
- handle m_resume_state == eStateStopped || eStateSuspended in DoResume rather than asserting

llvm-svn: 175094
2013-02-13 22:00:44 +00:00
Sean Callanan d7739824a6 Made NULL, nil, and Nil use the appropriate
builtins.

<rdar://problem/13204027>

llvm-svn: 175091
2013-02-13 21:53:01 +00:00
Andrew Kaylor b32581fe5c Improved handling for DW_AT_const_value
llvm-svn: 175071
2013-02-13 19:57:06 +00:00
Daniel Malea f406891857 Skip tests that assert on Linux in RecordLayoutBuilder::updateExternalFieldOffset()
- Filed bugzilla PR-15256

llvm-svn: 175065
2013-02-13 18:56:41 +00:00
Daniel Malea 52d0f40ad3 Disable TestConditionalBreak.py due to Linux crash
- test was passing before r174793...

llvm-svn: 175064
2013-02-13 18:55:17 +00:00
Greg Clayton 142c5a4f66 Quiet "the missing case in switch statement" warnings from newer clang builds.
llvm-svn: 175061
2013-02-13 18:15:56 +00:00
Daniel Malea 4d3c008c7d Fix document typos, indentation in python code, and API examples.
Patch by Bruce Mitchener!

llvm-svn: 175002
2013-02-12 20:01:49 +00:00
Greg Clayton faf6df6e6e Added new "env" regular expression alias into the evironment settings section of the GDB/LLDB commands.
llvm-svn: 174993
2013-02-12 18:54:34 +00:00
Greg Clayton ef5651d93f <rdar://problem/13178743>
Added a new "env" regular expression alias. If "env" is typed on its own "settings show target.env-vars" will be run. Otherwise it can be used to set and environment variable: "env FOO=BAR".

llvm-svn: 174991
2013-02-12 18:52:24 +00:00
Greg Clayton d901096345 <rdar://problem/13184389>
_regexp-list needs to treat "list -" as "source list -r"

llvm-svn: 174987
2013-02-12 18:42:05 +00:00
Matt Kopec 92dd5cfe04 Fix ELF parsing where undefined symbols were being added to the symbol table with the incorrect symbol type.
llvm-svn: 174984
2013-02-12 18:30:30 +00:00
Sean Callanan eeffea416b Made LLDB build with the latest Clang. This meant
changing the ClangASTSource to return a bool instead
of returning a list of results.  Our testsuite mostly
works with this change, but some minor issues may
remain both on LLDB's side and on Clang's side.

llvm-svn: 174949
2013-02-12 08:01:13 +00:00
Sean Callanan af77617b21 Fixed the way the ClangExpressionDeclMap looks
up variables in the current stack frame to avoid
mutual recursion between the expression parser
and the synthetic child providers.  Variables
should only be looked up in a very simple way,
using no synthetic anything.

<rdar://problem/13173454>

llvm-svn: 174947
2013-02-12 07:56:36 +00:00