History log of /external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4e49a5bfccc0a51185eadf69b3e23f68e70f1676 12-Jul-2013 Jim Ingham <jingham@apple.com> Get debugserver to call task_set_state to prime the control registers so 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>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
ac94caa68a4a5fa4bd939d7656a6a12d8fc06a33 12-Jun-2013 Greg Clayton <gclayton@apple.com> Huge performance improvements when one breakpoint contains many locations.

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
44eb9fb021023027159df55f91c3e95384088970 22-Feb-2013 Jason Molenda <jmolenda@apple.com> Change debugserver from using the mach port number (in debugserver's
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>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
34e71efd963d7422974739519abe4223909200a3 22-Jan-2013 Greg Clayton <gclayton@apple.com> Added all of the 16 and 8 bit register variants for i386.

Modified the ARM register context to invalidate r8 - r14 when the CPSR register is modified.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
c290ba49b79c88ace8e5c58917489415e429ef01 21-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13020634>

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
3de69868b5ed5a2323e2485fff763b4d6e464216 14-Jan-2013 Jim Ingham <jingham@apple.com> Fix a logic error in the condition for a warning log message.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
851e30ec6a1b1d2c154bb7d69ed0d05b5fd14705 18-Sep-2012 Greg Clayton <gclayton@apple.com> Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
73f6b49b568f48755bb5058a3db679c3b9093682 25-Jul-2012 Jim Ingham <jingham@apple.com> Add a call to "sync" a thread state before checkpointing registers in preparation for
calling functions. This is necessary on Mac OS X, since bad things can happen if you set
the registers of a thread that's sitting in a kernel trap.

<rdar://problem/11145013>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
403648d706a1aff2c3fb150810f8824f3712e6fe 22-Jun-2012 Filipe Cabecinhas <me@filcab.net> DNBLogThreadedIf already inserts a newline

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
5693e875ac7ac8d6ce1614da40e0b56f3f58716c 02-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11320188

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.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
b51d99b70abdd53562f2cae84f627087721f2f55 01-Jun-2012 Johnny Chen <johnny.chen@apple.com> For hardware watchpoint enable/disable, in case the kernel call to set the revised debug state fails, we need to recover the local cache to the previous known state.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
137e5230e8dfb1287dd7c5eaa943a39078e1fd8d 21-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove a ton of implicit narrowing conversions for C++11 compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
f4933ed8d0fa218b5db476ecd881ec67495037f3 08-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10544202>

Fixed detection of AVX on darwin now that our kernel supports it.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
0e8147bd867e4cdaae9400f56d02c7aacd40a9b3 29-Oct-2011 Greg Clayton <gclayton@apple.com> Enabled the "printf" attribute on all debugserver logging functions and fixed
the ensuing mayhem.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
3dd956eb7ee3e93df6b68a9c7c528e92359b6026 29-Sep-2011 Johnny Chen <johnny.chen@apple.com> Modify the delegation chain from MachThreadList -> MachThread -> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
d466ebc0da3ecd12dfb8da22a8f823d370338013 19-Sep-2011 Johnny Chen <johnny.chen@apple.com> The r139982 patch has a bug by using the constant "x86_AVX_STATE64".
Patch by Filipe.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
6e0101c86555a06b3bd4cb6104b35abfae0b0057 17-Sep-2011 Greg Clayton <gclayton@apple.com> Convert lldb::ModuleSP to use an instrusive ref counted pointer.
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
2080155a1aecfa50a82760dcc4127575fb5dea67 17-Sep-2011 Greg Clayton <gclayton@apple.com> Added more logging, and renamed FPR to FPU in a the register set/flavor enum.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
36889adf3700165ae13e8defb7433f2ba80df697 17-Sep-2011 Johnny Chen <johnny.chen@apple.com> Foe x86_64/i386, piggyback the hardware index of the fired watchpoint in the 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
69b6ec840171ef30af4ed7646155bffc225002ca 14-Sep-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint WIP:

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
0a44b0d3d5686b7a16db02ad2440126631c9f31a 09-Sep-2011 Johnny Chen <johnny.chen@apple.com> Reset the debug status register, only if necessary, before we resume,
which saves unnecessary traffic to the kernel.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
d8b7248128c7e8fbeb3c3b64456e188dcebbcd13 08-Sep-2011 Johnny Chen <johnny.chen@apple.com> Added comments about exception code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
fc8909388e6f1cea591c0d56434236f8d16543e6 08-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add logic to the DNBArchImplX86_64/DNBArchImplI386::NotifyException() 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
5b4b00f5fd83d87de954d80d54fd6cc922772c19 02-Sep-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint work in progress:

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
fe98a2e6d17f0cb3ffa4a071bb43eb76c339adef 31-Aug-2011 Johnny Chen <johnny.chen@apple.com> Renaming: from IsVacantWatchpoint() to IsWatchpointVacant().


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
0875a979e39324f0b8e7597b8ba37cca9efa0d27 31-Aug-2011 Johnny Chen <johnny.chen@apple.com> Renamed the helper method to ClearWatchpointHits() for clarity of its purpose.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
9d544f43d8c1637c45562f1402012c235f648ee9 31-Aug-2011 Johnny Chen <johnny.chen@apple.com> Add a couple of helper methods to check/clear the debug status register
which contains the watchpoint hit information.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
d1119941f77f56d9660d1666c47df8f24e4408e2 31-Aug-2011 Johnny Chen <johnny.chen@apple.com> Fix the shift amount applied to size_and_rw_bits() for debug control register,
which did not take into account the hardware index.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
503b407390ee67099415d6bdac30d66c53ddcd0d 31-Aug-2011 Johnny Chen <johnny.chen@apple.com> Update comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
738fe1ba1fb9b7add6f5be5d65c6f73c944b422f 31-Aug-2011 Johnny Chen <johnny.chen@apple.com> Watchpoint work in progress: add helper methods to DNB arch impl for X86_64 to implment Enable/DisableHardwareWatchpoint.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
eb0eae254e4e2d737b9c137296197a70a1ba7f68 30-Aug-2011 Johnny Chen <johnny.chen@apple.com> Add stubs of incomplete watchpoint implementation with "FIXME" markers.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
e39356825b86cd7484097ca4c4c9f07f9ff95e2e 29-Aug-2011 Greg Clayton <gclayton@apple.com> Added the debug registers for i386 and x86_64 in preparation for watchpoints.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
db15e0cbbd18d6cd10a0197bae31aafb9e078365 16-Jul-2011 Sean Callanan <scallanan@apple.com> Added support for dynamic detection of AVX, and
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


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
9b82f8637b65c90e91c2827245550a1bb5e8df91 11-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to see block variables when looking up addresses
with the "target modules lookup --address <addr>" command. The variable
ID's, names, types, location for the address, and declaration is
displayed.

This can really help with crash logs since we get, on MacOSX at least,
the registers for the thread that crashed so it is often possible to
figure out some of the variable contents.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
997b1e82f098a8b748b490d1ae6d0bbe597a59d5 15-May-2011 Greg Clayton <gclayton@apple.com> Added generic register numbers for simple ABI argument registers and defined
the appropriate registers for arm and x86_64. The register names for the
arguments that are the size of a pointer or less are all named "arg1", "arg2",
etc. This allows you to read these registers by name:

(lldb) register read arg1 arg2 arg3
...

You can also now specify you want to see alternate register names when executing
the read register command:

(lldb) register read --alternate
(lldb) register read -A




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
5e47385b4f036f79b2acf6ea58b6fd6a40763443 09-May-2011 Jim Ingham <jingham@apple.com> Change an unconditional log to a conditional one.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
e1f50b9df1299f6b9181b5ac2699ed4a3ad38a59 04-May-2011 Greg Clayton <gclayton@apple.com> Added new OptionGroup classes for UInt64, UUID, File and Boolean values.

Removed the "image" command and moved it to "target modules". Added an alias
for "image" to "target modules".

Added some new target commands to be able to add and load modules to a target:
(lldb) target modules add <path>
(lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...]

So you can load individual sections without running a target:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000

Or you can rigidly slide an entire shared library:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000

This should improve bare board debugging when symbol files need to be slid around manually.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
4d3a89ef9d015e0cc3c12736b61d367fd98fe073 22-Mar-2011 Sean Callanan <scallanan@apple.com> Added AVX support to the Intel portion of debugserver. AVX
autodetection is not yet implemented, but the structures and
register reading/writing code are there.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
61468e816e879874ee8499ce5a1b4f1d6759b026 19-Jan-2011 Greg Clayton <gclayton@apple.com> Took the timeout for a ClangUserExpression down from a 10 second timeout to
500 ms.

Make MachThreadList more threadsafe.

Added code to make sure the thread register state was properly flushed for x86_64.

Fixed an missing return code for the current thread in the new thread suffix code.

Improved debugserver logging.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
c71899ef308e6134d1b0ca5f30cbc64414855e1a 18-Jan-2011 Greg Clayton <gclayton@apple.com> Thread safety changes in debugserver and also in the process GDB remote plugin.
I added support for asking if the GDB remote server supports thread suffixes
for packets that should be thread specific (register read/write packets) because
the way the GDB remote protocol does it right now is to have a notion of a
current thread for register and memory reads/writes (set via the "$Hg%x" packet)
and a current thread for running ("$Hc%x"). Now we ask the remote GDB server
if it supports adding the thread ID to the register packets and we enable
that feature in LLDB if supported. This stops us from having to send a bunch
of packets that update the current thread ID to some value which is prone to
error, or extra packets.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
20d338fad87eba91de65aa9bec76e01c04472848 18-Nov-2010 Greg Clayton <gclayton@apple.com> Fixed Process::Halt() as it was broken for "process halt" after recent changes
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp