Commit Graph

7238 Commits

Author SHA1 Message Date
Andrew Kaylor 69cb7d40fd Updating convenience register attach test
llvm-svn: 183580
2013-06-07 22:16:14 +00:00
Andrew Kaylor 5c282cc886 Don't set stdin to devnull for forked processes
llvm-svn: 183578
2013-06-07 22:12:54 +00:00
Jim Ingham 4e5c821087 Don't retry the Connect when starting up debugserver if the reason for the previous failure was
EINTR.  That means the user was trying to interrupt us, and we should just stop instead.

<rdar://problem/13184758>

llvm-svn: 183577
2013-06-07 22:09:53 +00:00
Ashok Thirumurthi ec000b6714 Revert r183281, adds a comment about how to reproduce the hang.
llvm-svn: 183569
2013-06-07 20:58:47 +00:00
Ashok Thirumurthi b65edd4b95 Updated the LLDB status page to reflect the recent addition of multi-threaded support.
Reworked the download information on lldb.llvm.org:
- svn copy of download.html to source.html with information on source-code access
- new download.html with links to download nightly builds and Debian releases
- updated the sidebar to reflect these changes

llvm-svn: 183547
2013-06-07 19:21:45 +00:00
Enrico Granata a1acb49188 Tweaking Daniel Malea's fixes to Makefile.rules to ensure that we correctly pass -stdlib=libstdc++ to clang when compiling as well as when linking
Not doing this was causing link errors as clang was looking for libc++ symbols while linking against libstdc++

llvm-svn: 183482
2013-06-07 01:58:52 +00:00
Enrico Granata 1a8aa4c04e Tweaks to the std::list (libstdc++ test case)
llvm-svn: 183480
2013-06-07 01:53:59 +00:00
Jim Ingham e96ade8bf6 Make the "SearchFilterByModuleListAndCU" work correctly for searches at the CompUnit
level.  Fixes a bug in "break set --source-pattern-regexp" when a shared library is
specified.  

Also cleaned up the help text for --source-pattern-regexp so it is a little clearer.

<rdar://problem/14084261>

llvm-svn: 183476
2013-06-07 01:13:00 +00:00
Greg Clayton 649f8b9b0b <rdar://problem/14086944>
lldb doesn't autocomplete objective C class methods. The regular expression was looking for strings that started with the completion string that was passed in. For objective C class methods, this string starts with "+" which wasn't being escaped. Added many other escapes that were missing just in case.

llvm-svn: 183470
2013-06-07 00:35:40 +00:00
Jim Ingham 679f6b7c2f Document the extended detach packet.
llvm-svn: 183469
2013-06-07 00:22:49 +00:00
Greg Clayton fd23889e53 Remove the debugserver "--open-connection" option and obey the hostname that is passed into debugserver.
you can now specify:

debugserver host:port
debugserver port
debugserver /path/to/file

When "host" is specified, we will only accept connections from that host. If host is not specified, we default to "localhost".

llvm-svn: 183457
2013-06-06 22:44:19 +00:00
Enrico Granata 39cf804683 <rdar://problem/14083928>
Making sure that if you invoke LLDB as lldb ./someBinary you can then launch the inferior with process launch —tty

llvm-svn: 183453
2013-06-06 22:23:02 +00:00
Jim Ingham d3480f5851 Address::GetSection() turns a weak pointer to a shared pointer which is a little slow. So in Address::operator== & != do the
cheap GetOffset() comparison first and only compare the sections if that is true.

llvm-svn: 183452
2013-06-06 22:16:56 +00:00
Sean Callanan 544053e353 Hardened the IR interpreter to prevent it from
reading non-standard value sizes.

<rdar://problem/14081292>

llvm-svn: 183448
2013-06-06 21:14:35 +00:00
Sean Callanan b4987e32fd Fixed a problem where evaluating a breakpoint
condition in two different processes (with the
same target) could cause crashes.  Now the breakpoint
condition is always evaluated (and possibly parsed)
by one thread at a time.

<rdar://problem/14083737>

llvm-svn: 183440
2013-06-06 20:18:50 +00:00
Ashok Thirumurthi e244ceec2e Adding a test case for pr15415 - partial backtrace with -fomit-frame-pointer
that is patterned after its parent TestInferiorCrashing.py.

- The xfail decorator limits the xfail to tool-chains that support this compiler option.
- Included a TODO concerning the platform-specific behavior when 'next' is issued after a crash.
- Toggling -fomit-frame-pointer results in an xpass as mentioned in pr15415.

Thanks to Daniel for the review, and Samuel for the bug report and reproducer.

llvm-svn: 183434
2013-06-06 19:22:05 +00:00
Ashok Thirumurthi 3b03728227 Reworked the routine that qualifies the tool-chain for expected failures to handle sub-strings.
- For instance, allows 'gcc' to match x86-64-linux-gnu-gcc as required on some Debian builds.
- Also adds doc-strings and a more consistent naming convention for related helpers.

llvm-svn: 183415
2013-06-06 14:23:31 +00:00
Enrico Granata ed4b293b68 <rdar://problem/14064994>
Fixing a test case to correctly check that the class name has changed instead of relying on GetValueDidChange()

llvm-svn: 183364
2013-06-06 00:58:37 +00:00
Sean Callanan 415422ce76 Fixes for the IR interpreter:
- Implemented the SExt instruction, and

 - eliminated redundant codepaths for constant
   handling.

Added test cases.

<rdar://problem/13244258>
<rdar://problem/13955820>

llvm-svn: 183344
2013-06-05 22:07:06 +00:00
Daniel Malea 692074622c Add test cases for attaching to a process after fork
- one test case is due to llvm.org/pr16229
- other test case uses a Linux workaround for above by using os.fork() instead of subprocess module

Patch by Andy Kaylor!

llvm-svn: 183340
2013-06-05 21:07:02 +00:00
Daniel Malea c7ffa7a958 Fix Makefiles in the data-formatter-stl tests
- specify compiler flag -stdlib=libstdc++ only if using clang (not supported in gcc)

llvm-svn: 183333
2013-06-05 19:32:34 +00:00
Enrico Granata b26fdada54 <rdar://problem/13125225>
Adding data formatters for std::set, std::multiset and std::multimap for libc++
The underlying data structure is the same as std::map, so this change is very minimal and mostly consists of test cases

llvm-svn: 183323
2013-06-05 17:47:23 +00:00
Matt Kopec 17b1624dda Skip intermittent watchpoint test failure when testing on Linux/gcc.
llvm-svn: 183316
2013-06-05 15:36:33 +00:00
Ashok Thirumurthi a3dd4899e8 Use std::vector for the array of RegisterInfo structs that describe the register context.
- Ensures that this container is populated once for the lifetime of lldb
--- In particular, static methods can query this data even after the first RegisterContext has been destroyed.
- Uses a singleton function to avoid global constructors.

Thanks to Greg Clayton for the suggestion!

llvm-svn: 183313
2013-06-05 14:12:43 +00:00
Jason Molenda 811d259bb1 Small changes to diagnose_unwind. Correctly provide help text.
Print the lldb version at the top of the output.

llvm-svn: 183289
2013-06-05 02:56:58 +00:00
Jason Molenda 23399d765c Change UnwindLLDB::SearchForSavedLocationForRegister so that it will allow for
the link register save location being in the link register - in which case we
should iterate down the stack, not recursively try to find the lr in the current
frame over and over.

<rdar://problem/13932954>

llvm-svn: 183282
2013-06-05 00:12:50 +00:00
Andrew Kaylor 912a710a8a Re-enabling a test that is no longer failing
llvm-svn: 183281
2013-06-04 23:38:51 +00:00
Jim Ingham 31caf980c6 Remember to tell the breakpoints to update themselves when new symbols are added.
<rdar://problem/14054840>

llvm-svn: 183277
2013-06-04 23:01:35 +00:00
Enrico Granata d325bf9da1 <rdar://problem/13239809>
Two things:
1) fixing a bug where memory read was not clearing the m_force flag after it was passed, so that subsequent memory reads would not need to be forced even if over boundary
2) adding a setting target.max-memory-read-size that you can set instead of the hardcoded 1024 bytes limit we had before

llvm-svn: 183276
2013-06-04 22:54:16 +00:00
Enrico Granata daa0ac48e6 <rdar://problem/12582328>
If you want to define a formatter for "array of Foo of any size", ordinarily you would say

-x "Foo \[[0-9]+\]"

this checkin allows you to instead say "Foo[]" (or "Foo []") and LLDB will automatically create the regular expression and add the -x flag on your behalf

llvm-svn: 183272
2013-06-04 22:25:36 +00:00
Enrico Granata 983920d1a9 <rdar://problem/14003462>
Formatters for unsigned char* and const variant

llvm-svn: 183254
2013-06-04 21:53:55 +00:00
Greg Clayton 76ea03ea7b Add a more clear explanation of what is missing for core files with no LC_THREAD load commands.
llvm-svn: 183253
2013-06-04 21:48:36 +00:00
Greg Clayton 9645e82ce2 Make sure a core file has thread contexts before we try and load it.
llvm-svn: 183252
2013-06-04 21:34:37 +00:00
Greg Clayton e86cef633b Fixed printf build warning.
llvm-svn: 183250
2013-06-04 21:30:42 +00:00
Greg Clayton a3f14d8bf1 <rdar://problem/13941992>
Accept mach-o files with bad segments. Many core files are not created correctly and we should still be able to glean any information we can from them.

llvm-svn: 183247
2013-06-04 20:27:06 +00:00
Enrico Granata 2e35cb7508 <rdar://problem/13988982>
LLDB API versioning
This checkin makes the LLDB API versioned
We are starting at version 1.0 and will then revise and update the API from there
Further details:
 API versioning
---------------------------------

The LLDB API is versioned independently of the LLDB source base
Our API version numbers are composed of a major and a minor number

The major number means a complete and stable revision of the API. Major numbers are compatibility breakers
(i.e. when we change the API major number, there is no promise of compatibility with the previous major version
 and we are free to remove and/or change any APIs)
Minor numbers are a work-in-progress evolution of the API. APIs will not be removed or changed across minor versions
(minors do not break compatibility). However, we can deprecate APIs in minor versions or add new APIs in minor versions
A deprecated API is supposedly going to be removed in the next major version and will generate a warning if used
APIs we add in minor versions will not be removed (at least until the following major) but they might theoretically be deprecated
in a following minor version
Users are discouraged from using the LLDB version number to test for API features and should instead use the API version checking
as discussed below

 API version checking
---------------------------------

You can (optionally) sign into an API version checking feature
To do so you need to define three macros:
LLDB_API_CHECK_VERSIONING - define to any value (or no value)
LLDB_API_MAJOR_VERSION_WANTED - which major version of the LLDB API you are targeting
LLDB_API_MINOR_VERSION_WANTED - which minor version of the LLDB API you are targeting

If these macros exist - LLDB will enable version checking of the public API

If LLDB_API_MAJOR_VERSION is not equal to LLDB_API_MAJOR_VERSION_WANTED we will immediately halt your compilation with an error
This is by design, since we do not make any promise of compatibility across major versions - if you really want to test your luck, disable the versioning altogether

If the major version test passes, you have signed up for a specific minor version of the API
Whenever we add or deprecate an API in a minor version, we will mark it with either
LLDB_API_NEW_IN_DOT_x - this API is new in LLDB .x
LLDB_API_DEPRECATED_IN_DOT_x - this API is deprecated as of .x

If you are using an API new in DOT_x
 if LLDB_API_MINOR_VERSION_WANTED >= x then all is well, else you will get a compilation error
  This is meant to prevent you from using APIs that are newer than whatever LLDB you want to target

If you are using an API deprecated in DOT_x
 if LLDB_API_MINOR_VERSION_WANTED >= x then you will get a compilation warning, else all is well
 This is meant to let you know that you are using an API that is deprecated and might go away

 Caveats
---------------------------------

Version checking only works on clang on OSX - you will get an error if you try to enable it on any other OS/compiler
If you want to enable version checking on other platforms, you will need to define appropriate implementations for
LLDB_API_IMPL_DEPRECATED and LLDB_API_IMPL_TOONEW and any other infrastructure your compiler needs for this purpose

We have no deprecation-as-error mode

There is no support for API versioning in Python

We reserve to use macros whose names begin with LLDB_API_ and you should not use them in your source code as they might conflict
with present or future macro names we are using to implement versioning


For API implementors:
If you need to add a new public API call, please remember to add the LLDB_API_NEW_IN_DOT_x marker in the header file
and when you are done with adding stuff, to also update LLDB_API_MINOR_VERSION
If you want to remove a function, deprecate it first, by using LLDB_API_DEPRECATED_IN_DOT_x
and when you are done with deprecating stuff, to also update LLDB_API_MINOR_VERSION
A new major version (LLDB_API_MAJOR_VERSION++) is your only chance to remove and/or change API calls
but is probably quite a big deal and you might want to consider deprecating the existing calls for a while
before doing your changes

A couple more caveats:
Currently, the lldb-tool does NOT use the version checking feature. It would be a nice future improvement to make it do that, once we have proper version checking on other OSs
APIs marked as deprecated by a comment in the source are still deprecated just that way. A good purpose for API 1.1 might be to deprecate them with appropriate markers

llvm-svn: 183244
2013-06-04 18:57:09 +00:00
Daniel Malea 6f0a5edb3f More minor FreeBSD fixes.
- link libexecinfo (as libc is missing backtrace())
- enable FreeBSD-specific plugins

Patch by Ed Maste!

llvm-svn: 183233
2013-06-04 15:59:01 +00:00
Jim Ingham 60c4118c88 If ThreadPlanCallFunction hasn't set its notion of the "real stop info" yet, just return the current PrivateStopInfo.
Also renamed a few more places where we were using StopReason in functions that were returning StopInfo's.

<rdar://problem/14042692>

llvm-svn: 183177
2013-06-04 01:40:51 +00:00
Daniel Malea 1d1592624c Un-skipping test that was disabled due to llvm.org/pr16191
- adding workaround recommended by Greg (-fno-limit-debug-info clang flag)
- filed bug llvm.org/pr16214 against Clang

llvm-svn: 183156
2013-06-03 21:42:50 +00:00
Daniel Malea f051dbce73 Fix crash (in optimized builds) due to invalid metadata operand
- ConstantDataArray is not a valid MDNode operand
- encode function-name strings in metadata by wrapping in an MDString instead

- should resolve reported by http://llvm-jenkins.debian.net/job/llvm-toolchain-quantal-binaries/architecture=amd64,distribution=quantal/173/

llvm-svn: 183153
2013-06-03 20:45:54 +00:00
Matt Kopec edee182bef Fix FreeBSD build due to previous changes to ProcessMonitor::Detach.
llvm-svn: 183150
2013-06-03 19:48:53 +00:00
Jim Ingham 35579dde40 Fix a couple of error message typos.
llvm-svn: 183145
2013-06-03 19:34:01 +00:00
Matt Kopec ef14371d3f Fix various build warnings.
llvm-svn: 183140
2013-06-03 18:00:07 +00:00
Matt Kopec 6f961239ae Fix setting of watchpoints on inferior thread creation for Linux.
llvm-svn: 183139
2013-06-03 17:40:20 +00:00
Ashok Thirumurthi 880728f3eb Matched a vector new with vector delete.
Thanks to Daniel and valgrind.

llvm-svn: 183110
2013-06-03 15:53:40 +00:00
Daniel Malea 145abd1416 Fix link ordering issue on FreeBSD
llvm-svn: 183109
2013-06-03 15:49:56 +00:00
Enrico Granata 8e698323ec A few cleanups for our documentation
llvm-svn: 183058
2013-05-31 22:54:23 +00:00
Matt Kopec 085d6cec1a Add ability to attach/detach to multi-threaded inferiors on Linux.
All running threads will be detected and stopped on attach and all threads get resumed on detach.

llvm-svn: 183049
2013-05-31 22:00:07 +00:00
Daniel Malea fac51ab5e2 Skipping test case for clang 3.4 due to llvm.org/pr16191
- should resolve remaining buildbot issues with debian/clang builder

llvm-svn: 183044
2013-05-31 21:05:23 +00:00
Daniel Malea c91e4ab26e Use C-style include to match style in file (instead of C++ style)
- as per review comment from Dimitry Andric!

llvm-svn: 183039
2013-05-31 20:21:38 +00:00