History log of /external/lldb/tools/debugserver/source/DNB.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
58274a3c8d618e5aac2b738aa1d11bce423208ab 27-Jun-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/14195566>

Found a race condition when killing an application where the state could be set to exited by the waitpid_thread() _before_ we call task resume (via MachProcess::PrivateResume()) in MachProcess::Kill().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.cpp
0689f164af4e83dad8b48dc1248433f65a553f20 16-May-2013 Greg Clayton <gclayton@apple.com> Removed unused code and an unused event.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.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/DNB.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/DNB.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/DNB.cpp
8492942e52539a5c4fb4c06a865ad8479d496340 05-Jan-2013 Jason Molenda <jmolenda@apple.com> <rdar://problem/12602653>

Add unconditional logging messages to every place in debugserver
where we send a SIGKILL signal or do a ptrace PT_KILL call to
terminate the inferior process. When the debuggee is silently
killed off, the console logging from debugserver can disambiguate
whether debugserver killed off the process because it failed to
completely set it up, becuase it was told to (via the "k" packet),
or if some external daemon killed it.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.cpp
2529aa356e8cf9c1395da46f66ea2518dfa1982d 17-Nov-2012 Han Ming Ong <hanming@apple.com> Follow up on <rdar://12720514>. Removed commented out code.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.cpp
d77371fe8083d697edc4f9ed7d039ed7b47b88a6 07-Nov-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12647273>

Added the ability to get the full process list when using the --applist option in debugserver.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
c7d505b6d97cd5fb12022d7b500b22a5f8cc1800 01-Nov-2012 Jim Ingham <jingham@apple.com> Switch from using KERN_PROCARGS2 to get the path to the executed process to proc_pidpath. The former was flakey, and the whole point of libproc is to protect us from potential flakiness at that level...

<rdar://problem/12594781>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
a5c92b6c0af7b68ae999d9efd87a060255aa7a37 31-Oct-2012 Greg Clayton <gclayton@apple.com> Resolve any bundle paths we are given when the specified executable is a bundle.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.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/DNB.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/DNB.cpp
ef898c512a5e26f2d1dd91789214662f76623970 19-Jul-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11908082>

Allow debugserver to match process names that are longer than MAXCOMLEN (16) characters. We do this by digging up argv[0] from another sysctl if the process name supplied is longer than 16 characters.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.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/DNB.cpp
598df88bd6fc33c6fb330bc859bdc277795501f3 14-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10434005>

Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
macros that allows us to easily compile for either C++.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
5de331732062885a853500495795a94360019e33 21-Feb-2012 Charles Davis <cdavis@mines.edu> Pull side effects out of asserts. Fixes debugserver with NDEBUG defined.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
a749ca2ceb7854ab7a14f3a31956a8617fef7d8c 02-Feb-2012 Greg Clayton <gclayton@apple.com> Kill our child process that we launch when we can't get the task_for_pid()
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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.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/DNB.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/DNB.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/DNB.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/DNB.cpp
31d8918cb12fa1f715920db37a2290b3911e62ee 06-Sep-2011 Johnny Chen <johnny.chen@apple.com> DNBBreakpoint::SetEnabled() should take a bool, not a uint32_t, as its input argument.
Plus for watchpoint related functions, add new macros INVALID_NUB_WATCH_ID and
NUB_WATCH_ID_IS_VALID and use them, instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
1e1460b1999eabcbd5319930b137b03df6a770aa 11-Aug-2011 Johnny Chen <johnny.chen@apple.com> To silence the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.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/DNB.cpp
de915beb5febe597505ba33fdc2c39eea2abdbd4 23-Jan-2011 Greg Clayton <gclayton@apple.com> Added a new variant of SBTarget::Launch() that deprectates the old one that
takes separate file handles for stdin, stdout, and stder and also allows for
the working directory to be specified.

Added support to "process launch" to a new option: --working-dir=PATH. We
can now set the working directory. If this is not set, it defaults to that
of the process that has LLDB loaded. Added the working directory to the
host LaunchInNewTerminal function to allows the current working directory
to be set in processes that are spawned in their own terminal. Also hooked this
up to the lldb_private::Process and all mac plug-ins. The linux plug-in had its
API changed, but nothing is making use of it yet. Modfied "debugserver" and
"darwin-debug" to also handle the current working directory options and modified
the code in LLDB that spawns these tools to pass the info along.

Fixed ProcessGDBRemote to properly pass along all file handles for stdin, stdout
and stderr.

After clearing the default values for the stdin/out/err file handles for
process to be NULL, we had a crasher in UserSettingsController::UpdateStringVariable
which is now fixed. Also fixed the setting of boolean values to be able to
be set as "true", "yes", "on", "1" for true (case insensitive) and "false", "no",
"off", or "0" for false.

Fixed debugserver to properly handle files for STDIN, STDOUT and STDERR that are not
already opened. Previous to this fix debugserver would only correctly open and dupe
file handles for the slave side of a pseudo terminal. It now correctly handles
getting STDIN for the inferior from a file, and spitting STDOUT and STDERR out to
files. Also made sure the file handles were correctly opened with the NOCTTY flag
for terminals.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.cpp
bd666017403e102e0ca435d6da585ff979f83598 03-Dec-2010 Caroline Tice <ctice@apple.com> Add '-no-stdio' option to 'process launch' command, which causes the
inferior to be launched without setting up terminal stdin/stdout for it
(leaving the lldb command line accessible while the program is executing).
Also add a user settings variable, 'target.process.disable-stdio' to allow
the user to set this globally rather than having to use the command option
each time the process is launched.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.cpp
97bd5670cdb415a95c84050c20cfacce8ed178e7 01-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed 32 bit debugging after recent architecture changes to debugserver.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/DNB.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/DNB.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/DNB.cpp
452bf613496c7290c6b7a1a1eb28efbce63fd3b9 31-Aug-2010 Greg Clayton <gclayton@apple.com> Added the ability to disable ASLR (Address Space Layout Randomization). ASLR
is disabled by default, and can be enabled using:

(lldb) set disable-aslr 0



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