summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source
Commit message (Collapse)AuthorAgeFilesLines
* Patch from Filipe Cabecinhas.Greg Clayton2012-04-261-1/+0
| | | | llvm-svn: 155641
* Patch from Filipe Cabecinhas.Greg Clayton2012-04-261-2/+2
| | | | llvm-svn: 155640
* Suspend program threads before sending the SIGSTOP & resuming, so other ↵Jim Ingham2012-04-252-5/+9
| | | | | | | | threads won't get into trouble while we are waiting for the SIGSTOP. rdar://problem/11174834 llvm-svn: 155560
* Added a new packet to our GDB remote protocol:Greg Clayton2012-04-102-20/+73
| | | | | | | | QListThreadsInStopReply This GDB remote query command can enable added a "threads" key/value pair to all stop reply packets so that we always get a list of all threads in each stop reply packet. It increases performance if enabled (the reply to the "QListThreadsInStopReply" is "OK") by saving us from sending to command/reply pairs (the "qfThreadInfo" and "qsThreadInfo" packets), and also helps us keep the current process state up to date. llvm-svn: 154380
* Fixed the C++11 #defines that wrap std::weak_ptr to actually use std::weak_ptr.Greg Clayton2012-04-041-1/+1
| | | | llvm-svn: 154041
* Fix a typo.Johnny Chen2012-03-231-1/+1
| | | | llvm-svn: 153301
* Make arm debugserver handle setting a watchpoint on, for example, ↵Johnny Chen2012-03-232-39/+81
| | | | | | | | | (uint64_t)variable. We do this by delegating to two available Watchpoint Register Pairs (wvr, wcr). With each pair handling the 4 bytes of (uint64_t)variable. llvm-svn: 153300
* Previous check-ins allow to hit the arm hardware watchpoint, with a ↵Johnny Chen2012-03-222-56/+52
| | | | | | | | | | | | | | workaound to handle the issue that the inferior cannot execute past the watchpoint-triggering instruction. The solution is disable the watchpoint before resuming the inferior and make it hardware single step; when the inferior stops again due to single step, re-enable the watchpoint and disable the single step to make the inferior able to continue again without obstacle. rdar://problem/9667960 llvm-svn: 153273
* Fixed a bug with the r153228 check-in earlier today in that the cached ↵Johnny Chen2012-03-222-10/+14
| | | | | | | | watchpoint member variables were not reset appropriately. llvm-svn: 153239
* WIP snapshot of hardware watchpoints for arm. A simple watchpoint has ↵Johnny Chen2012-03-222-27/+140
| | | | | | | | | | | | | | triggered. However, the debugserver cannot get past the instruction which triggered the watchpoint. So a workaround is in place for the time being which disables the triggered watchpoint before resuming. Lots of commented out printf's remain in the source which needs to be cleaned up. WIP rdar://problem/9667960 llvm-svn: 153228
* <rdar://problem/10434005>Greg Clayton2012-03-144-6/+17
| | | | | | | Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind macros that allows us to easily compile for either C++. llvm-svn: 152698
* Send an "OK" response to the "D" (detach) packet.Jason Molenda2012-03-131-2/+1
| | | | | | | | v. http://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html#Packets the detach packet is supposed to send a reply. llvm-svn: 152671
* Pull in another plist from the old debugserver project.Jason Molenda2012-03-131-0/+15
| | | | | | Switch default compiler to clang. llvm-svn: 152600
* <rdar://problem/11030692>Greg Clayton2012-03-121-40/+34
| | | | | | SBProcess::PutSTDIN() was not working for a few builds on darwin when using debugserver. This is now fixed. llvm-svn: 152569
* Make debugserver quieter about memory read errors.Jim Ingham2012-03-091-3/+1
| | | | | | <rdar://problem/10681220> llvm-svn: 152438
* <rdar://problem/11007934> Greg Clayton2012-03-083-9/+14
| | | | | | | | On darwin, if child process of process being debugged dies due to mach exception, the debugged process will die. debugserver now only handles the mach exceptions for the task being debugged. llvm-svn: 152291
* <rdar://problem/10840355>Greg Clayton2012-03-061-4/+4
| | | | | | Fixed STDERR to not be opened as readable. Also cleaned up some of the code that implemented the file actions as some of the code was using the wrong variables, they now use the right ones (in for stdin, out for stdout, err for stderr). llvm-svn: 152102
* <rdar://problem/10986692>Greg Clayton2012-03-063-8/+29
| | | | | | Safeguard against building on next OS and run on current OS. llvm-svn: 152077
* <rdar://problem/10963899>Greg Clayton2012-03-011-3/+29
| | | | | | | Allow debugserver to be built on a newer kernel and still allow debugging on older kernels. llvm-svn: 151827
* Newly created threads are to inherit from the global debug state of the process.Johnny Chen2012-02-241-1/+11
| | | | llvm-svn: 151393
* Add a class method HasWatchpointOccurred() to inspect the "method of debug ↵Johnny Chen2012-02-242-4/+32
| | | | | | | | entry" field of the DSCR to check whether it was because of watchpoint occurred. llvm-svn: 151333
* Add comments about address word offset and the calculation of byte address ↵Johnny Chen2012-02-231-2/+18
| | | | | | select mask for WCR. llvm-svn: 151305
* Change #ifdef markers around lockdown and SpringBoardJason Molenda2012-02-2211-35/+55
| | | | | | | calls to dpeend on WITH_SPRINGBOARD and WITH_LOCKDOWN instead of __arm__. Add an RNBSocket::useFD method. llvm-svn: 151119
* Remove a ton of implicit narrowing conversions for C++11 compatibility.Benjamin Kramer2012-02-213-169/+169
| | | | llvm-svn: 151071
* Pull side effects out of asserts. Fixes debugserver with NDEBUG defined.Charles Davis2012-02-211-2/+4
| | | | llvm-svn: 151013
* Fixed an error with the 'G' packet on ARM when using the default GDBGreg Clayton2012-02-171-2/+5
| | | | | | | register set where it could get an error when trying to restore the fake "f0" - "f7" 12 byte float regs. llvm-svn: 150781
* Kill our child process that we launch when we can't get the task_for_pid()Greg Clayton2012-02-021-0/+4
| | | | | | | | otherwise we will have a launched process stopped at the entry point and it will get reparented when debugserver goes away and we won't be able to kill the process later. llvm-svn: 149622
* Snapshot of initial work for ARM watchpoint support on the debugserver.Johnny Chen2012-01-112-1/+129
| | | | | | It is incomplete and untested; passes the compilation only. llvm-svn: 147901
* Disable ARMDisassembler.framework support which was used for software single ↵Greg Clayton2012-01-102-4/+25
| | | | | | stepping. llvm-svn: 147886
* Check the return value of GetBasicInfo before dereferencing it. ↵Jim Ingham2012-01-101-2/+7
| | | | | | <rdar://problem/10568492> llvm-svn: 147883
* http://llvm.org/bugs/show_bug.cgi?id=11715Johnny Chen2012-01-061-1/+1
| | | | | | comma at end of enumerator list llvm-svn: 147633
* Always return a valid answer for qMemoryRegionInfo if the packet is supported.Greg Clayton2011-12-127-98/+90
| | | | | | | | | We will return a valid range when possible and omit the "permissions" key when the memory is not readable, writeable or executeable. This will help us know the difference between an error back from this packet and unsupported, from just "this address isn't in a valid region". llvm-svn: 146394
* Don't spam warnings about not being able to read memory at 0x0.Jim Ingham2011-12-091-1/+4
| | | | llvm-svn: 146271
* Move CPUHasAVX() prototype out of an #ifdef block of code.Jason Molenda2011-12-081-2/+2
| | | | llvm-svn: 146198
* <rdar://problem/10544202>Greg Clayton2011-12-084-35/+53
| | | | | | Fixed detection of AVX on darwin now that our kernel supports it. llvm-svn: 146135
* Expose the DNBArchMachARM::DBG typedef, specify the type with theJason Molenda2011-12-082-2/+3
| | | | | | class scoping in DumpDBGState()'s definiton. llvm-svn: 146128
* Add a typedef for arm_debug_state_t as DBG. Plus some minor comment changes.Johnny Chen2011-12-062-7/+7
| | | | llvm-svn: 145978
* Added optional calls to lldb_private::Process for getting memory region infoGreg Clayton2011-11-1812-56/+109
| | | | | | | | | | | | | | | | | | | | | | | from a process and hooked it up to the new packet that was recently added to our GDB remote executable named debugserver. Now Process has the following new calls: virtual Error Process::GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info); virtual uint32_t GetLoadAddressPermissions (lldb::addr_t load_addr); Only the first one needs to be implemented by subclasses that can add this support. Cleaned up the way the new packet was implemented in debugserver to be more useful as an API inside debugserver. Also found an error where finding a region for an address actually will pick up the next region that follows the address in the query so we also need ot make sure that the address we requested the region for falls into the region that gets returned. llvm-svn: 144976
* Remove the QAddressIsExecutable packet I added last night.Jason Molenda2011-11-0912-57/+98
| | | | | | | | | | | | | | | Add a more general purpose qMemoryRegionInfo packet which can describe various attributes about a memory region. Currently it will return the start address, size, and permissions (read, write, executable) for the memory region. It may be possible to add additional attributes in the future such as whether the region is designated as stack memory or jitted code a la vmmap. I still haven't implemented the lldb side of the code to use this packet yet so there may be unexpected behavior - but the basic implementation looks about right. I'll hook it up to lldb soon and fix any problems that crop up. llvm-svn: 144175
* Add "QAddressIsExecutable" packet to debugserver. Used to testJason Molenda2011-11-0811-1/+111
| | | | | | | | | | | | | | | | | | | | | | | | whether a given address is in an executable region of memory or not. I haven't written the lldb side that will use this packet it hasn't been tested yet but it's a simple enough bit of code. I want to have this feature available for the unwinder code. When we're stopped at an address with no valid symbol context, there are a number of questions I'd like to ask -- is the current pc value in an executable region (e.g. did they jump to unallocated/unexecutable memory? we know how to unwind from here if so.) Is the stack pointer or the frame pointer the correct register to use to find the caller's saved pc value? Once we're past the first frame we can trust things like eh_frame and ABI unwind schemes but the first frame is challenging and having a way to check potential addresses to see if they're executable or not would help narrow down the possibilities a lot. llvm-svn: 144074
* Fixed the Xcode project building of LLVM to be a bit more user friendly:Greg Clayton2011-11-042-30/+30
| | | | | | | | | | | | | | | | | | | - If you download and build the sources in the Xcode project, x86_64 builds by default using the "llvm.zip" checkpointed LLVM. - If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the Xcode project will download the right LLVM sources and build them from scratch - If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib" directory, we will use the sources you have placed in the LLDB directory. Python can now be disabled for platforms that don't support it. Changed the way the libllvmclang.a files get used. They now all get built into arch specific directories and never get merged into universal binaries as this was causing issues where you would have to go and delete the file if you wanted to build an extra architecture slice. llvm-svn: 143678
* Enabled the "printf" attribute on all debugserver logging functions and fixed Greg Clayton2011-10-2813-113/+103
| | | | | | the ensuing mayhem. llvm-svn: 143244
* Python does some bad things to the signal masks in the current process and Greg Clayton2011-10-281-2/+10
| | | | | | | | then we spawn child processes (debugserver, etc) and those bad settings get inherited. We stop this from happening by correctly mucking with the posix spawn attributes. llvm-svn: 143176
* Remove unused include of deprecated header.Benjamin Kramer2011-10-231-0/+1
| | | | llvm-svn: 142753
* Modify the delegation chain from MachThreadList -> MachThread -> ↵Johnny Chen2011-09-298-4/+78
| | | | | | | | | | | | | | DNBArchProtocol so that when the watchpoint state is changed, not only does the change propagate to all the thread instances, it also updates a global debug state, if chosen by the DNBArchProtocol derivative. Once implemented, the DNBArchProtocol derivative, also makes sure that when new thread comes along, it tries to inherit from the global debug state, if it is valid. Modify TestWatchpointMultipleThreads.py to test this functionality. llvm-svn: 140811
* Fix a bug in the current MacOSX MachThreadList::EnableHardwareWatchpoint() ↵Johnny Chen2011-09-291-22/+23
| | | | | | | | | impl so that it enables the hardware watchpoint for all existing threads. Add a test file for that. Also fix MachThreadList::DisableHardwareWatchpoint(). llvm-svn: 140757
* The r139982 patch has a bug by using the constant "x86_AVX_STATE64".Johnny Chen2011-09-191-1/+1
| | | | | | Patch by Filipe. llvm-svn: 140037
* Convert lldb::ModuleSP to use an instrusive ref counted pointer.Greg Clayton2011-09-172-2/+3
| | | | | | | | | We had some cases where getting the shared pointer for a module from the global module list was causing a performance issue when debugging with DWARF in .o files. Now that the module uses intrusive ref counts, we can easily convert any pointer to a shared pointer. llvm-svn: 139983
* Added more logging, and renamed FPR to FPU in a the register set/flavor enum.Greg Clayton2011-09-174-19/+77
| | | | llvm-svn: 139982
* Correctly handle the when we the 'G' packet fails. There wereGreg Clayton2011-09-171-1/+9
| | | | | | | cases where we were returning no error even though this packet was failing. llvm-svn: 139981
OpenPOWER on IntegriCloud