History log of /external/lldb/tools/darwin-debug/darwin-debug.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b07f8de5d0079d7e5ca53f1f4e5ee256e5474900 24-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13665446>

Pass the user set target.env-vars when launching through a terminal.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.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/darwin-debug/darwin-debug.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/darwin-debug/darwin-debug.cpp
63fd41c08cb327ce943dd3c7b1ab920f4f8426c4 22-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused python includes from headers.

Python.h is a bad c++ citizen and overwrites some functions with its own
macros. This conflicts with libc++'s locale header. I did some refactoring
to use Python.h only where it's actually needed a few months ago so
the unnecessary includes can be removed now.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.cpp
b51693999473f5dc7cb9681bbbc4a65028eea35b 01-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed some warnings after enabling some stricter warnings in the Xcode project
settings.

Also fixed an issue where we weren't creating anonymous namepaces correctly:
<rdar://problem/10371295>




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.cpp
c0977b917f414acf5612b20b72097a7281b217c1 28-Oct-2011 Greg Clayton <gclayton@apple.com> Python does some bad things to the signal masks in the current process and
then we spawn child processes (debugserver, etc) and those bad settings get
inherited. We stop this from happening by correctly mucking with the posix
spawn attributes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.cpp
d45c3d7d55439692aa3215a709046944353b5917 16-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to get a 32 or 64 bit simple return value from the
ABIMacOSX_arm plugin.

Modified darwin-debug to print out the exectuable, working directory and
arguments a bit differently.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.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/darwin-debug/darwin-debug.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/darwin-debug/darwin-debug.cpp
6bd1a9ee0dd6f3b8a6e138ca17b2f1bb75660478 19-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed all known race conditions with starting a process in a new terminal.
We now spawn a thread to accept a unix socket connection from the inferior
when it spawns in the terminal, then we launch the process, then we get
the pid back through the unix socket, and then wait for it to SIGSTOP.

darwin-debug now clears the terminal screen and prints out the program and
arguments that are about to be launched.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.cpp
36f63a92bae332929e1a047b59ed6df651d8537f 19-Oct-2010 Greg Clayton <gclayton@apple.com> Stop the driver from handling SIGPIPE in case we communicate with stale
sockets so the driver doesn't just crash.

Added support for connecting to named sockets (unix IPC sockets) in
ConnectionFileDescriptor.

Modified the Host::LaunchInNewTerminal() for MacOSX to return the process
ID of the inferior process instead of the process ID of the Terminal.app. This
was done by modifying the "darwin-debug" executable to connect to lldb through
a named unix socket which is passed down as an argument. This allows a quick
handshake between "lldb" and "darwin-debug" so we can get the process ID
of the inferior and then attach by process ID and avoid attaching to the
inferior by process name since there could be more than one process with
that name. This still has possible race conditions, those will be fixed
in the near future. This fixes the SIGPIPE issues that were sometimes being
seen when task_for_pid was failing.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.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/darwin-debug/darwin-debug.cpp
24b48ff28b7c60dd4598212c3e77935a0fc1142d 18-Oct-2010 Greg Clayton <gclayton@apple.com> Added a new Host call to find LLDB related paths:

static bool
Host::GetLLDBPath (lldb::PathType path_type, FileSpec &file_spec);

This will fill in "file_spec" with an appropriate path that is appropriate
for the current Host OS. MacOSX will return paths within the LLDB.framework,
and other unixes will return the paths they want. The current PathType
enums are:

typedef enum PathType
{
ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc)
ePathTypeHeaderDir, // Find LLDB header file directory
ePathTypePythonDir // Find Python modules (PYTHONPATH) directory
} PathType;

All places that were finding executables are and python paths are now updated
to use this Host call.

Added another new host call to launch the inferior in a terminal. This ability
will be very host specific and doesn't need to be supported on all systems.
MacOSX currently will create a new .command file and tell Terminal.app to open
the .command file. It also uses the new "darwin-debug" app which is a small
app that uses posix to exec (no fork) and stop at the entry point of the
program. The GDB remote plug-in is almost able launch a process and attach to
it, it currently will spawn the process, but it won't attach to it just yet.
This will let LLDB not have to share the terminal with another process and a
new terminal window will pop up when you launch. This won't get hooked up
until we work out all of the kinks. The new Host function is:

static lldb::pid_t
Host::LaunchInNewTerminal (
const char **argv, // argv[0] is executable
const char **envp,
const ArchSpec *arch_spec,
bool stop_at_entry,
bool disable_aslr);

Cleaned up FileSpec::GetPath to not use strncpy() as it was always zero
filling the entire path buffer.

Fixed an issue with the dynamic checker function where I missed a '$' prefix
that should have been added.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/darwin-debug/darwin-debug.cpp