History log of /external/lldb/tools/debugserver/source/RNBRemote.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
63a2648720ab1c245dbafbf00884dd1e1ba22c28 25-Jun-2013 Jason Molenda <jmolenda@apple.com> If debugserver fails to interrogate the inferior process CPU type
for any reason, use debugserver own's cputype as a best guess when
we reply to the debugger's qProcessInfo packet or when initializing
our register tables.
<rdar://problem/13406879>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
4d4ff9e8f7746ba1b1d597512b7cb711350c0206 21-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13892516>

LLDB can now debug across calls to exec when the architecture changes from say i386 to x86_64 (on darwin).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
81881d210e18eb8b1d5a638f575bf56c8b5676fe 03-Apr-2013 Jason Molenda <jmolenda@apple.com> Remove a bit of code duplication in RNBRemote::HandlePacket_qProcessInfo -
call DNBProcessGetCPUType() to get the cputype of the process we're debugging.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
afe3763f13dc122006ad6b5ed377e789e09c8715 03-Apr-2013 Jason Molenda <jmolenda@apple.com> Fix another old usage of GetCurrentThread() to get a mach port
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.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
f44636bb5faa8ebf003c18e2ff20520bf7e5e938 23-Mar-2013 Jason Molenda <jmolenda@apple.com> Add two additional DNBLog's in places where we're about to kill
off the inferior process so we stand a better chance of understanding
what caused us to send a PT_KILL.
<rdar://problem/12720340>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
b649f7f34951e7495b33dbb4c2e240866941bb37 13-Mar-2013 Jason Molenda <jmolenda@apple.com> Various fixes for armv7 floating point/vector register support.
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>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
cec43ab7f30085ac7f65a26a58b956a69e363a3b 04-Mar-2013 Han Ming Ong <hanming@apple.com> <rdar://problem/13338758>

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.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
151e3be552fea65cc4f03eaa1c425f793266fe56 14-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12693921>

Rename the monitor command from "qCmd" (incorrect) to "qRcmd".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
9c81c3322b68e49530b5c2180f8a0db8c6a494fb 02-Feb-2013 Greg Clayton <gclayton@apple.com> Added support for the qCmd monitor packet command. Currently it can only do:

set logfile=<path>
set logmask=<num>

But this opens the door for us to do much more.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
5dd1a287ecd9e3dbfda406f2dbc77e29fe5a5058 23-Jan-2013 Jason Molenda <jmolenda@apple.com> Remove a compile time warning in RNBRemote::HandlePacket_qProcessInfo
for non-x86 builds.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
b5ebe11afa73728a49d56e9fcc8c9622638ee094 23-Jan-2013 Jason Molenda <jmolenda@apple.com> Change the container-regs kv pair in the qRegsiterInfo
reply to be hex encoded, not decimal.

Fix the whitespace in the container-regs/invalidate-regs
documentation, fix one ambiguous hex/decimal number in an
example.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
679ba16fbf2be2ef93d3c654e2639ab0cb32c598 22-Jan-2013 Greg Clayton <gclayton@apple.com> Changed the register number lists for the qRegisterInfo packet response to be raw hex to match all other register reading and writing APIs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
245dc927c0fc10aa4d8dda2a43a8bf35ffff53f9 16-Jan-2013 Han Ming Ong <hanming@apple.com> <rdar://problem/13019628>

Prevent profiling from working on older debugserver. Just a simple renaming since the caller is prepared to handle the ‘unimplemented’ answer.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
1f1a683fe4fb3fa4d41368860b75e56bfdbdd239 15-Jan-2013 Jason Molenda <jmolenda@apple.com> Add a few other missing LOG_ types to set_logging() in RNBRemote.cpp;
document some simple bourne shell to re-generate these from the DNBDefs.h
header file in case this needs to be done again in the future.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
8ec8d64110a5879e4e544dc09e9849498fecb044 12-Jan-2013 Jason Molenda <jmolenda@apple.com> Recognize LOG_WATCHPOINTS in the QSetLogging gdb-remote packet.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
fe555673aebe745e5c35412969639ae348ce50d4 19-Dec-2012 Jason Molenda <jmolenda@apple.com> <rdar://problem/11961650>

Update the debugserver "qProcessInfo" implementation to return the
cpu type, cpu subtype, OS and vendor information just like qHostInfo
does so lldb can create an ArchSpec based on the returned values.

Add a new GetProcessArchitecture to GDBRemoteCommunicationClient akin
to GetHostArchitecture. If the qProcessInfo packet is supported,
GetProcessArchitecture will return the cpu type / subtype of the
process -- e.g. a 32-bit user process running on a 64-bit x86_64 Mac
system.

Have ProcessGDBRemote set the Target's architecture based on the
GetProcessArchitecture when we've completed an attach/launch/connect.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
2b67961c05a0296e7773875a7a6f2cb82fa5c575 18-Dec-2012 Jason Molenda <jmolenda@apple.com> Add a new qProcessInfo packet to debugserver.
This can be used by lldb to ask for information
about the process debugserver is attached to/launched.
Particularly useful on a 64-bit x86 Mac system which
can run 32-bit or 64-bit user-land processes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
f14269add7f6fb84da7ccfd866f8e9f7e81068be 29-Nov-2012 Han Ming Ong <hanming@apple.com> <rdar://problem/12780259>

Prevent async and sync calls to get profile data from stomping on each other.
At the same time, don't use '$' as end delimiter per chunk of profile data.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
fb9cee64303d36d6fe5d87e63dd8701d1ddb70a9 17-Nov-2012 Han Ming Ong <hanming@apple.com> <rdar://problem/12720514> Sub-TLF: Provide service to profile the inferior

This allows client to query profiling states on the inferior.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
bb1af9ce3e25eae9916f85cb9a0c82e291c20bb4 11-Sep-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11935492>

Fixed an issue where if we call "Process::Destroy()" and the process is running, if we try to stop it and get "exited" back as the stop reason, we will still deliver the exited event.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
3a458eb1e413d39546b664813bba9f9ac292357e 20-Jul-2012 Jim Ingham <jingham@apple.com> Add "vAttachOrWait" to debugserver, so you can implement "attach to the process if it exists OR wait for it" without race conditions. Use that in lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
4a379b1194f3e6b308cd6e80b45d6ca5dd0aafd7 17-Jul-2012 Greg Clayton <gclayton@apple.com> Ran the static analyzer on the codebase and found a few things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
add4b95f40791afddb360ddd4e431c96432ac6f6 16-Jul-2012 Jim Ingham <jingham@apple.com> Fix an off by one error when handling a packet where our read buffer size truncates the first chunk of the packet
between the two chars representing the checksum.

<rdar://problem/11882074>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
7de2a3b03f37987c67f142ce328cc2484c831468 14-Jul-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11782789> Changes to the watchpoint implementation on ARM so that we single-step before stopping at the WP. This is necessary because on ARM the WP triggers before the opcode is actually executed, so we would be unable to continue since we would keep hitting the WP. We work around this by disabling the WP, single stepping and then putting the WP back in place.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
2530d95bc55d78f8e5f08fa0371e91b6f88ccdd5 29-Jun-2012 Greg Clayton <gclayton@apple.com> Spelling fixes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
7cbdcfb0cefcfd877b507ff2d83e51a1bde3fcc7 23-May-2012 Johnny Chen <johnny.chen@apple.com> Add the capability to display the number of supported hardware watchpoints to the "watchpoint list" command.

Add default Process::GetWatchpointSupportInfo() impl which returns an error of "not supported".
Add "qWatchpointSupportInfo" packet to the gdb communication layer to support this, and modify TestWatchpointCommands.py to test it.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
b170aee2daacc83e3d71c3e3acc9d56c89893a7b 08-May-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11358639>

Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples.

Also make the selection process for auto selecting platforms based off of an arch much better.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
a1f645e66c8e52ef287b9ab42f521eb57bcf217d 10-Apr-2012 Greg Clayton <gclayton@apple.com> Added a new packet to our GDB remote protocol:

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
1ffff0f8f7b66d457694e1111578e6f0c0a50614 13-Mar-2012 Jason Molenda <jmolenda@apple.com> Send an "OK" response to the "D" (detach) packet.

v. http://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html#Packets

the detach packet is supposed to send a reply.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
75a7c755bd203e13a8f0186512f28b3e1be470b2 17-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed an error with the 'G' packet on ARM when using the default GDB
register set where it could get an error when trying to restore the
fake "f0" - "f7" 12 byte float regs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
1308a9555ad586ff03c8f97bcfe7f3212d06bc86 12-Dec-2011 Greg Clayton <gclayton@apple.com> Always return a valid answer for qMemoryRegionInfo if the packet is supported.
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".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
a9385537809ef342c843c5ab972e513742652047 18-Nov-2011 Greg Clayton <gclayton@apple.com> Added optional calls to lldb_private::Process for getting memory region info
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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
bcf07b37b3e3cd37ac74cc42c12009f130f185a3 09-Nov-2011 Jason Molenda <jmolenda@apple.com> Remove the QAddressIsExecutable packet I added last night.

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
dc8ff30b6dbe28c851e99712e20c1358eca4709d 08-Nov-2011 Jason Molenda <jmolenda@apple.com> Add "QAddressIsExecutable" packet to debugserver. Used to test
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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
48e83736a4c1782b3d2beae1d699adf664f1f390 17-Sep-2011 Greg Clayton <gclayton@apple.com> Correctly handle the when we the 'G' packet fails. There were
cases where we were returning no error even though this packet
was failing.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
2c45f5425f35af30efb4f2751890decf292e8eaf 07-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add logic to MachThreadList::GetThreadID() for the use case of setting a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
390a0e70ed4d00e34be40401dea4b63c4630741e 07-Sep-2011 Johnny Chen <johnny.chen@apple.com> Minor change: compare the return val of DNBWatchpointSet() against INVALID_NUB_WATCH_ID
to determine its validity.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
0605942377d954195c7c7b0a79c831233fb4e9ef 29-Aug-2011 Johnny Chen <johnny.chen@apple.com> Remove an extra break statement.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
178e101a9e53ba2cb458c20702a98d76dd851c87 11-Aug-2011 Johnny Chen <johnny.chen@apple.com> Incremental fixes of issues found by Xcode static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
d05213b79411eb12bcd75f07d33f5245c07edb0d 26-Jul-2011 Jason Molenda <jmolenda@apple.com> RNBRemote.cpp, RNBRemote.h: Add a new qGetPid packet which returns
the pid of the process currently being debugged by debugserer in
hex, or 0 if unavailable.

This is effectively the same as the qC packet but that packet is
not clear in either its documentation or implementation (in gdb et al)
as to whether it is intended to return a pid or a thread id. qGetPid
is unambiguous.

If qGetPid is unimplemented in the remote debugserver, the debugger may
try qC and see what kind of value is returned..


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
04f081d0572d046456009ce8273ab2ff0a985219 25-Jun-2011 Jason Molenda <jmolenda@apple.com> Add support for a QEnvironmentHexEncoded packet which takes its
arguments in hex-encoded form instead of the old QEnvironment packet
which takes them as plain-text strings. Environment variables
containing remote protocol special chars like '#' would fail to set
with QEnvironment.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
04d397c5e251eaa5f520dbe6381d2a82303350e1 23-May-2011 Greg Clayton <gclayton@apple.com> Fixed an issue in the EmulateInstructionARM there the IT opcode was trying to
parse NOP instructions. I added the new table entries for the NOP for the
plain NOP, Yield, WFE, WFI, and SEV variants. Modified the opcode emulation
function EmulateInstructionARM::EmulateMOVRdSP(...) to notify us when it is
creating a frame. Also added an abtract way to detect the frame pointer
register for both the standard ARM ABI and for Darwin.

Fixed GDBRemoteRegisterContext::WriteAllRegisterValues(...) to correctly be
able to individually write register values back if case the 'G' packet is
not implemented or returns an error.

Modified the StopInfoMachException to "trace" stop reasons. On ARM we currently
use the BVR/BCR register pairs to say "stop when the PC is not equal to the
current PC value", and this results in a EXC_BREAKPOINT mach exception that
has 0x102 in the code.

Modified debugserver to create the short option string from long option
definitions to make sure it doesn't get out of date. The short option string
was missing many of the newer short option values due to a modification of
the long options defs, and not modifying the short option string.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
5a26910ed231503d2a7a71365a44e379a994f4e6 22-May-2011 Greg Clayton <gclayton@apple.com> Added functions to lldb_private::Address to set an address from a load address
and set the address as an opcode address or as a callable address. This is
needed in various places in the thread plans to make sure that addresses that
might be found in symbols or runtime might already have extra bits set (ARM/Thumb).
The new functions are:

bool
Address::SetCallableLoadAddress (lldb::addr_t load_addr, Target *target);

bool
Address::SetOpcodeLoadAddress (lldb::addr_t load_addr, Target *target);

SetCallableLoadAddress will initialize a section offset address if it can,
and if so it might possibly set some bits in the address to make the address
callable (bit zero might get set for ARM for Thumb functions).

SetOpcodeLoadAddress will initialize a section offset address using the
specified target and it will strip any special address bits if needed
depending on the target.

Fixed the ABIMacOSX_arm::GetArgumentValues() function to require arguments
1-4 to be in the needed registers (previously this would incorrectly fallback
to the stack) and return false if unable to get the register values. The
function was also modified to first look for the generic argument registers
and then fall back to finding the registers by name.

Fixed the objective trampoline handler to use the new Address::SetOpcodeLoadAddress
function when needed to avoid address mismatches when trying to complete
steps into objective C methods. Make similar fixes inside the
AppleThreadPlanStepThroughObjCTrampoline::ShouldStop() function.

Modified ProcessGDBRemote::BuildDynamicRegisterInfo(...) to be able to deal with
the new generic argument registers.

Modified RNBRemote::HandlePacket_qRegisterInfo() to handle the new generic
argument registers on the debugserver side.

Modified DNBArchMachARM::NumSupportedHardwareBreakpoints() to be able to
detect how many hardware breakpoint registers there are using a darwin sysctl.
Did the same for hardware watchpoints in
DNBArchMachARM::NumSupportedHardwareWatchpoints().




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
a4582404fa50f89485e69a17281673147217d64f 08-May-2011 Greg Clayton <gclayton@apple.com> Fixed not being able to launch the i386 slice of a universal binary by adding
a new "QLaunchArch:<arch-name>" where <arch-name> is the architecture name.
This allows us to remotely launch a debugserver and then set the architecture
for the binary we will launch.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
24bc5d9bfad2a1c562c27e7cf37e1c56d85c45e7 30-Mar-2011 Greg Clayton <gclayton@apple.com> Many improvements to the Platform base class and subclasses. The base Platform
class now implements the Host functionality for a lot of things that make
sense by default so that subclasses can check:

int
PlatformSubclass::Foo ()
{
if (IsHost())
return Platform::Foo (); // Let the platform base class do the host specific stuff

// Platform subclass specific code...
int result = ...
return result;
}

Added new functions to the platform:

virtual const char *Platform::GetUserName (uint32_t uid);
virtual const char *Platform::GetGroupName (uint32_t gid);

The user and group names are cached locally so that remote platforms can avoid
sending packets multiple times to resolve this information.

Added the parent process ID to the ProcessInfo class.

Added a new ProcessInfoMatch class which helps us to match processes up
and changed the Host layer over to using this new class. The new class allows
us to search for processs:
1 - by name (equal to, starts with, ends with, contains, and regex)
2 - by pid
3 - And further check for parent pid == value, uid == value, gid == value,
euid == value, egid == value, arch == value, parent == value.

This is all hookup up to the "platform process list" command which required
adding dumping routines to dump process information. If the Host class
implements the process lookup routines, you can now lists processes on
your local machine:

machine1.foo.com % lldb
(lldb) platform process list
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME
====== ====== ========== ========== ========== ========== ======================== ============================
99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge
94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker
94852 244 username usergroup username usergroup x86_64-apple-darwin Safari
94727 244 username usergroup username usergroup x86_64-apple-darwin Xcode
92742 92710 username usergroup username usergroup i386-apple-darwin debugserver


This of course also works remotely with the lldb-platform:

machine1.foo.com % lldb-platform --listen 1234

machine2.foo.com % lldb
(lldb) platform create remote-macosx
Platform: remote-macosx
Connected: no
(lldb) platform connect connect://localhost:1444
Platform: remote-macosx
Triple: x86_64-apple-darwin
OS Version: 10.6.7 (10J869)
Kernel: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386
Hostname: machine1.foo.com
Connected: yes
(lldb) platform process list
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME
====== ====== ========== ========== ========== ========== ======================== ============================
99556 244 username usergroup username usergroup x86_64-apple-darwin trustevaluation
99548 65539 username usergroup username usergroup x86_64-apple-darwin lldb
99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge
94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker
94852 244 username usergroup username usergroup x86_64-apple-darwin Safari

The lldb-platform implements everything with the Host:: layer, so this should
"just work" for linux. I will probably be adding more stuff to the Host layer
for launching processes and attaching to processes so that this support should
eventually just work as well.

Modified the target to be able to be created with an architecture that differs
from the main executable. This is needed for iOS debugging since we can have
an "armv6" binary which can run on an "armv7" machine, so we want to be able
to do:

% lldb
(lldb) platform create remote-ios
(lldb) file --arch armv7 a.out

Where "a.out" is an armv6 executable. The platform then can correctly decide
to open all "armv7" images for all dependent shared libraries.

Modified the disassembly to show the current PC value. Example output:

(lldb) disassemble --frame
a.out`main:
0x1eb7: pushl %ebp
0x1eb8: movl %esp, %ebp
0x1eba: pushl %ebx
0x1ebb: subl $20, %esp
0x1ebe: calll 0x1ec3 ; main + 12 at test.c:18
0x1ec3: popl %ebx
-> 0x1ec4: calll 0x1f12 ; getpid
0x1ec9: movl %eax, 4(%esp)
0x1ecd: leal 199(%ebx), %eax
0x1ed3: movl %eax, (%esp)
0x1ed6: calll 0x1f18 ; printf
0x1edb: leal 213(%ebx), %eax
0x1ee1: movl %eax, (%esp)
0x1ee4: calll 0x1f1e ; puts
0x1ee9: calll 0x1f0c ; getchar
0x1eee: movl $20, (%esp)
0x1ef5: calll 0x1e6a ; sleep_loop at test.c:6
0x1efa: movl $12, %eax
0x1eff: addl $20, %esp
0x1f02: popl %ebx
0x1f03: leave
0x1f04: ret

This can be handy when dealing with the new --line options that was recently
added:

(lldb) disassemble --line
a.out`main + 13 at test.c:19
18 {
-> 19 printf("Process: %i\n\n", getpid());
20 puts("Press any key to continue..."); getchar();
-> 0x1ec4: calll 0x1f12 ; getpid
0x1ec9: movl %eax, 4(%esp)
0x1ecd: leal 199(%ebx), %eax
0x1ed3: movl %eax, (%esp)
0x1ed6: calll 0x1f18 ; printf

Modified the ModuleList to have a lookup based solely on a UUID. Since the
UUID is typically the MD5 checksum of a binary image, there is no need
to give the path and architecture when searching for a pre-existing
image in an image list.

Now that we support remote debugging a bit better, our lldb_private::Module
needs to be able to track what the original path for file was as the platform
knows it, as well as where the file is locally. The module has the two
following functions to retrieve both paths:

const FileSpec &Module::GetFileSpec () const;
const FileSpec &Module::GetPlatformFileSpec () const;





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
e86cbb9ef128db87cf904e330b2edfc15566bacd 22-Mar-2011 Greg Clayton <gclayton@apple.com> Abtracted the innards of lldb-core away from the SB interface. There was some
overlap in the SWIG integration which has now been fixed by introducing
callbacks for initializing SWIG for each language (python only right now).
There was also a breakpoint command callback that called into SWIG which has
been abtracted into a callback to avoid cross over as well.

Added a new binary: lldb-platform

This will be the start of the remote platform that will use as much of the
Host functionality to do its job so it should just work on all platforms.
It is pretty hollowed out for now, but soon it will implement a platform
using the GDB remote packets as the transport.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
4fdf7602bedd8be648f3c549074cf13d90a05f03 20-Mar-2011 Greg Clayton <gclayton@apple.com> Split all of the core of LLDB.framework/lldb.so into a
static archive that can be linked against. LLDB.framework/lldb.so
exports a very controlled API. Splitting the API into a static
library allows other tools (debugserver for now) to use the power
of the LLDB debugger core, yet not export it as its API is not
portable or maintainable. The Host layer and many of the other
internal only APIs can now be statically linked against.

Now LLDB.framework/lldb.so links against "liblldb-core.a" instead
of compiling the .o files only for the shared library. This fix
is only for compiling with Xcode as the Makefile based build already
does this.

The Xcode projecdt compiler has been changed to LLVM. Anyone using
Xcode 3 will need to manually change the compiler back to GCC 4.2,
or update to Xcode 4.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
a2f7423310044cf76d8d52aa9153b7fd8b226b49 24-Feb-2011 Greg Clayton <gclayton@apple.com> Fixed CommandReturnObject::SetImmediateErrorFile() to set the correct stream.

Modifed lldb_private::Process to be able to handle connecting to a remote
target that isn't running a process. This leaves lldb_private::Process in the
eStateConnected state from which we can then do an attach or launch.

Modified ProcessGDBRemote to be able to set stdin, stdout, stderr, working
dir, disable ASLR and a few other settings down by using new GDB remote
packets. This allows us to keep all of our current launch flags and settings
intact and still be able to communicate them over to the remote GDB server.
Previously these were being sent as arguments to the debugserver binary that
we were spawning. Also modified ProcessGDBRemote to handle losing connection
to the remote GDB server and always exit immediately. We do this by watching
the lldb_private::Communication event bit for the read thread exiting in the
ProcessGDBRemote async thread.

Added support for many of the new 'Q' packets for setting stdin, stdout,
stderr, working dir and disable ASLR to the GDBRemoteCommunication class for
easy accesss.

Modified debugserver for all of the new 'Q' packets and also made it so that
debugserver always exists if it loses connection with the remote debugger.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
75c703dd8b492bad25a987b96853626641ae7246 16-Feb-2011 Greg Clayton <gclayton@apple.com> The DynamicLoader plug-in instance now lives up in lldb_private::Process where
it should live and the lldb_private::Process takes care of managing the
auto pointer to the dynamic loader instance.

Also, now that the ArchSpec contains the target triple, we are able to
correctly set the Target architecture in DidLaunch/DidAttach in the subclasses,
and then the lldb_private::Process will find the dynamic loader plug-in
by letting the dynamic loader plug-ins inspect the arch/triple in the target.

So now the ProcessGDBRemote plug-in is another step closer to be purely
process/platform agnostic.

I updated the ProcessMacOSX and the ProcessLinux plug-ins accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
395fc33dc4b06c048ed35047ec461bc092ef2df3 15-Feb-2011 Greg Clayton <gclayton@apple.com> Made lldb_private::ArchSpec contain much more than just an architecture. It
now, in addition to cpu type/subtype and architecture flavor, contains:
- byte order (big endian, little endian)
- address size in bytes
- llvm::Triple for true target triple support and for more powerful plug-in
selection.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
db2bab463047edba4b01da1fcaf70f15e778095e 27-Jan-2011 Greg Clayton <gclayton@apple.com> Finally tracked down the racy condition that would hose up our debug
sessions: When continue packet has been sent and an interrupt packet was
quickly sent, it would get read at the same time:

$c#00\x03

There was an error where the packet end index was always being computed
incorrectly by debugserver, but it wouldn't matter if there weren't extra
bytes on the end (the hex \x03 interrupt byte in this case). The first
'$' last 3 bytes of the data in the packet buffer were being trimmed
(trying to trim the '#' + checksum (#XX)) which made:

c#

And this would then be passed to the handle routine for the 'c' packet which
would see an extra character at the end and assume it was going to be in the
form c[addr] where "[addr]" was a hex address to resume at and this would
result in a malformed packet response. This is now fixed and everything works
great.

Another issue was issuing async packets correctly by doing correct handshakes
between the thread that wants to send the async packet, and the thread that
is tracking the current run.

Added a write lock to the communication class as well to make sure you never
get two threads trying to write data at the same time. This wasn't happening,
but it is a good idea to make sure it doesn't.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
72e1c782ba1e4226da37af4722af608de9f39408 23-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed an issue in "SBError SBProcess::Destroy ()" where it wasn't properly
checking the validity of the shared pointer prior to using it.

Fixed the GDB remote plug-in to once again watch for a reply from the "k"
packet, and fixed the logic to make sure the thread requesting the kill
and the async thread play nice (and very quickly) by synchronizing the
packet sending and reply. I also tweaked some of the shut down packet
("k" kill, "D" detach, and the halt packet) to make sure they do the right
thing.

Fixed "StateType Process::WaitForProcessStopPrivate (...)" to correctly pass
the timeout along to WaitForStateChangedEventsPrivate() and made the function
behave correctly with respect to timing out.

Added separate STDIN, STDOUT, and STDERR support to debugserver. Also added
the start of being able to set the working directory for the inferior process.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
a4881d04b4f367c67e34e8040e1257fc222a8b41 22-Jan-2011 Greg Clayton <gclayton@apple.com> Sped up the shutdown time on MacOSX by quite a bit by making sure any
threads that we spawn let us know when they are going away and that we
don't timeout waiting for a message from threads that have gone away.
We also now don't expect the "k" packet (kill) to send a response. This
greatly speeds up debugger shutdown performance. The test suite now runs
quite a bit faster.

Added a fix to the variable display code that fixes the display of
base classes. We were assuming the virtual or normal base class offsets
were being given in bit sizes, but they were being given as character
sizes, so we needed to multiply the offset by 8. This wasn't affecting
the expression parser, but it was affecting the correct display of C++
class base classes and all of their children.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.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/RNBRemote.cpp
4862fa2f3db6967464cd65a2c77b2e55de3da5ff 08-Jan-2011 Greg Clayton <gclayton@apple.com> Modified the stop reply packet to be able to send the thread name using the
new "hexname" key for the "key:value;" duple that is part of the packet. This
allows for thread names to contain special characters such as $ # : ; + -

Debugserver now detects if the thread name contains special characters and
sends the chars in hex format if needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp
0561f3da5dd365d1f75c0a6888293eaf1695ccd1 26-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed vAttachWait by fixing a missed "else if".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
3b2c41c9d12bafdad87cc271fadd1f816081b9a8 18-Oct-2010 Greg Clayton <gclayton@apple.com> Still trying to get detach to work with debugserver. Got a bit closer,
but something is still killing our inferior.

Fixed an issue with darwin-debug where it wasn't passing all needed arguments
to the inferior.

Fixed a race condition with the attach to named process code.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
c1d3775eb2494c6e88ebee44c7d49beefcb3bb6a 18-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed debugserver to properly attach to a process by name with the
"vAttachName;<PROCNAME>" packet, and wait for a new process by name to launch
with the "vAttachWait;<PROCNAME>".

Fixed a few issues with attaching where if DoAttach() returned no error, yet
there was no valid process ID, we would deadlock waiting for an event that
would never happen.

Added a new "process launch" option "--tty" that will launch the process
in a new terminal if the Host layer supports the "Host::LaunchInNewTerminal(...)"
function. This currently works on MacOSX and will allow the debugging of
terminal applications that do complex operations with the terminal.

Cleaned up the output when the process resumes, stops and halts to be
consistent with the output format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
0a7f75f9e375911ca91a884968b0efa36f18588d 09-Sep-2010 Greg Clayton <gclayton@apple.com> Got the ARM version of debugserver up to date.

Renamed the "dispatchqaddr" setting that was coming back for stop reply packets
to be named "qaddr" so that gdb doesn't thing it is a register number. gdb
was checking the first character and assuming "di" was a hex register number
because 'd' is a hex digit. It has been shortened so gdb can safely ignore it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.cpp
54e7afa84d945f9137f9372ecde432f9e1a702fc 09-Jul-2010 Greg Clayton <gclayton@apple.com> Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/RNBRemote.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/RNBRemote.cpp