summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixes to get the arm native debugserver building again.Jason Molenda2013-11-216-13/+20
| | | | | | Fix a small typeo in the i386/x86_64 debugserver plugins. llvm-svn: 195308
* <rdar://problem/14814689>Greg Clayton2013-11-131-2/+1
| | | | | | Add a log message to the console that will display the error code when we fail to reply to a mach message. llvm-svn: 194623
* <rdar://problem/15172417>Greg Clayton2013-11-1310-3/+222
| | | | | | | | | | | | | | | Added two new GDB server packets to debugserver: "QSaveRegisterState" and "QRestoreRegiterState". "QSaveRegisterState" makes the remote GDB server save all register values and it returns a save identifier as an unsigned integer. This packet can be used prior to running expressions to save all registers. All registers can them we later restored with "QRestoreRegiterState:SAVEID" what SAVEID is the integer identifier that was returned from the call to QSaveRegisterState. Cleaned up redundant code in lldb_private::Thread, lldb_private::ThreadPlanCallFunction. Moved the lldb_private::Thread::RegisterCheckpoint into its own header file and it is now in the lldb_private namespace. Trimmed down the RegisterCheckpoint class to omit stuff that wasn't used (the stack ID). Added a few new virtual methods to lldb_private::RegisterContext that allow subclasses to efficiently save/restore register states and changed the RegisterContextGDBRemote to take advantage of these new calls. llvm-svn: 194621
* Fixed up registers in debugserver.Greg Clayton2013-11-095-218/+576
| | | | | | | | | | | | - removed all gaps from the g/G packets - optimized registers for x86_64 to not send/receive xmm0-xmm15 as well as ymm0-ymm15, now we only send ymm0-15 and xmm0-15 are now pseudo regs - Fixed x86_64 floating point register gaps - Fixed x86_64 so that xmm8-xmm15 don't overlap with ymm0-ymm3. This could lead to bad values showing in the debugger and was due to bad register info structure contents - Fixed i386 so we only send ymm0-ymm7 and xmm0-xmm7 are now pseudo regs. - Fixed ARM register definitions to not have any gaps - Fixed it so value registers and invalidation registers are specified using register names which avoid games we had to play with register numbering in the ARM plugin. llvm-svn: 194302
* Fixed printf warnings.Greg Clayton2013-10-311-4/+4
| | | | llvm-svn: 193806
* Add support for building debugserver with CMake (on Mac OS X)Daniel Malea2013-08-093-0/+73
| | | | | | | | - updated RNBDefs.h to allow version numbers to be passed in via preprocessor defines - update libdebugserver.cpp to compile against latest DNBProcessKill signature Review: http://llvm-reviews.chandlerc.com/D1331 llvm-svn: 188078
* Didn't get the right version of these files in the checkin for r186132.Jim Ingham2013-07-182-17/+18
| | | | llvm-svn: 186596
* Get debugserver to call task_set_state to prime the control registers so ↵Jim Ingham2013-07-119-138/+70
| | | | | | | | | | | | | that watchpoints take for threads created while the program is running. Remove the testcase skips from TestConcurrentEvents.py, since they all pass now, and fix TestWatchpointMultipleThreads.py - which should have caught this problem - so it doesn't artificially break on new thread creation before the watchpoint triggers. llvm.org/pr16566 <rdar://problem/14383244> llvm-svn: 186132
* <rdar://problem/14195566>Greg Clayton2013-06-271-6/+10
| | | | | | Found a race condition when killing an application where the state could be set to exited by the waitpid_thread() _before_ we call task resume (via MachProcess::PrivateResume()) in MachProcess::Kill(). llvm-svn: 185048
* <rdar://problem/14281898>Han Ming Ong2013-06-261-0/+18
| | | | | | Much faster way to get dirty size. llvm-svn: 185033
* <rdar://problem/14262854>Han Ming Ong2013-06-261-3/+16
| | | | | | | Match up with top’s implementation on recent Cab as API has changed a bit. Tested the same binary running on Zin as well. Tested ARM binary on iOS as well. llvm-svn: 185017
* Remove some unnecessary uses of nub_break_t in the arm specificJason Molenda2013-06-253-126/+1
| | | | | | | | | support files for debugserver to fix a build failure for arm. Also remove some of the code used for software-driven single instruction stepping; this is slowly being yanked out and these particular bits overlap with the nub_break_t going away. llvm-svn: 184828
* Huge performance improvements when one breakpoint contains many locations.Greg Clayton2013-06-127-227/+136
| | | | | | | | | | 325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote. That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly. Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed. llvm-svn: 183820
* <rdar://problem/13963648>Han Ming Ong2013-05-221-2/+6
| | | | | | | Changes after feedback: Directly use function pointer, just to be safer on 10.8. llvm-svn: 182529
* <rdar://problem/13963648>Han Ming Ong2013-05-223-19/+79
| | | | | | Collect 'anonymous memory' info, if possible llvm-svn: 182523
* <rdar://problem/13892516>Greg Clayton2013-05-214-831/+68
| | | | | | LLDB can now debug across calls to exec when the architecture changes from say i386 to x86_64 (on darwin). llvm-svn: 182345
* <rdar://problem/13891604>Greg Clayton2013-05-162-3/+14
| | | | | | Fixed a 2 second delay when sending the 'k' (kill) packet that happened due to a race condition. llvm-svn: 182025
* fix a couple of clang static analyzer warnings.Jason Molenda2013-05-042-4/+2
| | | | | | | Most important was a new[] + delete mismatch in ScanFormatDescriptor() and a couple of possible memory leaks in FileSpec::EnumerateDirectory(). llvm-svn: 181080
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-181-2/+2
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-181-1/+1
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* Cache the VM page size that we get from task_vm_info so we don'tJason Molenda2013-04-061-1/+2
| | | | | | re-fetch the value. llvm-svn: 178962
* Add optional LOG_TASK logging for MachVMMemory::PageSize when the call ↵Jason Molenda2013-04-061-0/+1
| | | | | | succeeds, too. llvm-svn: 178955
* Add optional LOG_TASK logging for MachVMMemory::PageSize() task_info call ↵Jason Molenda2013-04-061-0/+4
| | | | | | failure. llvm-svn: 178954
* Update MachVMMemory::PageSize to get the page size of a specific processJason Molenda2013-04-064-16/+45
| | | | | | | | | | | if we have an updated task_info call available; else fall back to getting the default host-wide page size. Update all uses of the vm page size to get it via MachVMMemory::PageSize(). <rdar://problem/13477763>, <rdar://problem/13498504> llvm-svn: 178953
* <rdar://problem/13198919>Greg Clayton2013-04-041-0/+15
| | | | | | Try and reap process when sending the "k" packet to avoid a race condition. We now wait for at most 1 second to reap the child process that we are killing. llvm-svn: 178726
* <rdar://problem/12789467>Greg Clayton2013-04-031-1/+2
| | | | | | Fixed an attach case for ARM that was imporperly detecting an application bundle when there wasn't one. llvm-svn: 178704
* Fix another old usage of GetCurrentThread() to get a mach portJason Molenda2013-04-032-0/+7
| | | | | | | | | number in RNBRemote::HandlePacket_qProcessInfo -- add a new GetCurrentThreadMachPort() so callers who need to make a mach thred_get_state() call at the RNBRemote level will have a way to get the port number. llvm-svn: 178619
* Remove some unused code.Jim Ingham2013-04-021-13/+0
| | | | llvm-svn: 178512
* Debugserver fix for launching iOS apps who are named "com.apple.something"Jason Molenda2013-03-281-2/+16
| | | | | | | | - the ".app" would be treated as the app bundle final characters and the SpringBoard launch would fail. <rdar://problem/13258935> llvm-svn: 178209
* <rdar://problem/13498504>Han Ming Ong2013-03-252-11/+36
| | | | | | Don't hard code vm page size in profiling code llvm-svn: 177907
* <rdar://problem/13100435>Han Ming Ong2013-03-151-4/+1
| | | | | | Don't discount regions that vmmap is not discounting. llvm-svn: 177202
* <rdar://problem/13415471>Han Ming Ong2013-03-131-6/+6
| | | | | | Don't get dirty page size if we are not going to send it back llvm-svn: 176992
* <rdar://problem/13396207>Greg Clayton2013-03-131-2/+2
| | | | | | Added logging that will show up in the system console when we try to resume a process that is already running, or has an unexpected state. llvm-svn: 176960
* Various fixes for armv7 floating point/vector register support.Jason Molenda2013-03-131-165/+190
| | | | | | | | | | | | | Drop the old f registers from debugserver's register list. Add the NEON 128-bit q registers to debugserver, support reading and writing. Add the new contains / invalidates mappings for the s, d, and q registers so lldb will know what registers overlay what other registers. Change the default format of s and d registers to be floating point instead of hex. Remove some UTF-8 hyphen chars in comments in the ARM register number definition headers. <rdar://problem/13121797> llvm-svn: 176915
* Remove use of the ARMDisassembler framework fromJason Molenda2013-03-092-1427/+0
| | | | | | | | DNBArchImplARM. This framework is no longer around; all armv7 devices support using hardware breakpoints to instruction single step. llvm-svn: 176761
* <rdar://problem/13338758>Han Ming Ong2013-03-046-87/+138
| | | | | | | Make it configurable what to profile. For Mac, we don't use the dirty page size yet and hence there is no need to gather that. This should be way better in not draining the battery since we are operating between 0% to 0.1% on the Mac after this change. llvm-svn: 176451
* Fix one remaining mach port number/globally unique thread ID mixup which ↵Jason Molenda2013-02-263-3/+20
| | | | | | | | prevented queue names from being fetched correctly. <rdar://problem/13290877> llvm-svn: 176141
* <rdar://problem/13282582>Han Ming Ong2013-02-261-2/+5
| | | | | | Really don't call sysctl again when we already have the result. llvm-svn: 176062
* <rdar://problem/13282582>Han Ming Ong2013-02-251-1/+9
| | | | | | Need available CPU on target device to support CPU reporting. llvm-svn: 176008
* <rdar://problem/13277100>Han Ming Ong2013-02-221-0/+12
| | | | | | Need host_statistics on profile data to get host's user/system/idle clicks llvm-svn: 175928
* Remove unintended comment.Jason Molenda2013-02-221-2/+0
| | | | llvm-svn: 175873
* Change debugserver from using the mach port number (in debugserver'sJason Molenda2013-02-2211-103/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | own port namepsace) as the thread identifier to using the system-wide globally unique thread id as the thread identifier number. MachThread.cpp keeps both the unique id and the mach port number for each thread. All layers outside MachThread class use the unique id with three exceptions: (1) Mach exceptions come in with the port number (thread_port) which needs to be translated, (2) any calls to low-level thread_get_state/thread_set_state/thread_suspend etc need to use the mach port number, (3) MachThreadList::UpdateThreadList which creates the MachThread objects gets the unique id and passes it to the MachThread ctor as an argument. In general, any time nub_thread_t is used, it is now referring to a unique thread id. Any time a thread_t is used, it is now referring to a mach port number. There was some interchangability of these types previously. nub_thread_t has also been changed to a 64-bit type which necessitated some printf specification string changes. I haven't been able to test these changes extensively yet but want to checkpoint the work. The scenarios I've been testing are all working correctly so while there may be some corner cases I haven't hit yet, I think it is substantially correct. <rdar://problem/12931414> llvm-svn: 175870
* <rdar://problem/13259230>Han Ming Ong2013-02-211-1/+6
| | | | | | Remember to set m_profile_thread to NULL once the profile thread is turned off. llvm-svn: 175761
* Get rid of a warning.Greg Clayton2013-02-161-1/+1
| | | | llvm-svn: 175337
* <rdar://13073234>Han Ming Ong2013-01-251-6/+5
| | | | | | Get the number of threads correct. llvm-svn: 173466
* Don't listen for EXC_RESOURCE exceptions, those should really be handled by ↵Jim Ingham2013-01-241-1/+12
| | | | | | | | the system handler. Also put in string translations for a couple of exceptions we were missing. llvm-svn: 173390
* Added all of the 16 and 8 bit register variants for i386.Greg Clayton2013-01-213-96/+174
| | | | | | Modified the ARM register context to invalidate r8 - r14 when the CPSR register is modified. llvm-svn: 173104
* <rdar://problem/13020634>Greg Clayton2013-01-211-92/+236
| | | | | | | | | | Fixed the 32, 16, and 8 bit pseudo regs for x86_64 (real reg of "rax" which subvalues "eax", "ax", etc...) to correctly get updated when stepping. Also fixed it so actual registers can specify what other registers must be invalidated when a register is modified. Previously, only pseudo registers could invalidate other registers. Modified the LLDB qRegisterInfo extension to the GDB remote interface to support specifying the containing registers with the new "container-regs" key whose value is a comma separated list of register numbers. Also added a "invalidate-regs" key whose value is also a comma separated list of register numbers. Removed the hack GDBRemoteDynamicRegisterInfo::Addx86_64ConvenienceRegisters() function and modified "debugserver" to specify the registers correctly using the new "container-regs" and "invalidate-regs" keys. llvm-svn: 173096
* <rdar://problem/12976277>Han Ming Ong2013-01-181-2/+1
| | | | | | Swap in index ids for thread ids in GDBRemoteCommunicationClient. Besides dealing with the async logic, I have to take care of the situation when the inferior paused as well. llvm-svn: 172869
* Add one more bit of logging for armv7 watchpoint debugging.Jason Molenda2013-01-171-0/+2
| | | | llvm-svn: 172702
OpenPOWER on IntegriCloud