summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Support RHEL 7 and similar systems that use architecture-specific Python lib ↵Todd Fiala2015-10-122-0/+38
| | | | | | | | dirs This change commits: http://reviews.llvm.org/D13625 llvm-svn: 250093
* Fix a misunderstanding of the ThreadPlan::OkayToDiscard flag in ↵Jim Ingham2015-10-122-18/+84
| | | | | | | | | | | | | InferiorCallPOSIX. It was set to true, but all plans run by RunThreadPlan need to have this set to false so they will return control to RunThreadPlan without consulting plans higher on the stack. Since this seems like a common error, I also modified RunThreadPlan to enforce this behavior. <rdar://problem/22543166> llvm-svn: 250084
* Return the right answer for ShouldStop for the RunToAddress plan. This isn'tJim Ingham2015-10-121-1/+1
| | | | | | | strictly necessary because RunToAddress is always used as a subsidiary plan, so it's ShouldStop seldom matters. But get it right anyway. llvm-svn: 250083
* X86: Change FTAG register size in FXSAVE structureAbhishek Aggarwal2015-10-124-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Changed from 16 bits to 8 bits for Intel Architecture -- FXSAVE structure now conforms with the layout of FXSAVE area specified by IA Architecture Software Developer Manual - Modified Linux and FreeBSD specific files to support this change -- MacOSX already uses 8 bits for ftag register - Modified TestRegisters.py and a.cpp: -- Change allows 8 bit comparison of ftag values -- Change resolves Bug 24733: Removed XFAIL for Clang as the test works and passes for Clang compiler as well -- Change provides a Generic/Better way of testing Bug 24457 and Bug 25050 by using 'int3' inline assembly in inferior Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, clayborg Subscribers: tfiala, emaste Differential Revision: http://reviews.llvm.org/D13587 llvm-svn: 250022
* 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 build broken by r249885Zachary Turner2015-10-092-3/+3
| | | | llvm-svn: 249900
* Port native Python-API to 3.xZachary Turner2015-10-093-99/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, liblldb is 95% of the way towards being able to work under both Python 2.x and Python 3.x. This should introduce no functional change for Python 2.x, but for Python 3.x there are some important changes. Primarily, these are: 1) PyString doesn't exist in Python 3. Everything is a PyUnicode. To account for this, PythonString now stores a PyBytes instead of a PyString. In Python 2, this is equivalent to a PyUnicode, and in Python 3, we do a conversion from PyUnicode to PyBytes and store the PyBytes. 2) PyInt doesn't exist in Python 3. Everything is a PyLong. To account for this, PythonInteger stores a PyLong instead of a PyInt. In Python 2.x, this requires doing a conversion to PyLong when creating a PythonInteger from a PyInt. In 3.x, there is no PyInt anyway, so we can assume everything is a PyLong. 3) PyFile_FromFile doesn't exist in Python 3. Instead there is a PyFile_FromFd. This is not addressed in this patch because it will require quite a large change to plumb fd's all the way through the system into the ScriptInterpreter. This is the only remaining piece of the puzzle to get LLDB supporting Python 3.x. Being able to run the test suite is not addressed in this patch. After the extension module can compile and you can enter an embedded 3.x interpreter, the test suite will be addressed in a followup. llvm-svn: 249886
* Don't blindly use C for eLanguageTypeUnknown when getting a scratch TypeSystem.Sean Callanan2015-10-091-1/+20
| | | | | | | | | | Instead check what languages are supported for expressions; use C if available, but otherwise pick one of the supported languages. This can be overridden using the target settings. <rdar://problem/22290878> llvm-svn: 249864
* Remove long-forgotten plugin virtuals.Bruce Mitchener2015-10-096-80/+0
| | | | | | | | | | | | | | | Summary: EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't implemented or used anywhere, so remove them from the Hexagon and POSIX Dynamic Loaders as well as the FreeBSD process. Reviewers: clayborg, labath, emaste Subscribers: lldb-commits, emaste Differential Revision: http://reviews.llvm.org/D13581 llvm-svn: 249840
* [LLDB] Fix display of value of a vector variables in watchpoint operationsMohit K. Bhakkad2015-10-091-3/+20
| | | | | | | | Reviewers: clayborg, zturner. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits. Differential Revision: http://reviews.llvm.org/D13202 llvm-svn: 249838
* [LLDB][MIPS] fix watchpoint searched on client side for same masked variablesMohit K. Bhakkad2015-10-091-0/+2
| | | | | | | | Reviewers: clayborg, jingham. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits. Differential Revision: http://reviews.llvm.org/D13548 llvm-svn: 249837
* Fix a crash, an UB and add some assert to dwo symbol file handlingTamas Berghammer2015-10-095-5/+26
| | | | llvm-svn: 249827
* Fix the windows build after r249747Tamas Berghammer2015-10-091-1/+3
| | | | llvm-svn: 249826
* 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
* Addressing warning due to rL249651Mohit K. Bhakkad2015-10-091-3/+0
| | | | llvm-svn: 249809
* Fix handling of LLDB_VERS_GENERATED_FILE.Bruce Mitchener2015-10-092-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is Darwin only. The symbol defined by ${LLDB_VERS_GENERATED_FILE} is used by source/lldb.cpp, so anything that uses lldb.cpp (which is in lldbBase) should also have the generated symbol. This means that the entire process can be centralized within source/CMakeLists.txt where lldbBase is constructed. Additionally, the custom command should have dependencies on the project file as well as the generation script so that if either changes, the version file is correctly re-generated and everything is re-linked appropriately. * cmake/LLDBDependencies.cmake: Remove everything related to the generated version file from here. * source/CMakeLists.txt: On Darwin, add the generated version file to the sources that make up lldbBase. Also, create a custom target and make lldbBase depend on it to re-generate the generated file as needed. * source/API/CMakeLists.txt: Don't need to build the generated version file here or use it to control linking against swig_wrapper. * tools/lldb-server/CMakeLists.txt: Likewise. Reviewers: dawn, sas, clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13552 llvm-svn: 249806
* Added support for enumerating the languages that actually support TypeSystemsSean Callanan2015-10-085-5/+95
| | | | | | | 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-086-138/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-085-143/+206
| | | | | | | | 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
* [cmake] Fix cmake build on OSX after r249434.Dawn Perchik2015-10-081-11/+0
| | | | | | | | Reviewed by: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13535 llvm-svn: 249684
* Fix the undefined symbol issue with go linking with autotools: build the ↵Sylvestre Ledru2015-10-081-0/+1
| | | | | | LanguageRuntime for Go + link against it llvm-svn: 249681
* Testcase and fix for bug 24074Ravitheja Addepally2015-10-0811-61/+534
| | | | | | | | | | | | | | | | | | | | 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
* [LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpointsMohit K. Bhakkad2015-10-081-18/+55
| | | | | | | | Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D13493 llvm-svn: 249651
* [DWARFASTParserClang] Strengthen incomplete type handling.Siva Chandra2015-10-071-47/+84
| | | | | | | | | | | | Summary: This change fixes pr24916. As associated test has been added. Reviewers: clayborg Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D13224 llvm-svn: 249629
* Fix the TestCppNsImport test case for DWARF. It was failing for DWARF in .o ↵Greg Clayton2015-10-072-0/+11
| | | | | | | | | | | files because SymbolFileDWARFDebugMap didn't implement the following function: void ParseDeclsForContext (lldb_private::CompilerDeclContext decl_ctx) override; Now it does and the test works. llvm-svn: 249626
* Decide on the expression language inside UserExpressionDawn Perchik2015-10-072-11/+13
| | | | | | | | | | | | | | When the target settings are consulted to decide the expression language is decided in CommandObjectExpression, this doesn't help if you're running SBFrame::EvaluateExpression(). Moving the logic into UserExpression fixes this. Based on patch from scallanan@apple.com Reviewed by: dawn Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13267 llvm-svn: 249624
* [lldb-mi] Fix evaluation of strings containing characters from non-ascii rangeDawn Perchik2015-10-071-2/+10
| | | | | | | | | | | | | | | | If a string contained characters outside the ASCII range, lldb-mi would print them as hexadecimal codes. This patch fixes this behaviour by converting to UTF-8 instead, by having lldb-mi use registered type summary providers, when they are available. This patch also fixes incorrect evaluation of some composite types, like std::string, by having them use a type registered type summary provider. Based on patch from evgeny.leviant@gmail.com Reviewed by: ki.stfu, granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13058 llvm-svn: 249597
* This is the work I was building up to with my patches yesterdayEnrico Granata2015-10-0710-95/+436
| | | | | | | | | Introduce the notion of Language-based formatter prefix/suffix This is meant for languages that share certain data types but present them in syntatically different ways, such that LLDB can now have language-based awareness of which of the syntax variations it has to present to the user when formatting those values This is goodness for new languages and interoperability, but is NFC for existing languages. As such, existing tests cover this llvm-svn: 249587
* Reduce header inclusion in Expression.Bruce Mitchener2015-10-075-4/+3
| | | | | | | | | | Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13333 llvm-svn: 249570
* commands: Use override instead of virtual.Bruce Mitchener2015-10-0718-1216/+1029
| | | | | | | | | | | | | | | | | Summary: This removes all uses of virtual on functions where override could be used, including on destructors. It also adds override where virtual was previously missing. Reviewers: clayborg, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13503 llvm-svn: 249564
* Remove unused virtuals from ABISysV_ppc*Bruce Mitchener2015-10-072-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The StackUsesFrames and FunctionCallsChangeCFA virtual functions aren't used anywhere and aren't overridden by anything. They were introduced when the ABISysV_ppc* code was added and weren't used at the time. The review for the commit that added them can be found at http://reviews.llvm.org/D5988 The commit comment notes that backtraces don't yet work: Backtraces don't work. This is due to PowerPC ABI using a backchain pointer in memory, instead of a dedicated frame pointer register for the backchain. So there is a possibility these were added with the intent of using them in the future. Reviewers: clayborg, jingham, jhibbits, emaste Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13506 llvm-svn: 249563
* Resumbit "Fix race condition during process detach"Pavel Labath2015-10-071-40/+40
| | | | | | | This is a resubmission of r248371. It also incorporates the process event hijack patch by Kyrill Lapshin in D12968. llvm-svn: 249554
* Fix minor typos in comments.Bruce Mitchener2015-10-073-4/+4
| | | | llvm-svn: 249533
* [Go] Fix inconsistent-missing-override warnings.Bruce Mitchener2015-10-071-4/+4
| | | | llvm-svn: 249531
* Route the preferred-display-language mechanism to the ValueObjectPrinter and ↵Enrico Granata2015-10-077-3/+59
| | | | | | actually fill in a few gaps for dynamic and synthetic values to be able to adopt this in useful ways llvm-svn: 249507
* Enable the StringPrinter to have prefixes that are strings instead of just a ↵Enrico Granata2015-10-074-19/+26
| | | | | | single character; and also introduce a comparable suffix mechanism llvm-svn: 249506
* Introduce a variant of GetSummaryAsCString() that takes a LanguageType ↵Enrico Granata2015-10-073-18/+29
| | | | | | | | 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
* Fix Android build.Chaoren Lin2015-10-071-6/+0
| | | | llvm-svn: 249486
* Simple readline functionality for interactive python on linux.Ryan Brown2015-10-061-5/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D13268 llvm-svn: 249478
* Add missing GoLanguageRuntime files.Ryan Brown2015-10-064-0/+350
| | | | llvm-svn: 249459
* Create GoLanguageRuntime.Ryan Brown2015-10-063-0/+6
| | | | | | GoLanguageRuntime supports finding the runtime type for Go interfaces. llvm-svn: 249456
* Remove GetShortPluginName.Bruce Mitchener2015-10-065-28/+0
| | | | | | | | | | | | Summary: This was deprecated and removed. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13463 llvm-svn: 249452
* Fix Darwin build of lldb-server.Stephane Sezer2015-10-061-0/+11
| | | | | | | | | | | | Summary: We were missing the symbol for the version number. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13271 llvm-svn: 249434
* Create a logging category that is specific to data formatters activityEnrico Granata2015-10-065-12/+15
| | | | llvm-svn: 249433
* Fix virtual/override warnings in new MIPS code.Bruce Mitchener2015-10-061-17/+17
| | | | | | | | | | Reviewers: bhushan, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13462 llvm-svn: 249405
* Fix segmentation fault in lldb_private::Symbols::LocateExecutableSymbolFile()Bruce Mitchener2015-10-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When `module_spec.GetFileSpec().GetDirectory().AsCString()` returned a `nullptr` this line caused a segmentation fault: `std::string module_directory = module_spec.GetFileSpec().GetDirectory().AsCString()` Some context: I was remote debugging an executable built with Clang in an Ubuntu VM on my Windows machine using lldb-mi. I copied the executable and nothing else from the Ubuntu VM to the Windows machine. Then started lldb-server in the Ubuntu VM: ``` ./bin/lldb-server gdbserver *:8888 -- /home/enlight/Projects/dbgmits/build/Debug/data_tests_target ``` And ran `lldb-mi --interpreter` on Windows with the following commands: ``` -file-exec-and-symbols C:\Projects\data_tests_target -target-select remote 192.168.56.101:8888 -exec-continue ``` After which the segmentation fault occurred at the aforementioned line. Inside this method `module_spec.GetFileSpec()` returns an empty `FileSpec` (no dir, no filename), while `module_spec.GetSymbolFileSpec().GetFilename()` returns `"libc-2.19.so"`. Patch thanks to Vadim Macagon. Reviewers: brucem, zturner, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13201 llvm-svn: 249387
* [MIPS] Emulate microMIPS instructionsBhushan D. Attarde2015-10-063-20/+766
| | | | | | | | | | | | | | | | | | | | | | SUMMARY: This patch includes: 1. Emulation of prologue/epilogue and branch instructions for microMIPS. 2. Setting up alternate disassembler (to be used for microMIPS). So there will be two disassembler instances, one for microMIPS and other for MIPS. Appropriate disassembler will be used based on the address class of instruction address. 3. Some of the branch instructions does not have fixed sized delay slot, that means delay slot instruction can be of 2-byte or 4-byte. For this "m_next_inst_size" has been introduced which stores the size of next instruction (i.e size of delay slot instruction in case of branch). This can be used wherever the size of next instruction is required. 4. A minor change to use mips32 register names instead of mips64 names. Reviewers: clayborg, tberghammer Subscribers: mohit.bhakkad, sagar, jaydeep, nitesh.jain, lldb-commits Differential Revision: http://reviews.llvm.org/D13282 llvm-svn: 249381
* RenderScript command for printing allocation information Ewan Crawford2015-10-062-19/+637
| | | | | | | | | | | | | | | | This patch adds a new command 'language renderscript allocation list' for printing the details of all loaded RS allocations. In order to work out this information lldb JITs the runtime for the data it wants. This has a penalty of a couple seconds latency, so is only done once for each allocation and the results cached. If the user later wants to recalculate this information however, they can force lldb to do so with the --refresh flag. Reviewed by: jingham, clayborg Subscribers: lldb-commits, ADodds, domipheus, dean, tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D13247 llvm-svn: 249380
* Bug 25050: X87 FPU Special Purpose RegistersAbhishek Aggarwal2015-10-062-4/+22
| | | | | | | | | | | | | | | | | Summary: - For x86_64-FreeBSD Platform: -- LLDB now provides correct values of X87 FPU Special Purpose Registers like fstat, ftag, fctrl etc.. Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: emaste, mikesart, clayborg Subscribers: emaste Differential Revision: http://reviews.llvm.org/D13434 llvm-svn: 249379
* [LLDB][MIPS] Fix hit_count for mips watchpointsMohit K. Bhakkad2015-10-061-1/+4
| | | | | | | | Reviewers: clayborg, jingham. Subscribers: jaydeep, bhushan, dsanders, sagar, nitesh.jain, zturner, jasonmolenda, lldb-commits. Differential Revision: http://reviews.llvm.org/D13241 llvm-svn: 249377
OpenPOWER on IntegriCloud