summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h
Commit message (Collapse)AuthorAgeFilesLines
* typedef enum -> enumFangrui Song2019-05-141-4/+4
| | | | | | | | Reviewed By: labath Differential Revision: https://reviews.llvm.org/D61883 llvm-svn: 360654
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Upstreaming avx512 register support in debugserver. These changesJason Molenda2018-03-061-0/+8
| | | | | | | | | | | | | | | | | | | were originally written by Chris Bieneman, they've undergone a number of changes since then. Also including the debugserver bridgeos support, another arm environment that runs Darwin akin to ios. These codepaths are activated when running in a bridgeos environment which we're not set up to test today. There's additional (small) lldb changes to handle bridgeos binaries that still need to be merged up. Tested on a darwin system with avx512 hardware and without. <rdar://problem/36424951> llvm-svn: 326756
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-226/+200
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Fix warnings.Bruce Mitchener2015-07-221-1/+1
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11404 llvm-svn: 242913
* Fix debugserver warnings on MacOSX.Greg Clayton2015-03-091-2/+2
| | | | llvm-svn: 231692
* Fix cmake build issues on Darwin.Todd Fiala2014-03-131-1/+0
| | | | llvm-svn: 203850
* Fixes to get the arm native debugserver building again.Jason Molenda2013-11-211-2/+2
| | | | | | Fix a small typeo in the i386/x86_64 debugserver plugins. llvm-svn: 195308
* <rdar://problem/15172417>Greg Clayton2013-11-131-1/+10
| | | | | | | | | | | | | | | 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-091-0/+2
| | | | | | | | | | | | - 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
* Get debugserver to call task_set_state to prime the control registers so ↵Jim Ingham2013-07-111-8/+3
| | | | | | | | | | | | | 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
* Properly initialize the member fields used for hardware watchpoint ↵Johnny Chen2012-06-021-1/+3
| | | | | | transaction management. llvm-svn: 157878
* rdar://problem/11320188Johnny Chen2012-06-011-1/+8
| | | | | | | | | Designate MachThreadList as a transaction coordinator when doing Enable/DisableHardwareWatchpoint on the list of threads. In case the operation (iterating on the threads and doing enable/disable) fails in the middle, we rollback the already enabled/disabled threads to their checkpointed states. When all the threads succeed in enable/disable, we ask each thread to finsih the transaction and commit the change of the debug state. llvm-svn: 157858
* <rdar://problem/10544202>Greg Clayton2011-12-081-16/+1
| | | | | | Fixed detection of AVX on darwin now that our kernel supports it. llvm-svn: 146135
* Modify the delegation chain from MachThreadList -> MachThread -> ↵Johnny Chen2011-09-291-0/+5
| | | | | | | | | | | | | | 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
* Added more logging, and renamed FPR to FPU in a the register set/flavor enum.Greg Clayton2011-09-171-1/+1
| | | | llvm-svn: 139982
* Add logic to the DNBArchImplX86_64/DNBArchImplI386::NotifyException() ↵Johnny Chen2011-09-081-1/+2
| | | | | | | | | | | | | 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
* Watchpoint work in progress:Johnny Chen2011-09-021-0/+1
| | | | | | | | | | | 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-311-1/+1
| | | | llvm-svn: 138907
* Renamed the helper method to ClearWatchpointHits() for clarity of its purpose.Johnny Chen2011-08-311-1/+1
| | | | llvm-svn: 138899
* Add a couple of helper methods to check/clear the debug status registerJohnny Chen2011-08-311-0/+2
| | | | | | which contains the watchpoint hit information. llvm-svn: 138881
* Watchpoint work in progress: add helper methods to DNB arch impl for I386 to ↵Johnny Chen2011-08-311-3/+2
| | | | | | implment Enable/DisableHardwareWatchpoint. llvm-svn: 138847
* Watchpoint work in progress: add helper methods to DNB arch impl for X86_64 ↵Johnny Chen2011-08-311-0/+5
| | | | | | to implment Enable/DisableHardwareWatchpoint. llvm-svn: 138844
* Add stubs of incomplete watchpoint implementation with "FIXME" markers.Johnny Chen2011-08-301-0/+4
| | | | llvm-svn: 138790
* Added the debug registers for i386 and x86_64 in preparation for watchpoints.Greg Clayton2011-08-291-7/+22
| | | | llvm-svn: 138770
* Fixed a problem where the HasAVX() code inSean Callanan2011-08-091-7/+0
| | | | | | | | debugserver did not back up %ebx/%rbx, even though it was being clobbered by the CPUID instruction. llvm-svn: 137131
* The "bool HasAVX()" function doesn't backup and restore theGreg Clayton2011-08-091-0/+7
| | | | | | | | cpu registers it uses and it crashes the release version of debugserver. We just get lucky in Debug builds. Until this is fixed I am disabling AVX detection to avoid the crashes. llvm-svn: 137113
* Added support for dynamic detection of AVX, andSean Callanan2011-07-161-2/+3
| | | | | | | | | | | | | | | | | | | | fixed a few bugs that revealed. Now the "register read" command should show AVX registers (ymm0-ymm15) on Mac OS X platforms that support them. When testing this on Mac OS X, run debugserver manually, like this: debugserver --native-regs localhost:1111 /path/to/executable Then lldb /path/to/executable ... (lldb) process connect connect://localhost:1111 llvm-svn: 135331
* Added AVX support to the Intel portion of debugserver. AVXSean Callanan2011-03-221-13/+41
| | | | | | | autodetection is not yet implemented, but the structures and register reading/writing code are there. llvm-svn: 128111
* Fixed Process::Halt() as it was broken for "process halt" after recent changesGreg Clayton2010-11-181-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to the DoHalt down in ProcessGDBRemote. I also moved the functionality that was in ProcessGDBRemote::DoHalt up into Process::Halt so not every class has to implement a tricky halt/resume on the internal state thread. The functionality is the same as it was before with two changes: - when we eat the event we now just reuse the event we consume when the private state thread is paused and set the interrupted bool on the event if needed - we also properly update the Process::m_public_state with the state of the event we consume. Prior to this, if you issued a "process halt" it would eat the event, not update the process state, and then produce a new event with the interrupted bit set and send it. Anyone listening to the event would get the stopped event with a process that whose state was set to "running". Fixed debugserver to not have to be spawned with the architecture of the inferior process. This worked fine for launching processes, but when attaching to processes by name or pid without a file in lldb, it would fail. Now debugserver can support multiple architectures for a native debug session on the current host. This currently means i386 and x86_64 are supported in the same binary and a x86_64 debugserver can attach to a i386 executable. This change involved a lot of changes to make sure we dynamically detect the correct registers for the inferior process. llvm-svn: 119680
* Another patch from Jean-Daniel. Thanks.Johnny Chen2010-09-281-2/+2
| | | | | | Error in dbg server -> MachProcess::SetProcessID() and misc changes to make clang++ happy. llvm-svn: 114962
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+199
llvm-svn: 105619
OpenPOWER on IntegriCloud