summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Mark SBFrame::GetFunctionName and SBFrame::IsInlined as const.Oleksiy Vyalov2015-06-231-2/+2
| | | | llvm-svn: 240435
* Fix build breakage after llvm r240426Pavel Labath2015-06-231-2/+1
| | | | | | | | | | | | Test Plan: It builds, tests pass. Reviewers: tstellarAMD, rafael Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10660 llvm-svn: 240429
* Add handling of async notify packetsEwan Crawford2015-06-234-53/+186
| | | | | | | | | | | | | | | | This patch adds a listener to the AynscThread in ProcessGDBRemote, specifically for dealing with any async notification packets. From the broadcast our listener receives we can process the notify packet from the event data. A handler function then sets the thread stop info from this packet, and updates lldb by setting the process private state to stopped. Allowing the async thread to go back to sleep and getting the main thread to handle the implications of a state change. When sending a vCont in nonstop mode we also get a different reply from all-stop mode, an OK response as opposed to a stop reply. So a condition is added to handle this and set the process state without the stop-reply data. Reviewers: clayborg Subscribers: lldb-commits, labath, ted, aidan.dodds, deepak2427 Differential Revision: http://reviews.llvm.org/D10544 llvm-svn: 240397
* [LLDB][MIPS] MIPS32 branch emulation and single-steppingJaydeep Patil2015-06-237-112/+2667
| | | | | | | | | | | | | | | SUMMARY: This patch implements 1. Emulation of MIPS32 branch instructions 2. Enable single-stepping for MIPS32 instructions 3. Correction in emulation of MIPS64 branch instructions with delay slot 4. Adjust breakpoint address when breakpoint is hit in a forbidden slot of compact branch instruction Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, bhushan, lldb-commits, emaste, nitesh.jain Differential Revision: http://reviews.llvm.org/D10596 llvm-svn: 240373
* Revert "Reduced packet counts to the remote GDB server where possible."Chaoren Lin2015-06-238-577/+245
| | | | | | | | | | 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-228-245/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 a crasher on the MacOSX test suite for Objective C.Greg Clayton2015-06-221-1/+1
| | | | llvm-svn: 240351
* Cleanup the code a bit to make it more readable. Greg Clayton2015-06-221-4/+14
| | | | | | | | Add some if/then to avoid calling a function to get dynamic/synthetic types if we know we aren't going to need to call it. Avoid calling a function that returns a shared pointer twice: once for testing it and once for assigning it (even though that shared pointer is cached inside the value object), it just makes the code a bit clearer. llvm-svn: 240299
* Test CommitJaydeep Patil2015-06-221-0/+2
| | | | llvm-svn: 240280
* Add comment for workarond in DYLDRendezvous with android versionTamas Berghammer2015-06-191-0/+1
| | | | llvm-svn: 240166
* Fix build brakage caused by r240154Tamas Berghammer2015-06-191-0/+1
| | | | llvm-svn: 240162
* Load executable module when attaching to process; implement detach from process.Adrian McCarthy2015-06-194-39/+163
| | | | llvm-svn: 240157
* Fix the lldb build for the EM_486 change.Rafael Espindola2015-06-192-2/+2
| | | | llvm-svn: 240138
* [LLDB][MIPS] ABI Plugin for MIPS64Bhushan D. Attarde2015-06-196-0/+726
| | | | | | | | | | | SUMMARY: This patch implements ABI plugin for MIPS64. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, emaste, nitesh.jain, lldb-commits Differential Revision: http://reviews.llvm.org/D10534 llvm-svn: 240123
* Update comment about the UNWIND_X86_64_MODE_STACK_IND encodingJason Molenda2015-06-181-1/+2
| | | | | | bug in old clang's. llvm-svn: 240070
* Add a new wart, I mean feature, on to gdb-remote protocol: compression.Jason Molenda2015-06-184-5/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some communication channels, sending large packets can be very slow. In those cases, it may be faster to compress the contents of the packet on the target device and decompress it on the debug host system. For instance, communicating with a device using something like Bluetooth may be an environment where this tradeoff is a good one. This patch adds a new field to the response to the "qSupported" packet (which returns a "qXfer:features:" response) -- SupportedCompressions and DefaultCompressionMinSize. These tell you what the remote stub can support. lldb, if it wants to enable compression and can handle one of those algorithms, it can send a QEnableCompression packet specifying the algorithm and optionally the minimum packet size to use compression on. lldb may have better knowledge about the best tradeoff for a given communication channel. I added support to debugserver an lldb to use the zlib APIs (if -DHAVE_LIBZ=1 is in CFLAGS and -lz is in LDFLAGS) and the libcompression APIs on Mac OS X 10.11 and later (if -DHAVE_LIBCOMPRESSION=1). libz "zlib-deflate" compression. libcompression can support deflate, lz4, lzma, and a proprietary lzfse algorithm. libcompression has been hand-tuned for Apple hardware so it should be preferred if available. debugserver currently only adds the SupportedCompressions when it is being run on an Apple watch (TARGET_OS_WATCH). Comment that #if out from RNBRemote.cpp if you want to enable it to see how it works. I haven't tested this on a native system configuration but surely it will be slower to compress & decompress the packets in a same-system debug session. I haven't had a chance to add support for this to GDBRemoteCommunciationServer.cpp yet. <rdar://problem/21090180> llvm-svn: 240066
* Correct the end-of-vector check in GetCompactUnwindInfoForFunction().Jason Molenda2015-06-181-1/+1
| | | | | | Problem noticed by Todd Fiala. llvm-svn: 240060
* Fetch object file load address if it isn't specified by the linkerTamas Berghammer2015-06-189-2/+132
| | | | | | Differential revision: http://reviews.llvm.org/D10490 llvm-svn: 240052
* Fix test regression TestDisassemble_VST1_64 (caused by r239996)Tamas Berghammer2015-06-181-1/+1
| | | | llvm-svn: 240029
* [LLDB][MIPS] Addressing some errors and warnings due to rL239991Mohit K. Bhakkad2015-06-182-11/+17
| | | | llvm-svn: 240016
* Fix duplicate shared module list entriesAidan Dodds2015-06-181-0/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D10499 llvm-svn: 240007
* [MIPS64] Correct generic register number of argument registers in reginfoSagar Thakur2015-06-181-4/+4
| | | | llvm-svn: 240005
* A correction in rL239996Mohit K. Bhakkad2015-06-181-0/+1
| | | | llvm-svn: 239998
* [LLDB][MIPS] ABI Plugin for MIPS32Bhushan D. Attarde2015-06-186-0/+736
| | | | | | | | | | | SUMMARY: This patch implements ABI plugin for MIPS32. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits Differential Revision: http://reviews.llvm.org/D10240 llvm-svn: 239997
* [LLDB][MIPS] Emulation of MIPS64 floating-point branch instructionsMohit K. Bhakkad2015-06-184-12/+572
| | | | | | | | | | | | | | | | | Patch by Jaydeep Patil SUMMARY: 1. Added emulation of MIPS64 floating-point branch instructions 2. Updated GetRegisterInfo to recognize floating-point registers 3. Provided CPU information while creating createMCSubtargetInfo in disassembler 4. Bug fix in emulation of JIC and JIALC 5. Correct identification of breakpoint when set in a delay slot of a branch instruction Reviewers: clayborg Subscribers: bhushan, mohit.bhakkad, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D10355 llvm-svn: 239996
* Fix a variety of typos.Bruce Mitchener2015-06-1818-33/+33
| | | | | | No functional change. llvm-svn: 239995
* [LLDB][MIPS] Hardware Watchpoints for MIPSMohit K. Bhakkad2015-06-184-9/+449
| | | | | | | | Reviewers: clayborg, jingham. Subscribers: jaydeep, bhushan, dsanders, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D9142 llvm-svn: 239991
* Fix enum LanguageType values and language string table lookups.Dawn Perchik2015-06-175-9/+43
| | | | | | | | | | | | | | | 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
* [NativeProcessLinux] Use fast memory reads, if the system supports itPavel Labath2015-06-172-3/+74
| | | | | | | | | | | | | | | | | | | | | | | Summary: Memory reads using the ptrace API need to be executed on a designated thread and in 4-byte increments. The process_vm_read syscall has no such requirements and it is about 50 times faster. This patch makes lldb-server use the faster API if the target kernel supports it. Kernel support for this feature is determined at runtime. Using process_vm_writev in the same manner is more complicated since this syscall (unlike ptrace) respects page protection settings and so it cannot be used to set a breakpoint, since code pages are typically read-only. However, memory writes are not currently a performance bottleneck as they happen much more rarely. Test Plan: all tests continue to pass Reviewers: ovyalov, vharron Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10488 llvm-svn: 239924
* Correct type in for loop to remove signedness warningEd Maste2015-06-171-1/+1
| | | | llvm-svn: 239918
* Revert r239873 - I actually want to think some more about thisEnrico Granata2015-06-171-16/+2
| | | | llvm-svn: 239874
* Fix an issue where the oneliner printing of variables would ignore custom ↵Enrico Granata2015-06-171-2/+16
| | | | | | | | | | | formatting Because vector types use their formats in special ways (i.e. children get generated based on them), this change by itself would cause a regression in printing vector types with some custom formats Work around that issue by special casing vector types out of this format-passdown mode. I believe there is a more general feature to be designed in this space, but until I see more cases of interest, I am going to leave this as a special case Fixes rdar://20810062 llvm-svn: 239873
* Fix a typo in the help.Jim Ingham2015-06-161-1/+1
| | | | llvm-svn: 239854
* Fixing a potential issue where the NSIndexPath formatter could try to access ↵Enrico Granata2015-06-161-95/+124
| | | | | | | | stale data No test because I did not see this happen - it has been found by code inspection as a response to seeing crash logs about this llvm-svn: 239851
* Enable 'command script import' to accept multiple modules to import in one ↵Enrico Granata2015-06-161-26/+29
| | | | | | | | invocation Fixes rdar://21388472 llvm-svn: 239839
* Add Read Thread to GDBRemoteCommunicationEwan Crawford2015-06-164-8/+167
| | | | | | | | | | | | | | | | In order to support asynchronous notifications for non-stop mode this patch adds a packet read thread. This is done by implementing AppendBytesToCache() from the communications class, which continually reads packets into a packet queue. To initialize this thread StartReadThread() must be called by the client, so since llgs and platform tools use the GBDRemoteCommunicatos code they must also call this function as well as ProcessGDBRemote. When the read thread detects an async notify packet it broadcasts this event, where the matching listener will be added in the next non-stop patch. Packets are now accessed by calling ReadPacket() which pops a packet from the queue, instead of using WaitForPacketWithTimeoutMicroSecondsNoLock() Reviewers: vharron, clayborg Subscribers: lldb-commits, labath, ted, domipheus, deepak2427 Differential Revision: http://reviews.llvm.org/D10085 llvm-svn: 239824
* If a candidate keyword contains quotes, it's clearly not a keyword, so bail ↵Enrico Granata2015-06-151-0/+12
| | | | | | | | | | out early There are other characters we could optimize for (any non-letter pretty much), but keyword.iskeyword() will handle them, whereas quotes do have the potential to confuse us, so they actually need custom handling Fixes rdar://problem/21022787 llvm-svn: 239779
* Add a formatter for wchar_t[N] arraysEnrico Granata2015-06-151-7/+12
| | | | | | rdar://21299888 llvm-svn: 239777
* Fix a bug where passing a value of the type "A B" to settings set ↵Enrico Granata2015-06-151-0/+6
| | | | | | | | target.env-vars would cause LLDB to crash Fixes rdar://problem/21241817 llvm-svn: 239766
* Found an issue that was causing types to be completed much more often than ↵Greg Clayton2015-06-151-6/+17
| | | | | | | | | | they needed to be. The problem is for lldb_private::Type instances that have encoding types (pointer/reference/const/volatile/restrict/typedef to type with user ID 0x123). If they started out with m_flags.clang_type_resolve_state being set to eResolveStateUnresolved (0), then when we would call Type::ResolveClangType(eResolveStateForward) we would complete the full type due to logic errors in the code. We now only complete the type if clang_type_resolve_state is eResolveStateLayout or eResolveStateFull and we correctly upgrade the type's current completion state to eResolveStateForward after we make a forward delcaration to the pointer/reference/const/volatile/restrict/typedef type instead of leaving it set to eResolveStateUnresolved. llvm-svn: 239752
* [LLDB][MIPS] Getting correct signals for MIPS HostMohit K. Bhakkad2015-06-101-3/+16
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, dsanders, mohit.bhakkad, sagar, labath, lldb-commits. Differential Revision: http://reviews.llvm.org/D10180 llvm-svn: 239463
* Rename `FileSpec::IsRelativeToCurrentWorkingDirectory` to `IsRelative`.Chaoren Lin2015-06-097-9/+15
| | | | | | | | | | | | | | | | | Summary: `IsRelativeToCurrentWorkingDirectory` was misleading, because relative paths are sometimes appended to other directories, not just the cwd. Plus, the new name is shorter. Also added `IsAbsolute` for completeness. Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10262 llvm-svn: 239419
* [lldb-server][MIPS64] Assigning generic register numbers in register info ↵Sagar Thakur2015-06-091-7/+7
| | | | | | | | for mips64 Use generic register numbers for argument registers, fp, ra and flag register in register info. llvm-svn: 239394
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-0836-7238/+6470
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
* Introduce a TypeSystem interface to support adding non-clang languages.Pavel Labath2015-06-0836-6470/+7238
| | | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8712 Original Author: Ryan Brown <ribrdb@google.com> llvm-svn: 239360
* Fix TestSymbolContext for remote Windows to Android.Chaoren Lin2015-06-081-4/+5
| | | | | | | | | | | | | | Summary: Denormalize path returned by SBFileSpec::GetDirectory(). Reviewers: zturner, clayborg Reviewed By: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10298 llvm-svn: 239358
* If we have a MachO file loaded from memory, make sure we can always get the ↵Greg Clayton2015-06-082-53/+92
| | | | | | | | symbol table even if we don't have the __LINKEDIT load address set in the target. <rdar://problem/21208168> llvm-svn: 239354
* Switch from setPrintImmHex to setPrintHexStyle to follow changes from r239263.Oleksiy Vyalov2015-06-081-2/+2
| | | | llvm-svn: 239310
* Silence warning on Windows.Chaoren Lin2015-06-081-1/+2
| | | | llvm-svn: 239284
* Fix TestNamespace and TestThreadJump for remote Windows to Android.Chaoren Lin2015-06-053-29/+27
| | | | | | | | | | | | | | | | Summary: Update DYLDRendezvous and SOEntry to use FileSpecs instead of storing paths as strings, which caused incorrect comparison results due to denormalization. Reviewers: clayborg, vharron, ovyalov Reviewed By: ovyalov Subscribers: jwolfe, emaste, tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10267 llvm-svn: 239195
OpenPOWER on IntegriCloud