summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Move the "run" alias from process launch --shell to process launch ↵Enrico Granata2015-09-221-0/+8
| | | | | | | | | | --shell-expand-args when building on OS X The argdumper-based launching is more friendly to System Integrity Protection, and will work on older releases of OS X as well Leave non-Apple builds alone llvm-svn: 248338
* On second thought, amend the previous patch to pass itself the ValueObject& ↵Enrico Granata2015-09-227-12/+16
| | | | | | for the static value instead of just its type llvm-svn: 248316
* Move the logic to post-process dynamic types for ValueObject purposes from ↵Enrico Granata2015-09-227-44/+97
| | | | | | | | | | | | the ValueObjects to the LanguageRuntime plugins This is meant to cover cases such as the obvious Base *base = new Derived(); where GetDynamicTypeAndAddress(base) would return the type "Derived", not "Derived *" llvm-svn: 248315
* Rename clang_type_t to opaque_compiler_type_t.Bruce Mitchener2015-09-228-17/+17
| | | | | | | | | | | | | | Summary: This is no longer related to Clang and is just an opaque pointer to data for a compiler type. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13039 llvm-svn: 248288
* Fix register names in EmulateInstructionMIPS.cppTamas Berghammer2015-09-221-78/+78
| | | | llvm-svn: 248281
* Do not use pthread_setname_np() if we don't have GLIBC or Android.Vasileios Kalintiris2015-09-221-0/+5
| | | | | | | | | | | | | | | Summary: pthread_setname_np() is a nonstandard GNU extension and isn't available in every C library. Check before it's usage that GLIBC is available or that we are targeting Android. Reviewers: clayborg, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13019 llvm-svn: 248280
* [MIPS32] Emulate MSA instructions for MIPS32Sagar Thakur2015-09-222-108/+386
| | | | | | | | | This patch adds MSA branch instruction emulation for MIPS32. Reviewers: tberghammer, jaydeep Subscribers: mohit.bhakkad, bhushan, nitesh.jain Differential: http://reviews.llvm.org/D12898 llvm-svn: 248277
* RenderScript lookup bug fixEwan Crawford2015-09-221-3/+2
| | | | | | | | | | After the std::move operation the unique pointer is null. So this statement always returns a null pointer. Also remove unnecessary call to Module::ParseAllDebugSymbols(), which spews errors due to how it incorrectly tries to parse DWARF DIE types. llvm-svn: 248274
* Remove unused header <execinfo.h>.Vasileios Kalintiris2015-09-221-3/+0
| | | | llvm-svn: 248268
* Check for GLIBC before including execinfo.hVasileios Kalintiris2015-09-221-1/+1
| | | | | | | | | | Reviewers: ovyalov, clayborg Subscribers: tberghammer, danalbert, llvm-commits, srhines Differential Revision: http://reviews.llvm.org/D13016 llvm-svn: 248256
* Use fcntl.h to retrieve the O_CREAT and O_RDWR constants.Vasileios Kalintiris2015-09-221-1/+1
| | | | | | | | | | | | | | | Summary: Normally, these macros are defined in fnctl.h. However, GLIBC exposes their definition through <sys/file.h> too. This change allows us to compile LLDB with non-GLIBC C libraries. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13022 llvm-svn: 248255
* [LLDB][MIPS] microMIPS breakpoints, disassembly and compressed addressesJaydeep Patil2015-09-226-7/+135
| | | | | | | | | | | | SUMMARY: This patch detects microMIPS symbols, sets breakpoints using un-compressed address and display disassembly in mixed mode for microMIPS applications (running on bare-iron targets). Reviewers: clayborg Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D12079 llvm-svn: 248248
* Fix typos.Bruce Mitchener2015-09-222-2/+2
| | | | | | | | | | | | Summary: Another round of minor typo fixes. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13026 llvm-svn: 248243
* Further reduction of Clang-related header inclusion.Bruce Mitchener2015-09-2120-17/+9
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13018 llvm-svn: 248176
* Rename GetChildClangTypeAtIndex to GetChildCompilerTypeAtIndexBruce Mitchener2015-09-215-175/+175
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13020 llvm-svn: 248175
* Groundwork for better tracking of renderscript allocations and scriptsEwan Crawford2015-09-212-46/+237
| | | | | | | | | | | | This patch adds some of the groundwork required for tracking the lifetime of scripts and allocations and collecting data associated with them during execution. Committed on behalf of Aidan Dodds. Authored by: ADodds Reviewed by: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12936 llvm-svn: 248149
* Fix MSVC warings in DWARFExpression.cppTamas Berghammer2015-09-211-1/+2
| | | | llvm-svn: 248148
* Use ClangASTContext for compile units with language eLanguageTypeMipsAssemblerTamas Berghammer2015-09-211-0/+1
| | | | | | | | | Both GNU AS and LLVM emits language type DW_LANG_Mips_Assembler for all assembly code. Differential revision: http://reviews.llvm.org/D12962 llvm-svn: 248146
* Moved ResolveSymbolicLink() to the FileSystem where it belongs, thanksSean Callanan2015-09-184-27/+29
| | | | | | | | zturner! http://reviews.llvm.org/D12984 llvm-svn: 248055
* Added support for resolving symbolic links to FileSpec.Sean Callanan2015-09-182-1/+30
| | | | | | | | | | | | | | | We use the symbolic link to resolver to find the target of the LLDB shlib symlink if there is a symlink. This allows us to find shlib-relative resources even when running under the testsuite, where _lldb.so is a symlink in the Python resource directory. Also changed a comment to be slightly more clear about what resolve_path in the constructor for FileSpec means, since if we were actually using realpath() this code wouldn't have been necessary. http://reviews.llvm.org/D12984 llvm-svn: 248048
* Remove unused modules from module cache.Oleksiy Vyalov2015-09-183-20/+147
| | | | | | http://reviews.llvm.org/D12971 llvm-svn: 248017
* Reduce inclusion of clang headers.Bruce Mitchener2015-09-1815-74/+0
| | | | | | | | | | | | | | Summary: With the recent changes to separate clang from the core structures of LLDB, many inclusions of clang headers can be removed. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12954 llvm-svn: 248004
* Differential Revision: http://reviews.llvm.org/D12966Aidan Dodds2015-09-182-89/+234
| | | | | | On behalf of Dean De Leo llvm-svn: 248003
* [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfoJaydeep Patil2015-09-181-0/+33
| | | | | | | | | | | SUMMARY: Using response.IsUnsupportedResponse instead of !response.IsNormalResponse(). Reviewers: clayborg, labath Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D12876 llvm-svn: 247968
* Make LanguageRuntime::GetDynamicTypeAndAddress return a ValueTypeEnrico Granata2015-09-1711-18/+30
| | | | | | | | | For C++ and ObjC, dynamic values are always (at least somewhat) pointer-like in nature, so a ValueType of scalar is actually good enough that it could originally be hardcoded as the right choice Other languages, might have broader notions of things that are dynamic (e.g. a language where a value type can be dynamic). In those cases, it might actually be the case that a dynamic value is a pointer-to the data, or even a host address if dynamic expression results entirely in host space are being talked about This patch enables the language runtime to make that decision, and makes ValueObjectDynamicValue comply with it llvm-svn: 247957
* TypeSystem is now a plugin interface and removed any "ClangASTContext ↵Greg Clayton2015-09-1730-279/+621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | &Class::GetClangASTContext()" functions. This cleans up type systems to be more pluggable. Prior to this we had issues: - Module, SymbolFile, and many others has "ClangASTContext &GetClangASTContext()" functions. All have been switched over to use "TypeSystem *GetTypeSystemForLanguage()" - Cleaned up any places that were using the GetClangASTContext() functions to use TypeSystem - Cleaned up Module so that it no longer has dedicated type system member variables: lldb::ClangASTContextUP m_ast; ///< The Clang AST context for this module. lldb::GoASTContextUP m_go_ast; ///< The Go AST context for this module. Now we have a type system map: typedef std::map<lldb::LanguageType, lldb::TypeSystemSP> TypeSystemMap; TypeSystemMap m_type_system_map; ///< A map of any type systems associated with this module - Many places in code were using ClangASTContext static functions to place with CompilerType objects and add modifiers (const, volatile, restrict) and to make typedefs, L and R value references and more. These have been made into CompilerType functions that are abstract: class CompilerType { ... //---------------------------------------------------------------------- // Return a new CompilerType that is a L value reference to this type if // this type is valid and the type system supports L value references, // else return an invalid type. //---------------------------------------------------------------------- CompilerType GetLValueReferenceType () const; //---------------------------------------------------------------------- // Return a new CompilerType that is a R value reference to this type if // this type is valid and the type system supports R value references, // else return an invalid type. //---------------------------------------------------------------------- CompilerType GetRValueReferenceType () const; //---------------------------------------------------------------------- // Return a new CompilerType adds a const modifier to this type if // this type is valid and the type system supports const modifiers, // else return an invalid type. //---------------------------------------------------------------------- CompilerType AddConstModifier () const; //---------------------------------------------------------------------- // Return a new CompilerType adds a volatile modifier to this type if // this type is valid and the type system supports volatile modifiers, // else return an invalid type. //---------------------------------------------------------------------- CompilerType AddVolatileModifier () const; //---------------------------------------------------------------------- // Return a new CompilerType adds a restrict modifier to this type if // this type is valid and the type system supports restrict modifiers, // else return an invalid type. //---------------------------------------------------------------------- CompilerType AddRestrictModifier () const; //---------------------------------------------------------------------- // Create a typedef to this type using "name" as the name of the typedef // this type is valid and the type system supports typedefs, else return // an invalid type. //---------------------------------------------------------------------- CompilerType CreateTypedef (const char *name, const CompilerDeclContext &decl_ctx) const; }; Other changes include: - Removed "CompilerType TypeSystem::GetIntTypeFromBitSize(...)" and CompilerType TypeSystem::GetFloatTypeFromBitSize(...) and replaced it with "CompilerType TypeSystem::GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size);" - Fixed code in Type.h to not request the full type for a type for no good reason, just request the forward type and let the type expand as needed llvm-svn: 247953
* Get the process ID from a minidump.Adrian McCarthy2015-09-172-2/+23
| | | | llvm-svn: 247939
* Fix a race condition when terminating inferiors on Windows.Zachary Turner2015-09-172-0/+16
| | | | | | | | | | | | | If a breakpoint was hit in the inferior after shutdown had started but before it was complete, it would cause an unclean terminate of the inferior, leading to various problems the most visible of which is that handles to the inferior executable would remain locked, and the test suite would fail to run subsequent tests because it could not recompile the inferior. This fixes a major source of flakiness in the test suite. llvm-svn: 247929
* Fix caching for clang::Decl in DWARFASTParserClangPaul Herman2015-09-171-4/+22
| | | | | | | | | | Reviewers: sivachandra, chaoren, clayborg, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12942 llvm-svn: 247923
* DataFormatters: Rename clang_type to compiler_type.Bruce Mitchener2015-09-173-21/+21
| | | | | | | | | | Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12930 llvm-svn: 247915
* Removed a needless cast to ClangExpressionVariable.Sean Callanan2015-09-171-1/+1
| | | | llvm-svn: 247910
* Fix LLDB RSP client to decode '$O' packets incorrectlyDawn Perchik2015-09-172-5/+18
| | | | | | | | | | | | Character with ASCII code 0 is incorrectly treated by LLDB as the end of RSP packet. The left of the debugger server output is silently ignored. Patch from evgeny.leviant@gmail.com Reviewed by: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12523 llvm-svn: 247908
* Add the ability for formatter categories to be bound to one or more languagesEnrico Granata2015-09-176-32/+314
| | | | | | What that does is it restricts formatters in those categories to only match to types coming from "compatible" source languages llvm-svn: 247872
* Add an OperatingSystem plugin to support goroutinesRyan Brown2015-09-1618-11/+744
| | | | | | | | | | The Go runtime schedules user level threads (goroutines) across real threads. This adds an OS plugin to create memory threads for goroutines. It supports the 1.4 and 1.5 go runtime. Differential Revision: http://reviews.llvm.org/D5871 llvm-svn: 247852
* Fix log disable command in ProcessWindowsLog.Zachary Turner2015-09-161-12/+18
| | | | | | | | | | | The implications of this bug where that "log disable windows" would not actually disable the log, and worse it would lock the file handle making it impossible to delete the file until lldb was shut down. This was then causing the test suite to fail, because the test suite tries to delete log files in certain situations. llvm-svn: 247841
* Add using directives to the clang::DeclContext and fix decls for variables ↵Paul Herman2015-09-168-34/+84
| | | | | | | | | | | | | | inside namespaces Summary: Supports the parsing of the "using namespace XXX" and "using XXX::XXX" directives. Added ambiguity errors when it two decls with the same name are encountered (see comments in TestCppNsImport). Fixes using directives being duplicated for anonymous namespaces. Fixes GetDeclForUID for specification DIEs. Reviewers: sivachandra, chaoren, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12897 llvm-svn: 247836
* Move hardcoded formatters from the FormatManager to the Language pluginsEnrico Granata2015-09-165-98/+261
| | | | llvm-svn: 247831
* Silence compiler warnings about unhandled switch cases.Zachary Turner2015-09-161-78/+5
| | | | llvm-svn: 247826
* Add newline at end of file to avoid compiler warning.Greg Clayton2015-09-161-1/+1
| | | | llvm-svn: 247823
* Add plugin.jit-loader.gdb.enable-jit-breakpoint property to make JIT loader ↵Oleksiy Vyalov2015-09-163-94/+174
| | | | | | | | breakpoint optional. http://reviews.llvm.org/D12890 llvm-svn: 247821
* Add support for the DWARFLocationList used by split-dwarfTamas Berghammer2015-09-1612-577/+349
| | | | | | | | | Split-dwarf uses a different header format to specify the address range for the elements of the location lists. Differential revision: http://reviews.llvm.org/D12880 llvm-svn: 247789
* Fix prologue end handling when code compiled by gccTamas Berghammer2015-09-161-0/+10
| | | | | | | | | | | | | | | | | GCC don't use the is_prologue_end flag to mark the first instruction after the prologue. Instead of it it is issuing a line table entry for the first instruction of the prologue and one for the first instruction after the prologue. If the size of the prologue is 0 instruction then the 2 line entry will have the same file address. We remove these duplicates entries as they are violating the dwarf spec and can cause confusion in the debugger. To prevent the lost of information about the end of prologue we should set the prologue end flag for the line entries what are representing more then 1 entry. Differential revision: http://reviews.llvm.org/D12757 llvm-svn: 247788
* Revert "[LLDB][MIPS] Debug bare-iron targets lacking support for qC ↵Pavel Labath2015-09-161-33/+0
| | | | | | | | /qfThreadInfo" This reverts commit r247773, because it breaks remote debugging support for lldb-server. llvm-svn: 247783
* Add names to RenderScript kernel breakpoints.Ewan Crawford2015-09-161-2/+7
| | | | | | | Use Breakpoint::AddName to mark all RenderScript kernel breakpoints with the name 'RenderScriptKernel'. Also update logging channels to include LIBLLDB_LOG_BREAKPOINT where appropriate. llvm-svn: 247782
* [LLDB][MIPS] Debug bare-iron targets lacking support for qC /qfThreadInfoJaydeep Patil2015-09-161-0/+33
| | | | | | | | | | | | | | SUMMARY: Refer to http://lists.llvm.org/pipermail/lldb-dev/2015-August/008024.html for discussion on this topic. Bare-iron target like YAMON gdb-stub does not support qProcessInfo, qC, qfThreadInfo, Hg and Hc packets. Reply from ? packet is as simple as S05. There is no packet which gives us process or threads information. In such cases, assume pid=tid=1. Reviewers: clayborg Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D12876 llvm-svn: 247773
* Fix off-by-one size check.Chaoren Lin2015-09-161-1/+1
| | | | llvm-svn: 247766
* Return false, not 0, for bools.Bruce Mitchener2015-09-162-2/+2
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12873 llvm-svn: 247755
* Search variables based on clang::DeclContext and clang::Decl treePaul Herman2015-09-1513-27/+472
| | | | | | | | | | | | Summary: SymbolFileDWARF now creates VarDecl and BlockDecl and adds them to the Decl tree. Then, in ClangExpressionDeclMap it uses the Decl tree to search for a variable. This fixes lots of variable scoping problems. Reviewers: sivachandra, chaoren, spyffe, clayborg Subscribers: tberghammer, jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D12658 llvm-svn: 247746
* Clean up register naming conventions inside lldb. Jason Molenda2015-09-1544-4361/+3154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "gcc" register numbers are now correctly referred to as "ehframe" register numbers. In almost all cases, ehframe and dwarf register numbers are identical (the one exception is i386 darwin where ehframe regnums were incorrect). The old "gdb" register numbers, which I incorrectly thought were stabs register numbers, are now referred to as "Process Plugin" register numbers. This is the register numbering scheme that the remote process controller stub (lldb-server, gdbserver, core file support, kdp server, remote jtag devices, etc) uses to refer to the registers. The process plugin register numbers may not be contiguous - there are remote jtag devices that have gaps in their register numbering schemes. I removed all of the enums for "gdb" register numbers that we had in lldb - these were meaningless - and I put LLDB_INVALID_REGNUM in all of the register tables for the Process Plugin regnum slot. This change is almost entirely mechnical; the one actual change in here is to ProcessGDBRemote.cpp's ParseRegisters() which parses the qXfer:features:read:target.xml response. As it parses register definitions from the xml, it will assign sequential numbers as the eRegisterKindLLDB numbers (the lldb register numberings must be sequential, without any gaps) and if the xml file specifies register numbers, those will be used as the eRegisterKindProcessPlugin register numbers (and those may have gaps). A J-Link jtag device's target.xml does contain a gap in register numbers, and it only specifies the register numbers for the registers after that gap. The device supports many different ARM boards and probably selects different part of its register file as appropriate. http://reviews.llvm.org/D12791 <rdar://problem/22623262> llvm-svn: 247741
* Teach the ObjC data formatters to use the correct language when printing stringsEnrico Granata2015-09-151-0/+7
| | | | llvm-svn: 247727
OpenPOWER on IntegriCloud