History log of /external/lldb/tools/debugserver/source/debugserver.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a619e8ec81ff9c838285105c034ee70a290be904 07-Jun-2013 Greg Clayton <gclayton@apple.com> Remove the debugserver "--open-connection" option and obey the hostname that is passed into debugserver.

you can now specify:

debugserver host:port
debugserver port
debugserver /path/to/file

When "host" is specified, we will only accept connections from that host. If host is not specified, we default to "localhost".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.cpp
3f2f741bb533b78e2fac5332c4698338ea2fd3ac 04-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13457391>

LLDB now can use a single dash for all long options for all commands form the command line and from the command interpreter. This involved just switching all calls from getopt_long() to getopt_long_only().



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.cpp
7dd846ae1be02fae0fc945cd511c915270d69ccc 23-Mar-2013 Jason Molenda <jmolenda@apple.com> Change debugserver to open the socket it listens
to in INADDR_LOOPBACK mode by default ("localhost only")
instead of INADDR_ANY ("accept connections from any system").

Add a new command line argument to debugserver, --open-connection
or -H which will enable the previous behavior. It would be used
if you were doing two-system debugging, with lldb running on one
system and debugserver running on the other. But it is a less
common workflow and should not be the default.

<rdar://problem/12583284>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.cpp
643adf8a3e1b5056fa2eedcc1b8bebbb1791dd9b 25-Feb-2013 Jim Ingham <jingham@apple.com> Add a log line when debugserver exits, and clean up some of the other standard logs output to make it more useful.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.cpp
3646e6812b42737c578b99a57f686ae9de279cce 01-Nov-2012 Jason Molenda <jmolenda@apple.com> Fix an error message in debugserver so it doesn't print "Unable to
launch process (null)" because we changed argv while doing argument
parsing.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.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/debugserver.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/debugserver.cpp
9a5bbd2a14cacac731424f7a253f6cc16b22c10a 22-Feb-2012 Jason Molenda <jmolenda@apple.com> Change #ifdef markers around lockdown and SpringBoard
calls to dpeend on WITH_SPRINGBOARD and WITH_LOCKDOWN
instead of __arm__. Add an RNBSocket::useFD method.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.cpp
9a7749c6dd24f85e423066b8877bd9edc62f13cf 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@137267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.cpp
37f1b929ece512d5ad525f319b8705c123ba9835 08-Jul-2011 Jason Molenda <jmolenda@apple.com> Handle the possible case where the process launch failed
but we don't have an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.cpp
b72d0f098e45936fa72e26b1a026c603e17e2d6c 12-Apr-2011 Greg Clayton <gclayton@apple.com> Moved the execution context that was in the Debugger into
the CommandInterpreter where it was always being used.

Make sure that Modules can track their object file offsets correctly to
allow opening of sub object files (like the "__commpage" on darwin).

Modified the Platforms to be able to launch processes. The first part of this
move is the platform soon will become the entity that launches your program
and when it does, it uses a new ProcessLaunchInfo class which encapsulates
all process launching settings. This simplifies the internal APIs needed for
launching. I want to slowly phase out process launching from the process
classes, so for now we can still launch just as we used to, but eventually
the platform is the object that should do the launching.

Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able
to launch processes with all of the new eLaunchFlag settings. Modified any
code that was manually launching processes to use the Host::LaunchProcess
functions.

Fixed an issue where lldb_private::Args had implicitly defined copy
constructors that could do the wrong thing. This has now been fixed by adding
an appropriate copy constructor and assignment operator.

Make sure we don't add empty ModuleSP entries to a module list.

Fixed the commpage module creation on MacOSX, but we still need to train
the MacOSX dynamic loader to not get rid of it when it doesn't have an entry
in the all image infos.

Abstracted many more calls from in ProcessGDBRemote down into the
GDBRemoteCommunicationClient subclass to make the classes cleaner and more
efficient.

Fixed the default iOS ARM register context to be correct and also added support
for targets that don't support the qThreadStopInfo packet by selecting the
current thread (only if needed) and then sending a stop reply packet.

Debugserver can now start up with a --unix-socket (-u for short) and can
then bind to port zero and send the port it bound to to a listening process
on the other end. This allows the GDB remote platform to spawn new GDB server
instances (debugserver) to allow platform debugging.







git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.cpp
ff39f746ebaa3710c44ba49bd9b0a6cf05f60a3f 01-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability to get a broadcaster event name for a given broadcaster
event.

Modified the ProcessInfo structure to contain all process arguments. Using the
new function calls on MacOSX allows us to see the full process name, not just
the first 16 characters.

Added a new platform command: "platform process info <pid> [<pid> <pid> ...]"
that can be used to get detailed information for a process including all
arguments, user and group info and more.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.cpp
fc30997d8b7927a92c5ec69908c98912e7fc100c 26-Feb-2011 Johnny Chen <johnny.chen@apple.com> If the user sets a working directory path using "process launch -w <path>", honor that dir path;
otherwise, use the thing the debugserver is started with.

Fixed rdar://problem/9056462
The process launch flag '-w' for setting the current working directory not working?


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.cpp
46cd50c064711df3c688a3c3c16c0d0d5da29e49 25-Jan-2011 Johnny Chen <johnny.chen@apple.com> Trivial comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.cpp
43457c521adf1fd88bc30a99c3aed0796ede717e 24-Jan-2011 Jim Ingham <jingham@apple.com> Linebuffer the log file.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.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/debugserver.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/debugserver.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/debugserver.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/debugserver.cpp
91a1dabac7ef4a1c8a60dbbb8340d33b7d25f863 05-Nov-2010 Caroline Tice <ctice@apple.com> If debugserver is running on the local machine, pass it a
pseudoterminal to pass to the inferior for the inferior's I/O
(to allow direct writing, rather than passing all the I/O around
via packets).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/debugserver/source/debugserver.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/debugserver.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/debugserver.cpp
35c0edcedb2058ca8d0758f71ce958c23836d52d 31-Jul-2010 Greg Clayton <gclayton@apple.com> Fixed debugserver to not exit when we are able to spawn the process, yet not
launch it due to not being able to get the task port. A SIGHUP was killing us
and also an error string wasn't properly being passed along. Got rid of a
class error variable that can only lead to multi-threaded crashes.



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