- Jun 25, 2015
-
-
Enrico Granata authored
Fix a bug where we were trying to reconstruct ivars of ObjC types from the runtime in "expression parser mode" The expression parser mode allows UnknownAnyTy to make it all the way through, but that is bad for ivars because it means type layout fails horribly (as in, clang crashes) This patch fixes the issue by using the "variables view mode", which masks UnknownAnyTy as empty-type, and pointer-to UnknownAnyTy as void* This, in turn, allows LLDB to properly reconstruct ivars of IMP type in ObjC type - as per accompanying test case Fixes rdar://21471326 llvm-svn: 240677
-
Dawn Perchik authored
llvm-svn: 240676
-
Greg Clayton authored
http://reviews.llvm.org/D10309 llvm-svn: 240663
-
Dawn Perchik authored
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
-
Oleksiy Vyalov authored
http://reviews.llvm.org/D10711 llvm-svn: 240660
-
Enrico Granata authored
Handle (or at least don't crash) trying to get the encoding for a bunch of new builtin types in clang trunk llvm-svn: 240606
-
- Jun 24, 2015
-
-
Ed Maste authored
The values of four important registers are included in logs for ptrace PT_GETREGS. Put all four on the same line for a more compact log. Also use the proper 64-bit register names. llvm-svn: 240581
-
Enrico Granata authored
Fix an issue where an SBValue could end up capturing a synthetic value and would then be unable to return the non-synthetic version thereof This patch makes the backing ValueImpl always store the root-most value no matter the "flavor" that is initially passed into it llvm-svn: 240578
-
Oleksiy Vyalov authored
llvm-svn: 240565
-
Ed Maste authored
With the removal of ProcessLinux in r240543 this code is used only on FreeBSD. FreeBSD isn't affected by whichever issue originally prompted the addition of SetResumeState, so just remove it. As discussed on the mailing list (and mentioned in a FIXME comment) it shouldn't be called there. llvm-svn: 240550
-
Ed Maste authored
The removal of ProcessLinux in r240543 left only an empty StopAllThreads (it's not needed on FreeBSD), so just remove it too. llvm-svn: 240549
-
Ed Maste authored
llvm-svn: 240547
-
Ewan Crawford authored
Turn non-stop mode off if reply to QNonStop packet isn't an OK. llvm-svn: 240546
-
Pavel Labath authored
Summary: Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using it; and b) the remote debugging path is much more stable. This commit removes the local-only linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new architecture as well and then this code can be removed completely. Test Plan: Test suite passes via remote stub. Reviewers: emaste, vharron, ovyalov, clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10661 llvm-svn: 240543
-
Tamas Berghammer authored
Bug introduced by r240533 llvm-svn: 240537
-
Tamas Berghammer authored
* Add and fix the emulation of several instruction. * Disable frame pointer usage on Android. * Specify return address register for the unwind plan instead of explict tracking the value of RA. * Replace prologue detection heuristics (unreliable in several cases) with a logic to follow the branch instructions and restore the CFI value based on them. The target address for a branch should have the same CFI as the source address (if they are in the same function). * Handle symbols in ELF files where the symbol size is not specified with calcualting their size based on the next symbol (already done in MachO files). * Fix architecture in FuncUnwinders with filling up the inforamtion missing from the object file with the architecture of the target. * Add code to read register wehn the value is set to "IsSame" as it meanse the value of a register in the parent frame is the same as the value in the current frame. Differential revision: http://reviews.llvm.org/D10447 llvm-svn: 240533
-
- Jun 23, 2015
-
-
Greg Clayton authored
Implement the "qSymbol" packet in order to be able to read queue information in debugserver and return the info in the stop reply packets. A "qSymbol::" is sent when shared libraries have been loaded by hooking into the Process::ModulesDidLoad() function from within ProcessGDBRemote. This function was made virtual so that the ProcessGDBRemote version is called, which then first calls the Process::ModulesDidLoad(), and then it queries for any symbol lookups that the remote GDB server might want to do. This allows debugserver to request the "dispatch_queue_offsets" symbol so that it can read the queue name, queue kind and queue serial number and include this data as part of the stop reply packet. Previously each thread would have to do 3 memory reads in order to read the queue name. This is part of reducing the number of packets that are sent between LLDB and the remote GDB server. <rdar://problem/21494354> llvm-svn: 240466
-
Jim Ingham authored
a hand-called function from the private state thread. The problem was that on the way out of the private state thread, we try to drop the run lock. That is appropriate for the main private state thread, but not the secondary private state thread. Only the thread that spawned them can know whether this is an appropriate thing to do or not. <rdar://problem/21375352> llvm-svn: 240461
-
Dawn Perchik authored
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
-
Oleksiy Vyalov authored
llvm-svn: 240435
-
Pavel Labath authored
Test Plan: It builds, tests pass. Reviewers: tstellarAMD, rafael Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10660 llvm-svn: 240429
-
Ewan Crawford authored
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
-
Jaydeep Patil authored
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
-
Chaoren Lin authored
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
-
Greg Clayton authored
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
-
Greg Clayton authored
llvm-svn: 240351
-
- Jun 22, 2015
-
-
Greg Clayton authored
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
-
Jaydeep Patil authored
llvm-svn: 240280
-
- Jun 19, 2015
-
-
Tamas Berghammer authored
llvm-svn: 240166
-
Tamas Berghammer authored
llvm-svn: 240162
-
Adrian McCarthy authored
llvm-svn: 240157
-
Rafael Espindola authored
llvm-svn: 240138
-
Bhushan D. Attarde authored
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
-
Jason Molenda authored
bug in old clang's. llvm-svn: 240070
-
- Jun 18, 2015
-
-
Jason Molenda authored
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
-
Jason Molenda authored
Problem noticed by Todd Fiala. llvm-svn: 240060
-
Tamas Berghammer authored
Differential revision: http://reviews.llvm.org/D10490 llvm-svn: 240052
-
Tamas Berghammer authored
llvm-svn: 240029
-
Mohit K. Bhakkad authored
llvm-svn: 240016
-
Aidan Dodds authored
Differential Revision: http://reviews.llvm.org/D10499 llvm-svn: 240007
-