summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLDB] Switch to assembly view if source is movedMohit K. Bhakkad2015-12-031-4/+5
| | | | | | | | Reviewers: clayborg, jingham, jasonmolenda. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.org/D12877 llvm-svn: 254588
* Add 64/128 bit arm neon register definitions on linuxTamas Berghammer2015-11-261-2/+4
| | | | | | Differential revision: http://reviews.llvm.org/D14985 llvm-svn: 254152
* Pass the ExecutionContext as well, since it is actually usefulEnrico Granata2015-11-191-0/+3
| | | | llvm-svn: 253537
* Allow the language plugins a say in how the function name is rendered as ↵Enrico Granata2015-11-191-140/+203
| | | | | | part of frame formatting llvm-svn: 253531
* Remove a broken hack from Scalar::ULongLong and fix a testTamas Berghammer2015-11-131-2/+0
| | | | | | | | | | | | | | | | Change Test-rdar-12481949.py to expect GetValueAsUnsigned() to return 0xffffffff if the variable is an int32_t (signed, 4 byte integer) with value of -1. The previous expectation where we expected the value to be 0xffffffffffffffff doesn't make sense as nothing explains why we would treat it as an 8 byte value. This CL also removes a hack from Scalar::ULongLong what was most likely added to get this test passing as it only worked in case the value of the variable is -1 and didn't make any sense even in that case. Differential revision: http://reviews.llvm.org/D14611 llvm-svn: 253027
* Introduce a way for Languages to specify whether values of "reference types" ↵Enrico Granata2015-11-101-8/+16
| | | | | | | | | | are "nil" (not pointing to anything) or uninitialized (never made to point at anything) This latter determination may or may not be possible on a per-language basis; and neither is mandatory to implement for any language Use this knowledge in the ValueObjectPrinter to generalize the notion of IsObjCNil() and the respective printout llvm-svn: 252663
* More rework of the updating logic for ValueObjectChild. Still just ↵Enrico Granata2015-11-091-24/+43
| | | | | | refactoring with no feature change llvm-svn: 252553
* Rework the way in which ValueObjectChild decides how to update itself; this ↵Enrico Granata2015-11-091-1/+1
| | | | | | is a slight refactoring that I need as part of a larger master plan. As such, should be NFC llvm-svn: 252529
* Add a way for source languages to "mark" ValueObjects with language-specific ↵Enrico Granata2015-11-096-12/+76
| | | | | | | | | | flags In this way, when a language needs to tell itself things that are not bound to a type but to a value (imagine a base-class relation, this is not about the type, but about the ValueObject), it can do so in a clean and general fashion The interpretation of the values of the flags is, of course, up to the language that owns the value (the value object's runtime language, that is) llvm-svn: 252503
* Make lldb::endian::InlHostByteOrder() private.Bruce Mitchener2015-11-079-49/+49
| | | | | | | | | | | | | | | | | | Summary: Since this is within the lldb namespace, the compiler tries to export a symbol for it. Unfortunately, since it is inlined, the symbol is hidden and this results in a mess of warnings when building on OS X with cmake. Moving it to the lldb_private namespace eliminates that problem. Reviewers: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D14417 llvm-svn: 252396
* A little more careful handling of platforms and unspecified unknownJason Molenda2015-11-061-43/+74
| | | | | | | vendors & oses, especially on Apple, to handle the new environment where we have more than macosx or ios (now we have watchos and tvos). llvm-svn: 252264
* Reuse native curses(8) library on NetBSDBruce Mitchener2015-11-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: The reason for it is limit of detecting ncurses on various systems. For example, Ubuntu ships with <curses.h> and linkage from <ncurses.h>, <ncurses.h> isn't detected by CMake. Detecting `<curses.h>` on NetBSD is reusing conflicting header from the host curses(8) and pkgsrc's ncurses library. ncurses ships on most (till conflicting) systems with curses.h. On NetBSD it might be conflicting, so the ncurses headers are installed with pkgsrc to a subdirectory "ncurses/". Patch by Kamil Rytarowski. Thanks! Reviewers: clayborg Subscribers: youri, akat1, brucem, joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D14037 llvm-svn: 252250
* Initialize addr_size to match the size of lldb itselfJason Molenda2015-11-051-2/+29
| | | | | | | | | as an initial seed value, instead of 4. Add some asserts when lldb is built for development to check that addr_size is a valid value. llvm-svn: 252232
* [Core] Avoid default in switch() that covers all the cases.Davide Italiano2015-11-041-1/+0
| | | | | | Unbreak the build for FreeBSD + -Werror. llvm-svn: 252079
* Actually implement Section::GetSectionData.Jim Ingham2015-11-041-0/+19
| | | | llvm-svn: 252024
* Fix an issue where LLDB would truncate summaries for string types without ↵Enrico Granata2015-11-041-11/+13
| | | | | | producing any evidence thereof llvm-svn: 252018
* Do not try to copy host memory from address 0Enrico Granata2015-11-031-1/+1
| | | | llvm-svn: 251889
* Change ValueObject::IsLogicalTrue so that it starts by asking the applicable ↵Enrico Granata2015-11-021-0/+15
| | | | | | Language plugin before using the C-style rule llvm-svn: 251838
* Abstract the notion of the truth value of an expression result, for useJim Ingham2015-10-311-0/+20
| | | | | | in breakpoint conditions. llvm-svn: 251727
* Fix build break on OS X from cleanup check-in.Todd Fiala2015-10-281-0/+5
| | | | | | I'll track down why our CI is not sending out emails on build breaks. llvm-svn: 251522
* Include <cstdio> to fix build errors.Hafiz Abid Qadeer2015-10-271-0/+2
| | | | | | | This file uses things like fprintf and stderr and <cstdio> is the right header to include. I was getting build errors without it. llvm-svn: 251426
* Fix Clang-tidy modernize-use-override warnings in some files in source; ↵Eugene Zelenko2015-10-262-126/+77
| | | | | | other minor fixes. llvm-svn: 251309
* Try to fix MSVC build after r251105Tamas Berghammer2015-10-231-2/+2
| | | | llvm-svn: 251109
* Fix race conditions in Core/TimerTamas Berghammer2015-10-231-28/+45
| | | | | | | | | | | The Timer class already had some support for multi-threaded access but it still contained several race conditions. This CL fixes them in preparation of adding multi-threaded dwarf parsing (and other multi-threaded parts later). Differential revision: http://reviews.llvm.org/D13940 llvm-svn: 251105
* Fix some race condition in ConstString around Mangled name handlingTamas Berghammer2015-10-221-15/+40
| | | | | | Differential revision: http://reviews.llvm.org/D13941 llvm-svn: 251006
* Change ModuleList::GetSharedModule so that it will reject "stubJason Molenda2015-10-221-12/+43
| | | | | | | | | | | | | | | | | | | libraries" altogether. On Mac/iOS, these are libraries which have a UUID and nlist records but no text or data. If one of these gets into the global module list, every time we try to search for a given filename/arch/UUID, we'll get this stub library back. We need to prevent them from getting added to the module list altogether. I thought about doing this down in ObjectFileMachO -- just rejecting the file as a valid binary file altogether -- but Greg didn't want to take that hard line approach at this point, he wanted to keep the ability for lldb to read one of these if someone wanted to in the future. <rdar://problem/23035075> llvm-svn: 250979
* Fix error handling when there are no REPLs installed.Sean Callanan2015-10-211-0/+22
| | | | | | | | Before, in the absence of any configured REPLs, LLDB would act as if there were multiple possible REPL options, whereas actually no REPL language is supported. Now we make a better error. llvm-svn: 250931
* [SBValue] Add a method GetNumChildren(uint32_t max)Siva Chandra2015-10-219-26/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Along with this, support for an optional argument to the "num_children" method of a Python synthetic child provider has also been added. These have been added with the following use case in mind: Synthetic child providers currently have a method "has_children" and "num_children". While the former is good enough to know if there are children, it does not give any insight into how many children there are. Though the latter serves this purpose, calculating the number for children of a data structure could be an O(N) operation if the data structure has N children. The new method added in this change provide a middle ground. One can call GetNumChildren(K) to know if a child exists at an index K which can be as large as the callers tolerance can be. If the caller wants to know about children beyond K, it can make an other call with 2K. If the synthetic child provider maintains state about it counting till K previosly, then the next call is only an O(K) operation. Infact, all calls made progressively with steps of K will be O(K) operations. Reviewers: vharron, clayborg, granata.enrico Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D13778 llvm-svn: 250930
* Fixed version of r250913, which actually implements all the static functions.Sean Callanan2015-10-212-6/+33
| | | | | | Thanks to Siva Chandra and Oleksiy Vyalov for pouncing on this. llvm-svn: 250928
* Revert "Made the REPL choose a default language if only one REPL can be chosen."Siva Chandra2015-10-212-4/+6
| | | | | | | | | | | | Summary: This reverts commit babd6dd74e316b1fcd9d171d7d8c83845d51a487. Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13952 llvm-svn: 250927
* Made the REPL choose a default language if only one REPL can be chosen.Sean Callanan2015-10-212-6/+4
| | | | | | This requires REPLs to enumerate the languages they support. llvm-svn: 250913
* When target is NULL, provide a debugger so that REPLs can use that to createSean Callanan2015-10-211-1/+1
| | | | | | their own target. llvm-svn: 250869
* Rationalization of includes in the data formatters codeEnrico Granata2015-10-201-2/+3
| | | | llvm-svn: 250798
* Added support for the "--repl" argument to LLDB. Sean Callanan2015-10-201-0/+34
| | | | | | | | | This makes LLDB launch and create a REPL, specifying no target so that the REPL can create one for itself. Also added the "--repl-language" option, which specifies the language to use. Plumbed the relevant arguments and errors through the REPL creation mechanism. llvm-svn: 250773
* Added the concept of a Read-Eval-Print-Loop to LLDB.Sean Callanan2015-10-192-0/+172
| | | | | | | | | | | | | | | | A REPL takes over the command line and typically treats input as source code. REPLs can also do code completion. The REPL class allows its subclasses to implement the language-specific functionality without having to know about the IOHandler-specific internals. Also added a PluginManager-based way of getting to a REPL given a language and a target. Also brought in some utility code and expression options that are useful for REPLs, such as line offsets for expressions, ANSI terminal coloring of errors, and a few IOHandler convenience functions. llvm-svn: 250753
* Silence -Wqual-cast warnings from GCC 5.2Saleem Abdulrasool2015-10-183-6/+6
| | | | | | | | There were a number of const qualifiers being cast away which caused warnings. This cluttered the output hiding real errors. Silence them by explicit casting. NFC. llvm-svn: 250662
* Resubmit: RenderScript command for printing allocation contents Ewan Crawford2015-10-161-0/+6
| | | | | | | | | Previous commit r250281 broke TestDataFormatterSmartArray.py Resolved in in this patch by adding the new enum eFormatVectorOfFloat16 to FormatManager. Differential Revision: http://reviews.llvm.org/D13730 llvm-svn: 250499
* Fix a problem where LLDB could sometimes try to get the size of an ↵Enrico Granata2015-10-143-6/+10
| | | | | | Objective-C type without passing an appropriate ExecutionContext llvm-svn: 250339
* Revert "RenderScript command for printing allocation contents"Pavel Labath2015-10-141-6/+0
| | | | | | This commit breaks TestDataFormatterSmartArray on all buildbots. llvm-svn: 250290
* Change ConstString to support massive multi-threaded accessTamas Berghammer2015-10-141-54/+46
| | | | | | | | | | | | | | | | | Previously ConstString had a single mutex guarding the global string pool for each access what become a bottleneck when using it with a large number of threads. This CL distributes the strings to 256 individual string pools based on a simple hash function to eliminate the bottleneck and speed up the multi-thread access. The goal of the change is to prepare to multi-threaded symbol parsing code to speed up the symbol parsing speed. Differential revision: http://reviews.llvm.org/D13652 llvm-svn: 250289
* RenderScript command for printing allocation contentsEwan Crawford2015-10-141-0/+6
| | | | | | | | | | | | | | | | | | | This patch adds the command 'language renderscript allocation dump <ID>' for printing the contents of a RS allocation. Displaying the coordinate of each element as well as its formatted value e.g (lldb) language renderscript allocation dump 1 Data (X, Y, Z): (0, 0, 0) = {0 1} (1, 0, 0) = {2 3} (2, 0, 0) = {4 5} A --file <filename> option is also included, since for large allocations it may be more helpful to view this text as a file. Reviewed by: jingham, clayborg Subscribers: lldb-commits, ADodds, domipheus, brucem Differential Revision: http://reviews.llvm.org/D13699 llvm-svn: 250281
* ArchSpec: fix unintentional promotion of unspecified unknowns to specified ↵Todd Fiala2015-10-131-2/+17
| | | | | | | | | | | | | | | | | | | | | unknowns * ArchSpec::MergeFrom() would erroneously promote an unspecified unknown to a specified unknown when both the ArchSpec and the merged in ArchSpec were both unspecified unknowns. This no longer happens, which fixes issues with global module cache lookup in some situations. * Added ArchSpec::DumpTriple(Stream&) that now properly prints unspecified unknowns as '*' and specified unknows as 'unknown'. This makes it trivial to tell the difference between the two. Converted printing code over ot using DumpTriple() rather than building from scratch. * Fixed up a couple places that were not guaranteeing that an unspecified unknown was recorded as such. llvm-svn: 250253
* Fixup log enable --stack so it works on Linux.Todd Fiala2015-10-101-0/+1
| | | | | | | | The underlying raw_string_stream buffer was not being flushed after asking llvm to collect the backtrace. This worked fine on OS X but was failing to print anything on Linux. llvm-svn: 249930
* Fix regression caused by r249769Tamas Berghammer2015-10-091-0/+1
| | | | | | | | * Change TestSettings to test qith go instead of pascal as ToT pascal support isn't complete * Fix crash inside PluginManager llvm-svn: 249821
* Added support for enumerating the languages that actually support TypeSystemsSean Callanan2015-10-081-1/+30
| | | | | | | and expressions. Also wired that into the OptionValue infrastructure, although it isn't used for tab-completion yet. llvm-svn: 249769
* Re-commit the (fixed) changes from r248985 which were reverted by PavelJason Molenda2015-10-082-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when they introduced android testsuite regressions. Pavel has run the testsuite against the updated patch and it completes cleanly now. The original commit message: Fixing a subtle issue on Mac OS X systems with dSYMs (possibly introduced by r235737 but I didn't look into it too closely). A dSYM can have a per-UUID plist in it which tells lldb where to find an executable binary for the dSYM (DBGSymbolRichExecutable) - other information can be included in this plist, like how to remap the source file paths from their build pathnames to their long-term storage pathnames. This per-UUID plist is a unusual; it is used probably exclusively inside apple with our build system. It is not created by default in normal dSYMs. The problem was like this: 1. lldb wants to find an executable, given only a UUID (this happens when lldb is doing cross-host debugging and doesn't have a copy of the target system's binaries) 2. It eventually calls LocateMacOSXFilesUsingDebugSymbols which does a spotlight search for the dSYM on the local system, and failing that, tries the DBGShellCommands command to find the dSYM. 3. It gets a dSYM. It reads the per-UUID plist in the dSYM. The dSYM has a DBGSymbolRichExecutable kv pair pointing to the binary on a network filesystem. 4. Using the binary on the network filesystem, lldb now goes to find the dSYM. 5. It starts by looking for a dSYM next to the binary it found. 6. lldb is now reading the dSYM over a network filesystem, ignoring the one it found on its local filesystem earlier. Everything still *works* but it's much slower. This would be a tricky one to write up in a testsuite case; you really need the binary to not exist on the local system. And LocateMacOSXFilesUsingDebugSymbols will only compile on Mac OS X - even if I found a way to write up a test case, it would not run anywhere but on a mac. One change Greg wanted while I was touching this code was to have LocateMacOSXFilesUsingDebugSymbols (which could be asked to find a binary OR find a dSYM) to instead return a ModuleSpec with the sum total of everything it could find. This change of passing around a ModuleSpec instead of a FileSpec was percolated up into ModuleList::GetSharedModule. The changes to LocateMacOSXFilesUsingDebugSymbols look larger than they really are - there's a lot of simple whitespace changes in there. I ran the testsuites on mac, no new regressions introduced <rdar://problem/21993813> llvm-svn: 249755
* Moved the target specific ClangASTContext initialization over into ↵Greg Clayton2015-10-081-20/+1
| | | | | | | | ClangASTContext::CreateInstance. This involved changing the TypeSystem::CreateInstance to take a module or a target. This allows type systems to create an AST for modules (no expression support needed) or targets (expression support is needed) and return the correct class instance for both cases. llvm-svn: 249747
* Testcase and fix for bug 24074Ravitheja Addepally2015-10-081-11/+17
| | | | | | | | | | | | | | | | | | | | Summary: In bug 24074, the type information is not shown correctly. This commit includes the following - -> Changes for displaying correct type based on current lexical scope for the command "image lookup -t" -> The corresponding testcase. -> This patch was reverted due to segfaults in FreeBSD and Mac, I fixed the problems for both now. Reviewers: emaste, granata.enrico, jingham, clayborg Differential Revision: http://reviews.llvm.org/D13290 llvm-svn: 249673
* Route the preferred-display-language mechanism to the ValueObjectPrinter and ↵Enrico Granata2015-10-074-1/+53
| | | | | | actually fill in a few gaps for dynamic and synthetic values to be able to adopt this in useful ways llvm-svn: 249507
* Introduce a variant of GetSummaryAsCString() that takes a LanguageType ↵Enrico Granata2015-10-071-11/+19
| | | | | | | | argument, and use it when crafting summaries by running selectors This is the first in a series of commits that are meant to teach LLDB how to properly handle multi-language formatting of values llvm-svn: 249503
OpenPOWER on IntegriCloud