summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol
Commit message (Collapse)AuthorAgeFilesLines
...
* Provide option to set pc of the file loaded in memory.Hafiz Abid Qadeer2017-01-241-1/+10
| | | | | | | | | | | | | | Summary: This commit adds an option to set PC to the entry point of the file loaded using "target module load" command. In D28804, Greg asked me to separate this part under a different option. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28944 llvm-svn: 292989
* Fix more unused variable warnings when asserts are disabled.Hafiz Abid Qadeer2017-01-201-0/+1
| | | | llvm-svn: 292598
* Provide a substitute to load command of gdb.Hafiz Abid Qadeer2017-01-191-0/+31
| | | | | | | | | | | | | | | For bare-metal targets, lldb was missing a command like 'load' in gdb which can be used to create executable image on the target. This was discussed in http://lists.llvm.org/pipermail/lldb-dev/2016-December/011752.html This commits adds an option to "target module load" command to provide that functionality. It does not set the PC to entry address which will be done separately. Reviewed in https://reviews.llvm.org/D28804 llvm-svn: 292499
* Remove a couple of Stream flagsPavel Labath2017-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I came across this while trying to understand what Log::Debug does. It turns out it does not do anything, as there is no instance of someone setting a debug flag on a stream. The same is true for the Verbose and AddPrefix flags. Removing these will enable some cleanups in the Logging class, and it brings us closer towards the long term goal of standardizing on llvm stream classes. I have removed these flags and all code the code which tested for their presence -- there wasn't much of it, mostly in SymbolFileDWARF, which is probably going away at some point anyway. The eBinary flag still has some users, so I am letting it life for the time being. Reviewers: clayborg, zturner Subscribers: aprantl, beanz, lldb-commits Differential Revision: https://reviews.llvm.org/D28616 llvm-svn: 291895
* Fix build for clang r291753Pavel Labath2017-01-121-2/+1
| | | | llvm-svn: 291756
* Improve Type::GetTypeScopeAndBasenameHelper and add unit testsTamas Berghammer2017-01-103-49/+58
| | | | | | | | | | Previously it failed to handle nested types inside templated classes making it impossible to look up these types using the fully qualified name. Differential revision: https://reviews.llvm.org/D28466 llvm-svn: 291559
* Fix dereferencing of pointers to empty classesTamas Berghammer2017-01-071-30/+29
| | | | llvm-svn: 291350
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-062-7/+4
| | | | | | | | | Also found/fixed one bug identified by this warning in RenderScriptx86ABIFixups.cpp where a string literal was being used in an effort to provide a name for an instruction/register, but was instead being passed as the bool 'isVolatile' parameter. llvm-svn: 291198
* Silence some -Wstring-conversion warningsPavel Labath2017-01-051-1/+1
| | | | | | | | lldbassert(!"foo") -> lldbassert(0 && "foo") In one case, this actually detected a logic error in the assertion (missing !). llvm-svn: 291102
* Add methods to enable using formatv syntax in LLDB.Zachary Turner2016-12-161-6/+6
| | | | | | | | | | | | | This adds formatv-backed formatting functions in various places in LLDB such as StreamString, logging, constructing error messages, etc. A couple of callsites are changed from Printf style syntax to formatv style syntax to illustrate its usage. Additionally, a FileSpec formatter is introduced so that FileSpecs can be formatted natively. Differential Revision: https://reviews.llvm.org/D27632 llvm-svn: 289922
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-262-1/+10
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* Use Clang for D language support.Johan Engelen2016-11-251-1/+3
| | | | | | Differential revision: https://reviews.llvm.org/D24794 llvm-svn: 287917
* Fix some accidental Prints of StringRefs that snuck in.Zachary Turner2016-11-191-3/+6
| | | | llvm-svn: 287412
* Re-add the StringRef interface changes for Variable.Zachary Turner2016-11-181-101/+109
| | | | | | | | This concludes the changes I originally tried to make and then had to back out. This way if anything is still broken, it should be easier to bisect it back to a more specific changeset. llvm-svn: 287367
* Resubmit "Remove an output-parameter from Variable function".Zachary Turner2016-11-181-4/+2
| | | | | | | | | | | The scanning algorithm had a few little subtleties that I overlooked, but this patch should fix everything. I still haven't changed the function to take a StringRef since that has some trickle down effect and is mostly mechanical, I just wanted to get the tricky part as isolated as possible. llvm-svn: 287354
* Revert "Remove an out param from ValueObject::GetValueForExpressionPath."Zachary Turner2016-11-181-1/+9
| | | | | | | This reverts commit r287315, as it introduces a bug that breaks many things. llvm-svn: 287320
* Remove an out param from ValueObject::GetValueForExpressionPath.Zachary Turner2016-11-181-9/+1
| | | | | | | | | | This argument was only used in one place in the codebase, and it was in a non-critical log statement and can be easily substituted for an equally meaningful field instead. The payoff of computing this value is not worth the added complexity. llvm-svn: 287315
* Convert AutoComplete related code to StringRef.Zachary Turner2016-11-171-29/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D26721 llvm-svn: 287188
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-161-1/+1
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Convert some Expression parser functions to StringRef.Zachary Turner2016-11-082-5/+5
| | | | llvm-svn: 286208
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-023-11/+11
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Convert UniqueCStringMap to use StringRef.Zachary Turner2016-10-063-74/+73
| | | | llvm-svn: 283494
* Fix GetDisplayName when only a demangled name is availableFrancis Ricci2016-10-062-4/+0
| | | | | | | | | | | | | | | | Summary: GetDisplayDemangledName will already return a ConstString() when there is neither a mangled name or a demangled name, so we don't need to special case here. This will fix GetDisplayName in cases where m_mangled contains only a demangled name and not a mangled name. Reviewers: clayborg, granata.enrico, sas Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25201 llvm-svn: 283491
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-052-1/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Fix comment - Module::PrepareForFunctionNameLookup should be ↵Dawn Perchik2016-09-301-1/+1
| | | | | | Module::LookupInfo::LookupInfo. llvm-svn: 282941
* Fixed several i386 Objective-C tests by completing objects, not their pointers.Sean Callanan2016-09-301-50/+61
| | | | llvm-svn: 282898
* Make lldb::Regex use StringRef.Zachary Turner2016-09-212-4/+7
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
* Force the initialization of the m_type ivar inJason Molenda2016-09-081-0/+3
| | | | | | | | Function::GetStartLineSourceInfo before we try to return the start line information about a function; this function requires it to have been initialized. llvm-svn: 280902
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0637-28024/+24766
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Fix build breakage caused by r280490Tamas Berghammer2016-09-021-2/+1
| | | | llvm-svn: 280492
* Fix 2 waring in the OCaml AST contextTamas Berghammer2016-09-021-2/+0
| | | | llvm-svn: 280490
* Fix a typo/thinko - this was generating the wrong kind of arrayEnrico Granata2016-08-301-1/+1
| | | | llvm-svn: 280164
* Add SBType::GetArrayType() such that - given a type - one can make an array ↵Enrico Granata2016-08-303-1/+34
| | | | | | | | (of a given size) of that type This is currently only implemented for the clang-based TypeSystem, but other languages are welcome to jump in! llvm-svn: 280151
* Symbol: add missing item in covered switchSaleem Abdulrasool2016-08-161-0/+1
| | | | | | | RenderScript was missing from the covered switch. Add it to avoid a warning of the missing entry. NFC. llvm-svn: 278774
* Fix expression evaluation with operator newPavel Labath2016-08-151-237/+281
| | | | | | | | | | | | | | | | Summary: referencing a user-defined operator new was triggering an assert in clang because we were registering the function name as string "operator new", instead of using the special operator enum, which clang has for this purpose. Method operators already had code to handle this, and now I extend this to cover free standing operator functions as well. Test included. Reviewers: spyffe Subscribers: sivachandra, paulherman, lldb-commits Differential Revision: http://reviews.llvm.org/D17856 llvm-svn: 278670
* Make pascal debugging work again.Greg Clayton2016-08-101-3/+4
| | | | | | <rdar://problem/27652051> llvm-svn: 278302
* Delete Host/windows/win32.hZachary Turner2016-08-093-11/+11
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* [Concepts] Add TODO and requires-clause placeholder; NFCHubert Tong2016-08-021-1/+3
| | | | llvm-svn: 277495
* Support for OCaml native debuggingTamas Berghammer2016-08-022-0/+799
| | | | | | | | | | | | | This introduces basic support for debugging OCaml binaries. Use of the native compiler with DWARF emission support (see https://github.com/ocaml/ocaml/pull/574) is required. Available variables are considered as 64 bits unsigned integers, their interpretation will be left to a OCaml-made debugging layer. Differential revision: https://reviews.llvm.org/D22132 llvm-svn: 277443
* Typo corrections identified by codespellEd Maste2016-07-191-1/+1
| | | | | | | | | Submitted by giffunip@yahoo.com; I fixed a couple of nearby errors and incorrect changes in the patch. llvm.org/pr27634 llvm-svn: 275983
* Add missing break stmt to DW_CFA_GNU_args_size case.Jason Molenda2016-07-171-0/+1
| | | | llvm-svn: 275729
* Add support for Objective-C class properties.Greg Clayton2016-07-141-7/+16
| | | | | | | | Added test cases to exiting tests to cover the new functionality. <rdar://problem/24311282> llvm-svn: 275459
* Add "support" for DW_CFA_GNU_args_size to the unwinderPavel Labath2016-07-131-0/+20
| | | | | | | | | | | | | | | | | | | Summary: This adds the knowledge of the DW_CFA_GNU_args_size instruction to the eh_frame parsing code. Right now it is ignored as I am unsure how is it supposed to be handled, but now we are at least able to parse the rest of the FDE containing this instruction. I also add a fix for a bug which was exposed by this instruction. Namely, a mismatched sequence of remember/restore instructions in the input could cause us to pop an empty stack and crash. Now we just log the error and ignore the offending instruction. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22266 llvm-svn: 275260
* Remove assert since it was crashing the mutli process driver tests. Made the ↵Greg Clayton2016-07-121-5/+16
| | | | | | code behave correctly when indexes are out of range or the collection is empty and is "log enable lldb unwind" is enabled, log an error message. llvm-svn: 275226
* LLDB reads incorrect memory ranges when displaying bitfields when reading ↵Greg Clayton2016-07-061-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bits from file memory. Bitfields were not correctly describing their offsets within the integer that they are contained within. If we had a bitfield like: struct MyStruct { uint32_t a:8; uint32_t b:8; }; ClangASTContext::GetChildCompilerTypeAtIndex would say that child a and b had the following values in their respective ValueObjectChild objects: name byte-size bit-size bit-offset byte-offset-from-parent ==== ========= ======== ========== ======================= "a" 4 8 0 0 "b" 4 8 0 1 So if we had a "MyStruct" at address 0x1000, we would end up reading 4 bytes from 0x1000 for "a", and 4 bytes from 0x1001 for "b". The fix for this is to fix the "child_byte_offset" and "child_bitfield_bit_offset" values returned by ClangASTContext::GetChildCompilerTypeAtIndex() so that now the table looks like: name byte-size bit-size bit-offset byte-offset-from-parent ==== ========= ======== ========== ======================= "a" 4 8 0 0 "b" 4 8 8 0 Then we don't run into a problem when reading data from a file's section info using "target variable" before running. It will also stop us from not being able to display a bitfield values if the bitfield is in the last bit of memory before an unmapped region. (Like if address 0x1004 was unmapped and unreadable in the example above, if we tried to read 4 bytes from 0x1001, the memory read would fail and we wouldn't be able to display "b"). <rdar://problem/27208225> llvm-svn: 274701
* Enhance FuncUnwinders::GetUnwindPlanAtNonCallSite to detect when weJason Molenda2016-07-061-4/+70
| | | | | | | | | | | | | | | | | | may be in a function that is non-ABI conformant, and the eh_frame instructions correctly describe how to unwind out of this function, but the assembly parsing / arch default unwind plans would be incorrect. This is to address a problem that Ravitheja Addepally reported in http://reviews.llvm.org/D21221 - I wanted to try handling the problem with this approach which I think may be more generally helpful, Ravitheja tested it and said it solves the problem on Linux/FreeBSD. Ravi has a test case in http://reviews.llvm.org/D21221 that will be committed separately. Thanks for all the help on this one, Ravi. llvm-svn: 274700
* Warning about debugging optimized code was not happening without dSYMs. Now ↵Greg Clayton2016-07-052-26/+53
| | | | | | | | | | it works for DWARF in .o files on Darwin. I changed "m_is_optimized" in lldb_private::CompileUnit over to be a lldb::LazyBool so that it can be set to eLazyBoolCalculate if it needs to be parsed later. With SymbolFileDWARFDebugMap, we don't actually open the DWARF in the .o files for each compile unit until later, and we can't tell if a compile unit is optimized ahead of time. So to avoid pulling in all .o right away just so we can answer the questions of "is this compile unit optimized" we defer it until a point where we will have the compile unit parsed. <rdar://problem/26068360> llvm-svn: 274585
* Fix ClangASTContext after some clang API changesTamas Berghammer2016-07-041-5/+2
| | | | llvm-svn: 274488
* Added support for thread local variables on all Apple OS variants.Greg Clayton2016-07-012-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had support that assumed that thread local data for a variable could be determined solely from the module in which the variable exists. While this work for linux, it doesn't work for Apple OSs. The DWARF for thread local variables consists of location opcodes that do something like: DW_OP_const8u (x) DW_OP_form_tls_address or DW_OP_const8u (x) DW_OP_GNU_push_tls_address The "x" is allowed to be anything that is needed to determine the location of the variable. For Linux "x" is the offset within the TLS data for a given executable (ModuleSP in LLDB). For Apple OS variants, it is the file address of the data structure that contains a pthread key that can be used with pthread_getspecific() and the offset needed. This fix passes the "x" along to the thread: virtual lldb::addr_t lldb_private::Thread::GetThreadLocalData(const lldb::ModuleSP module, lldb::addr_t tls_file_addr); Then this is passed along to the DynamicLoader::GetThreadLocalData(): virtual lldb::addr_t lldb_private::DynamicLoader::GetThreadLocalData(const lldb::ModuleSP module, const lldb::ThreadSP thread, lldb::addr_t tls_file_addr); This allows each DynamicLoader plug-in do the right thing for the current OS. The DynamicLoaderMacOSXDYLD was modified to be able to grab the pthread key from the data structure that is in memory and call "void *pthread_getspecific(pthread_key_t key)" to get the value of the thread local storage and it caches it per thread since it never changes. I had to update the test case to access the thread local data before trying to print it as on Apple OS variants, thread locals are not available unless they have been accessed at least one by the current thread. I also added a new lldb::ValueType named "eValueTypeVariableThreadLocal" so that we can ask SBValue objects for their ValueType and be able to tell when we have a thread local variable. <rdar://problem/23308080> llvm-svn: 274366
* 64-bit LEB values are not always correctly decoded due to a casting issue, ↵Greg Clayton2016-06-281-1/+1
| | | | | | | | now they are. <rdar://problem/27002247> llvm-svn: 274037
OpenPOWER on IntegriCloud