summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
* Fix invalid shift operator overload in ScalarPavel Labath2016-02-091-1/+1
| | | | | | | | | | | | | | Summary: This also fixes an infinite recursion between lldb_private::operator>> () and Scalar::operator>>= (). Reviewers: sagar, tberghammer, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16868 Patch by Marianne Mailhot-Sarrasin llvm-svn: 260239
* Remove Timer::Initialize routinePavel Labath2016-02-011-23/+12
| | | | | | | | | | | | | | | | | | | | Summary: I've run into an issue when running unit tests, where the underlying problem turned out to be that we were creating Timer objects (through several layers of indirection) without calling Timer::Initialize. Since Timer's thread-local storage was not properly initialized, we were overwriting gtest's own thread-local storage, causing test failures. Instead of requiring that every test calls Timer::Initialize(), I remove the function altogether: The thread-local storage can be initialized on-demand, and the g_file variable initialized to stdout and never changed, so I have simply removed it. Reviewers: clayborg, zturner, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16722 llvm-svn: 259356
* Fixed a couple of places where we were getting the module from aJim Ingham2016-01-291-1/+5
| | | | | | | section and using it w/o checking that it was valid. This can cause crashes - usually when tearing down a target. llvm-svn: 259237
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* Set symbol types for function symbols loaded from PE/COFFAdrian McCarthy2016-01-261-8/+10
| | | | | | | | | | | | | | | | 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
* [LLDB] Consider only valid symbols while resolving by addressMohit K. Bhakkad2016-01-231-1/+10
| | | | | | | | Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D16397 llvm-svn: 258621
* Remove duplicate header added in r256927Ewan Crawford2016-01-071-1/+0
| | | | | | | | | r256927 included a duplicate StreamString header file. This patch simply removes the duplicate. Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D15948 llvm-svn: 257061
* Add LogDump methods to lldb_private::StringList.Ewan Crawford2016-01-061-0/+37
| | | | | | | | | This patch eases the printing of iterable string containers. Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D15773 llvm-svn: 256927
* No need for a custom function here; just use what C providesEnrico Granata2015-12-221-29/+1
| | | | llvm-svn: 256223
* Reduce code duplicationEnrico Granata2015-12-211-64/+16
| | | | llvm-svn: 256212
* Inspect DW_AT_const_value global static const variablesEwan Crawford2015-12-171-0/+1
| | | | | | | | | | | | This patch adds support for printing global static const variables which are given a DW_AT_const_value DWARF tag by clang. Fix for bug https://llvm.org/bugs/show_bug.cgi?id=25653 Reviewers: clayborg, tberghammer Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D15576 llvm-svn: 255887
* Don't demangle a name when Mangled::GetName() is called with ePreferMangled. ↵Greg Clayton2015-12-171-6/+4
| | | | | | Only demangle if this isn't the the value for the "preference" argument indicating the user wants the demangled name. This will stop a lot of symbols from being demangled when parsing the symbol table in ObjectFileMachO. llvm-svn: 255864
* Rework breakpoint language filtering to use the symbol context's language.Dawn Perchik2015-12-161-2/+14
| | | | | | | | | | | | | | | | This patch reworks the breakpoint filter-by-language patch to use the symbol context instead of trying to guess the language solely from the symbol's name. This has the advantage that symbols compiled with debug info will have their actual language known. Symbols without debug info will still do the same "guess"ing because Symbol::GetLanguage() is implemented using Mangled::GuessLanguage(). The recognition of ObjC names was merged into Mangled::GuessLanguage. Reviewed by: jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15326 llvm-svn: 255808
* Differential Revision: http://reviews.llvm.org/D15333Aidan Dodds2015-12-101-9/+7
| | | | llvm-svn: 255237
* Fix typo in a commentKamil Rytarowski2015-12-041-1/+1
| | | | llvm-svn: 254768
* [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
OpenPOWER on IntegriCloud