summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source
Commit message (Collapse)AuthorAgeFilesLines
...
* <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
* Foe x86_64/i386, piggyback the hardware index of the fired watchpoint in the ↵Johnny Chen2011-09-172-0/+8
| | | | | | | | | | exception data sent back to the debugger. On the debugger side, use the opportunity during the StopInfoMachException::CreateStopReasonWithMachException() method to set the hardware index for the very watchpoint location. llvm-svn: 139975
* Add comment regarding method call to DNBArchProtocol::NotifyException().Johnny Chen2011-09-151-0/+1
| | | | llvm-svn: 139800
* Modify MachThread::NotifyException() to allow the arch specific protocol to ↵Johnny Chen2011-09-151-26/+5
| | | | | | | | | | process the passed in (MachException::Data &)exc first before possible reassignment of the member m_stop_exception with exc. This allows lldb to stop at the watchpoint of a simple test program. llvm-svn: 139767
* Update I386 DNB impl to fix the same errors as DNBArchImplX86_64: ('==' ↵Johnny Chen2011-09-131-12/+12
| | | | | | instead of '=') and (by value instead of by reference). llvm-svn: 139667
* Watchpoint WIP:Johnny Chen2011-09-131-12/+12
| | | | | | | | | | | | | | | | | o WatchpointLocationList: Add a GetListMutex() method. o WatchpointLocation: Fix Dump() method where there was an extra % in the format string. o Target.cpp: Add implementation to CreateWatchpointLocation() to create and enable a watchpoint. o DNBArchImplX86_64.cpp: Fix bugs in SetWatchpoint()/ClearWatchpoint() where '==' was used, instead of '=', to assign/reset the data break address to a debug register. Also fix bugs where a by reference debug_state should have been used, not by value. llvm-svn: 139666
* Reset the debug status register, only if necessary, before we resume,Johnny Chen2011-09-092-9/+27
| | | | | | which saves unnecessary traffic to the kernel. llvm-svn: 139410
* Basic infrastructure code to exploit malloc stack logging as available on ↵Enrico Granata2011-09-093-0/+244
| | | | | | Mac OS X to track the allocation history of pointers on the target process llvm-svn: 139337
* Added comments about exception code.Johnny Chen2011-09-082-0/+4
| | | | llvm-svn: 139294
* Add logic to the DNBArchImplX86_64/DNBArchImplI386::NotifyException() ↵Johnny Chen2011-09-084-27/+95
| | | | | | | | | | | | | callback method in order to distinguish the real single step exception from a watchpoint exception which uses the same exc_type of EXC_BREAKPOINT and exc_code of EXC_I386_SGL. This is done by checking the debug status register to find out whether the watchpoint data break event has fired, and, if yes, stuff the data break address into the exception's exc_sub_code field on the debugserver side for lldb to consume on the other end. llvm-svn: 139274
* Add logic to MachThreadList::GetThreadID() for the use case of setting a ↵Johnny Chen2011-09-072-6/+18
| | | | | | | | | | | | | watchpoint (MachThreadList::EnableHardwareWatchpoint()) where the watchpoint is not associated with a thread and the current thread, if set, is returned, otherwise we return the first thread. Plus minor change to RNBRemote::HandlePacket_z() to use the existing macros to check the validity of break_id/watch_id. llvm-svn: 139246
* Minor change: compare the return val of DNBWatchpointSet() against ↵Johnny Chen2011-09-071-2/+2
| | | | | | | | INVALID_NUB_WATCH_ID to determine its validity. llvm-svn: 139209
* DNBBreakpoint::SetEnabled() should take a bool, not a uint32_t, as its input ↵Johnny Chen2011-09-063-7/+9
| | | | | | | | | argument. Plus for watchpoint related functions, add new macros INVALID_NUB_WATCH_ID and NUB_WATCH_ID_IS_VALID and use them, instead. llvm-svn: 139163
* Watchpoint work in progress:Johnny Chen2011-09-025-0/+71
| | | | | | | | | | | Add a virtual method GetHardwareWatchpointHit() to the DNBArchProtocol base class which consults the architecture to return the watchpoint hit; otherwise return an invalid index. Add impl. of the method to X86_64 and I386 subclasses, plus reset the debug status register before we resume execution of the inferior thread. llvm-svn: 139034
* Renaming: from IsVacantWatchpoint() to IsWatchpointVacant().Johnny Chen2011-08-314-8/+8
| | | | llvm-svn: 138907
* Renamed the helper method to ClearWatchpointHits() for clarity of its purpose.Johnny Chen2011-08-314-4/+4
| | | | llvm-svn: 138899
* Add a couple of helper methods to check/clear the debug status registerJohnny Chen2011-08-314-0/+50
| | | | | | which contains the watchpoint hit information. llvm-svn: 138881
* Fix the shift amount applied to size_and_rw_bits() for debug control register,Johnny Chen2011-08-312-2/+4
| | | | | | which did not take into account the hardware index. llvm-svn: 138867
* Update comments.Johnny Chen2011-08-312-4/+4
| | | | llvm-svn: 138863
OpenPOWER on IntegriCloud