summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix TestArrayTypes on Windows.Zachary Turner2015-08-181-0/+2
| | | | | | | | | | Whether or not frames print their tid in hex or decimal is apparently hardcoded to depend on the operating system. For now a comment was added that this should be changed to a more sane check (for example a setting), and the OS check is updated to do the right thing for Windows. llvm-svn: 245371
* [ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclarationSiva Chandra2015-08-182-0/+18
| | | | | | | | | | | | | | Summary: Returns the declaration of the parent (non-synthetic or static) value. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12092 llvm-svn: 245319
* [LLGS] Avoid misrepresenting log lines as inferior outputPavel Labath2015-08-181-1/+1
| | | | | | | | | | | | | | | | Summary: in case we are logging to stdout, any log lines from the forked child can be misconstrued to be inferior output. To avoid this, we disable all logging immediately after forking. I also fix the implementatoion of DisableAllLogChannels, which was a no-op before this commit. Reviewers: clayborg, ovyalov Subscribers: dean, lldb-commits Differential Revision: http://reviews.llvm.org/D12083 llvm-svn: 245272
* Revert "[LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue"Pavel Labath2015-08-173-1790/+1296
| | | | | | Reverting as this commit causes an infinite loop. llvm-svn: 245222
* [LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValueSagar Thakur2015-08-173-1296/+1790
| | | | | | | | | Eliminated ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and use llvm::APInt and llvm::APFloat for all integer and floating point types. Also used Scalar in RegisterValue.cpp Reviewers: jaydeep, clayborg, jasonmolenda, ovyalov, emaste Subscribers: tberghammer, ovyalov, emaste, mohit.bhakkad, nitesh.jain, bhushan Differential: http://reviews.llvm.org/D10919 llvm-svn: 245216
* A messy bit of cleanup: Move towards more descriptive namesJason Molenda2015-08-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for eh_frame and stabs register numberings. This is not complete but it's a step in the right direction. It's almost entirely mechanical. lldb informally uses "gcc register numbering" to mean eh_frame. Why? Probably because there's a notorious bug with gcc on i386 darwin where the register numbers in eh_frame were incorrect. In all other cases, eh_frame register numbering is identical to dwarf. lldb informally uses "gdb register numbering" to mean stabs. There are no official definitions of stabs register numbers for different architectures, so the implementations of gdb and gcc are the de facto reference source. There were some incorrect uses of these register number types in lldb already. I fixed the ones that I saw as I made this change. This commit changes all references to "gcc" and "gdb" register numbers in lldb to "eh_frame" and "stabs" to make it clear what is actually being represented. lldb cannot parse the stabs debug format, and given that no one is using stabs any more, it is unlikely that it ever will. A more comprehensive cleanup would remove the stabs register numbers altogether - it's unnecessary cruft / complication to all of our register structures. In ProcessGDBRemote, when we get register definitions from the gdb-remote stub, we expect to see "gcc:" (qRegisterInfo) or "gcc_regnum" (qXfer:features:read: packet to get xml payload). This patch changes ProcessGDBRemote to also accept "ehframe:" and "ehframe_regnum" from these remotes. I did not change GDBRemoteCommunicationServerLLGS or debugserver to send these new packets. I don't know what kind of interoperability constraints we might be working under. At some point in the future we should transition to using the more descriptive names. Throughout lldb we're still using enum names like "gcc_r0" and "gdb_r0", for eh_frame and stabs register numberings. These should be cleaned up eventually too. The sources link cleanly on macosx native with xcode build. I don't think we'll see problems on other platforms but please let me know if I broke anyone. llvm-svn: 245141
* Move all clang type system DWARF type parsing into ClangASTContext.cpp.Greg Clayton2015-08-141-0/+11
| | | | | | Another step towards isolating all language/AST specific code into the files to further abstract specific implementations of parsing types for a given language. llvm-svn: 245090
* ClangASTType is now CompilerType.Greg Clayton2015-08-1113-92/+92
| | | | | | This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc). llvm-svn: 244689
* First step in getting LLDB ready to support multiple different type systems.Greg Clayton2015-08-113-5/+5
| | | | | | | | This is the work done by Ryan Brown from http://reviews.llvm.org/D8712 that makes a TypeSystem class and abstracts types to be able to use a type system. All tests pass on MacOSX and passed on linux the last time this was submitted. llvm-svn: 244679
* Revert r244308 since it's introducing test regressions on Linux:Oleksiy Vyalov2015-08-103-2485/+1303
| | | | | | | | - TestLldbGdbServer.py both clang & gcc, i386 and x86_64 - TestConstVariables.py gcc, i386 and x86_64 - 112 failures clang, i386 llvm-svn: 244514
* [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 ↵Sagar Thakur2015-08-073-1303/+2485
| | | | | | | | | | | | | | | | | | mode support This change : - Fixes offsets of all register sets for Mips. - Adds MSA register set and FRE=1 mode support for FP register set. - Separates lldb register numbers and register infos of freebsd/mips64 from linux/mips64. - Re-orders the register numbers of all kinds for mips to be consistent with freebsd order of register numbers. - Eliminates ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and uses llvm::APInt and llvm::APFloat for all integer and floating point types. Reviewers : emaste, jaydeep, clayborg Subscribers : emaste, mohit.bhakkad, nitesh.jain, bhushan Differential : http://reviews.llvm.org/D10919 llvm-svn: 244308
* Allow ValueObject::Dereference to dereference references.Chaoren Lin2015-07-311-6/+6
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11667 llvm-svn: 243716
* Convert the ScriptInterpreter system to a plugin-based one.Zachary Turner2015-07-301-0/+104
| | | | | | | | | | | | | | | | | | | | | | | Previously embedded interpreters were handled as ad-hoc source files compiled into source/Interpreter. This made it hard to disable a specific interpreter, or to add support for other interpreters and allow the developer to choose which interpreter(s) were enabled for a particular build. This patch converts script interpreters over to a plugin-based system. Script interpreters now live in source/Plugins/ScriptInterpreter, and the canonical LLDB interpreter, ScriptInterpreterPython, is moved there as well. Any new code interfacing with the Python C API must live in this location from here on out. Additionally, generic code should never need to reference or make assumptions about the presence of a specific interpreter going forward. Differential Revision: http://reviews.llvm.org/D11431 Reviewed By: Greg Clayton llvm-svn: 243681
* Fix issues with separate symbolfile handlingTamas Berghammer2015-07-301-0/+3
| | | | | | Differential revision: http://reviews.llvm.org/D11595 llvm-svn: 243637
* Make DWARF at_comp_dir symbolic links configurable via ↵Oleksiy Vyalov2015-07-291-3/+56
| | | | | | | | plugin.symbol-file.dwarf.comp-dir-symlink-paths setting. http://reviews.llvm.org/D11586 llvm-svn: 243580
* Centralize where we update the source file contents in ↵Greg Clayton2015-07-291-10/+10
| | | | | | | | | | | | | | | SourceManager::GetFile() in case APIs are called that don't update the source. The following functions were the only functions that updates the source file: SourceManager::File::DisplaySourceLines() SourceManager::File::FindLinesMatchingRegex() But there we API calls that were using the SourceManager::File and asking it questions, like "is line 12 valid" and that might respond incorrectly if the source file had been updated. <rdar://problem/21269402> llvm-svn: 243551
* First part of an attempt to indicate to the user when they are Jason Molenda2015-07-292-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debugging optimized code. Adds new methods on Function/SBFunction to query whether a given function is optimized. Adds a new function.is-optimized format entity and changes the default frame-format to append "[opt]" if the function was built with optimization. The only indication that a binary was built with optimization that we have right now is the presence of the DW_AT_APPLE_optimized attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit. The absence of this flag may mean that the compile_unit was not compiled with optimization, or it may mean that the producer does not generate this attribute. Currently this only works for dSYM debugging. When we create the CompileUnit with dwarf-in-.o-file debugging we don't have the attribute value yet so it's not set. I need to find the flag value when we do start to read the .o file DWARF and set the CompileUnit's status at that point - but haven't done it yet. I'm also going to add a mechanism for issuing warnings to users such that they're only issued once in a debug session and there is away for users to suppress these warnings altogether via .lldbinit file settings. But I want to get this changeset committed now that it's at a useful state. <rdar://problem/19281172> llvm-svn: 243508
* Fix warnings detected by -Wpessimizing-movePavel Labath2015-07-283-11/+10
| | | | | | | | patch by Eugene Zelenko Differential Revision: http://reviews.llvm.org/D11429 llvm-svn: 243399
* Second attempt at the fix for the recursion in ↵Enrico Granata2015-07-281-4/+13
| | | | | | | | ValueObjectChild::CanUpdateWithInvalidExecutionContext() This one should prevent the previous issues, and be the one true fix for rdar://21949558 llvm-svn: 243367
* Use double-checked locking to avoid locking the Module mutex if we don't ↵Greg Clayton2015-07-241-62/+74
| | | | | | | | need to. This avoid a deadlock we were seeing in Xcode. <rdar://problem/21512067> llvm-svn: 243180
* Revert "Fix an issue where LLDB would run out of stack space ..."Pavel Labath2015-07-241-6/+4
| | | | | | | | | | This commit introduced an infinite recursion in ValueObjectChild::CanUpdateWithInvalidExecutionContext (because FollowParentChain also considers the current object), which broke nearly all the tests. Ignoring the current object removes the recursion, but two tests still time out (TestDataFormatterLibcxxList.py and TestValueObjectRecursion.py) for some reason. Reverting for now. llvm-svn: 243102
* Improve C++ function name handling and step-in avoid regerxp handlingTamas Berghammer2015-07-241-3/+4
| | | | | | | | | | | | | | | | | | | If the function is a template then the return type is part of the function name. This CL fixes the parsing of these function names in the case when the return type contains ':'. The name of free functions in C++ don't have context part. Fix the logic geting the function name without arguments out from a full function name to handle this case. Change the handling of step-in-avoid-regexp to match the value against the function name without it's arguments and return value. This is required because the default regex ("^std::") would match any template function returning an std object. Fifferential revision: http://reviews.llvm.org/D11461 llvm-svn: 243099
* Fix an issue where LLDB would run out of stack space trying to decide if a ↵Enrico Granata2015-07-241-4/+6
| | | | | | | | | | | deeply nested child can be updated in the face of an invalid execution context The issue is that a child can't really ask the root object, since this decision could actually hinge on whether a dynamic and/or synthetic value is present To do this, make values vote lazily for whether they are willing to allow this, so that we can navigate up the chain without recursively invoking ourselves Tentative fix for rdar://21949558 llvm-svn: 243077
* Set the live address on child const results in a way that is more ↵Enrico Granata2015-07-221-3/+2
| | | | | | maintainable for sustained merges with our internal branches llvm-svn: 242944
* Make stream::operator<< take "const" void *Pavel Labath2015-07-221-2/+2
| | | | | | | | | | | | | | Summary: This enables us to avoid casts to "void *" in some cases and avoids a couple of "casts off const qualifiers" warnings. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11388 llvm-svn: 242874
* Fix typos.Bruce Mitchener2015-07-223-5/+5
| | | | | | | | | | | | Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
* Add support for specifying a language to use when parsing breakpoints.Dawn Perchik2015-07-212-2/+14
| | | | | | | | | | | | | | | | | | | | Target and breakpoints options were added: breakpoint set --language lang --name func settings set target.language pascal These specify the Language to use when interpreting the breakpoint's expression (note: currently only implemented for breakpoints on identifiers). If the breakpoint language is not set, the target.language setting is used. This support is required by Pascal, for example, to set breakpoint at 'ns.foo' for function 'foo' in namespace 'ns'. Tests on the language were also added to Module::PrepareForFunctionNameLookup for efficiency. Reviewed by: clayborg Subscribers: jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D11119 llvm-svn: 242844
* Fix compiler warning in ArchSpecPavel Labath2015-07-161-10/+10
| | | | llvm-svn: 242397
* [LLDB][MIPS] Detect MIPS application specific extensions like micromipsJaydeep Patil2015-07-161-25/+32
| | | | | | | | | | | | | | SUMMARY: The patch detects MIPS application specific extensions (ASE) like micromips by reading ELF header.e_flags and SHT_MIPS_ABIFLAGS section. MIPS triple does not contain ASE information like micromips, mips16, DSP, MSA etc. These can be read from header.e_flags or SHT_MIPS_ABIFLAGS section. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, lldb-commits Differential Revision: http://reviews.llvm.org/D11133 llvm-svn: 242381
* Add a class ValueObjectConstResultCast.Siva Chandra2015-07-165-3/+104
| | | | | | | | | | | | | | | | | | | | | Summary: Other changes around the main change include: 1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl and ValueObjectConstResultChild. 2. Add an argument |live_address| of type lldb::addr_t to the constructor of ValueObjectConstResultChild. This is passed on to the backing ValueObjectConstResultImpl object constructor so that the address of the child value can be calculated properly. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11203 llvm-svn: 242374
* Remove hack about the size of long doubles from DataExtractorTamas Berghammer2015-07-131-3/+1
| | | | | | | | | | The size of a long double was hardcoded in DataExtractor for x86 and x86_64 architectures. This CL removes the hard coded values and use the actual size based on the floating point semantics specified. Differential revision: http://reviews.llvm.org/D8417 llvm-svn: 242019
* [LLDB][MIPS] Add mips cores in cores_match () in ArchSpecSagar Thakur2015-07-131-3/+93
| | | | | | | | | | | | | | | This patch: - Allows mips32 cores to match with any mips32/mips64 cores. - Allows mips32r2 cores to match with core only up-to mips32r2/mips64r2. - Allows mips32r3 cores to match with core only up-to mips32r3/mips64r3. - Allows mips32r5 cores to match with core only up-to mips32r3/mips64r5. - Allows mips32r6 core to match with only mips32r6/mips64r6 or mips32/mips64. Reviewers: emaste, jaydeep, clayborg Subscribers: mohit.bhakkad, nitesh.jain, bhushan, lldb-commits Differential Revision: http://reviews.llvm.org/D10921 llvm-svn: 242016
* Make many mangled functions that might demangle a name be allowed to specify ↵Greg Clayton2015-07-082-27/+23
| | | | | | a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. llvm-svn: 241751
* Fix APFloat construction from 16 byte APInt.Chaoren Lin2015-07-071-18/+8
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10976 llvm-svn: 241606
* Leave OS as unspecified unknown if it isn't specified in the ELF fileTamas Berghammer2015-07-071-11/+6
| | | | | | | | | This is the redone of r238623 what was reverted with the refactor in r239148. Differential revision: http://reviews.llvm.org/D10957 llvm-svn: 241569
* Make the "lldb/Utility/JSON.h" able to parse JSON into tokens with the new ↵Greg Clayton2015-07-061-248/+95
| | | | | | | | | | JSONParser class. Change over existing code to use this new parser so StructuredData can use the tokenizer to parse JSON instead of doing it manually. This allowed us to easily parse JSON into JSON* objects as well as into StructuredData. llvm-svn: 241522
* Add a GetDisplayName() API to SBFrame, SBFunction and SBSymbolEnrico Granata2015-07-061-0/+6
| | | | | | | | | | This API is currently a no-op (in the sense that it has the same behavior as the already existing GetName()), but is meant long-term to provide a best-for-visualization version of the name of a function It is still not hooked up to the command line 'bt' command, nor to the 'gui' mode, but I do have ideas on how to make that work going forward rdar://21203242 llvm-svn: 241482
* Fix linking issue after r241271 (dbghelp.lib was removed from default ↵Leny Kholodov2015-07-021-0/+1
| | | | | | dependencies on Windows) llvm-svn: 241278
* Fix [vdso] handling on Android (x86 and aarch64)Tamas Berghammer2015-06-301-0/+18
| | | | | | | | | | | | | | * Add in-memory object file handling to the core dynamic loader * Fix in memory object file handling in ObjectFileELF (previously only part of the file was loaded before parsing) * Fix load address setting in ObjectFileELF for 32-bit targets when the load bias is negative * Change hack in DYLDRendezvous.cpp to be more specific and not to interfere with object files with fixed load address Differential revision: http://reviews.llvm.org/D10800 llvm-svn: 241057
* Mark armv7em and armv7m as compatible architectures.Jason Molenda2015-06-251-1/+31
| | | | | | <rdar://problem/21244671> llvm-svn: 240713
* Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton2015-06-256-10/+13
| | | | | | | | | | | | | | | A few extras were fixed - Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected. - Since some places want to access the address as a reference, I added a few new functions to symbol: Address &Symbol::GetAddressRef(); const Address &Symbol::GetAddressRef() const; Linux test suite passes just fine now. <rdar://problem/21494354> llvm-svn: 240702
* Add const qualifier to Mangled::GuessLanguageDawn Perchik2015-06-251-1/+1
| | | | llvm-svn: 240676
* Rename Mangled::GetLanguage to Mangled::GuessLanguageDawn Perchik2015-06-251-1/+1
| | | | | | | | | | | The language can not be definitively determined from the mangling, so this new name helps clarify that fact. This addresses the concerns raised in http://reviews.llvm.org/rL226962. Reviewed by: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10723 llvm-svn: 240662
* Add support for displaying the language in the frame-format string.Dawn Perchik2015-06-231-0/+20
| | | | | | | | | | | | | | | | | | | Enable ${language} to be specified in the frame-format string to see the current frame's compile unit language in "frame info". Test Plan: debug a C++ program, run to main, and run the lldb commands: settings set frame-format "frame lang=${language}\n" frame info you should see: frame lang=c++ test case added in: ./dotest.py --executable lldb -f SettingsCommandTestCase.test_set_frame_format Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10561 llvm-svn: 240440
* Revert "Reduced packet counts to the remote GDB server where possible."Chaoren Lin2015-06-231-4/+0
| | | | | | | | | | This reverts commit 0cc0745ea9c68d7fdcadc9904cee3f13c96dae60. Due to breakage on Linux build bot: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/3436 llvm-svn: 240371
* Reduced packet counts to the remote GDB server where possible.Greg Clayton2015-06-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have been working on reducing the packet count that is sent between LLDB and the debugserver on MacOSX and iOS. Our approach to this was to reduce the packets required when debugging multiple threads. We currently make one qThreadStopInfoXXXX call (where XXXX is the thread ID in hex) per thread except the thread that stopped with a stop reply packet. In order to implement multiple thread infos in a single reply, we need to use structured data, which means JSON. The new jThreadsInfo packet will attempt to retrieve all thread infos in a single packet. The data is very similar to the stop reply packets, but packaged in JSON and uses JSON arrays where applicable. The JSON output looks like: [ { "tid":1580681, "metype":6, "medata":[2,0], "reason":"exception", "qaddr":140735118423168, "registers": { "0":"8000000000000000", "1":"0000000000000000", "2":"20fabf5fff7f0000", "3":"e8f8bf5fff7f0000", "4":"0100000000000000", "5":"d8f8bf5fff7f0000", "6":"b0f8bf5fff7f0000", "7":"20f4bf5fff7f0000", "8":"8000000000000000", "9":"61a8db78a61500db", "10":"3200000000000000", "11":"4602000000000000", "12":"0000000000000000", "13":"0000000000000000", "14":"0000000000000000", "15":"0000000000000000", "16":"960b000001000000", "17":"0202000000000000", "18":"2b00000000000000", "19":"0000000000000000", "20":"0000000000000000"}, "memory":[ {"address":140734799804592,"bytes":"c8f8bf5fff7f0000c9a59e8cff7f0000"}, {"address":140734799804616,"bytes":"00000000000000000100000000000000"} ] } ] It contains an array of dicitionaries with all of the key value pairs that are normally in the stop reply packet. Including the expedited registers. Notice that is also contains expedited memory in the "memory" key. Any values in this memory will get included in a new L1 cache in lldb_private::Process where if a memory read request is made and that memory request fits into one of the L1 memory cache blocks, it will use that memory data. If a memory request fails in the L1 cache, it will fall back to the L2 cache which is the same block sized caching we were using before these changes. This allows a process to expedite memory that you are likely to use and it reduces packet count. On MacOSX with debugserver, we expedite the frame pointer backchain for a thread (up to 256 entries) by reading 2 pointers worth of bytes at the frame pointer (for the previous FP and PC), and follow the backchain. Most backtraces on MacOSX and iOS now don't require us to read any memory! We will try these packets out and if successful, we should port these to lldb-server in the near future. <rdar://problem/21494354> llvm-svn: 240354
* Fix the lldb build for the EM_486 change.Rafael Espindola2015-06-191-1/+1
| | | | llvm-svn: 240138
* Fix a variety of typos.Bruce Mitchener2015-06-182-3/+3
| | | | | | No functional change. llvm-svn: 239995
* Fix enum LanguageType values and language string table lookups.Dawn Perchik2015-06-171-1/+19
| | | | | | | | | | | | | | | Summary: * Fix enum LanguageType values so that they can be used as indexes into array language_names and g_languages as assumed by LanguageRuntime::GetNameForLanguageType, Language::SetLanguageFromCString and Language::AsCString. * Add DWARFCompileUnit::LanguageTypeFromDWARF to convert from DWARF DW_LANG_* values to enum LanguageType values. Reviewed By: clayborg, abidh Differential Revision: http://reviews.llvm.org/D10484 llvm-svn: 239963
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-083-5/+5
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
OpenPOWER on IntegriCloud