LLDB.Target.AttachToProcessWithName C# (CSharp) Method

AttachToProcessWithName() public method

Attach to process with name.

public AttachToProcessWithName ( LLDB listener, string name, bool wait_for, LLDB error ) : LLDB.Process
listener LLDB /// An optional listener that will receive all process events. /// If /// is valid then /// will listen to all /// process events. If not valid, then this target's debugger /// (SBTarget::GetDebugger()) will listen to all process events. ///
name string /// Basename of process to attach to. ///
wait_for bool /// If true wait for a new instance of 'name' to be launched. ///
error LLDB /// An error explaining what went wrong if attach fails. ///
return LLDB.Process
        public LLDB.Process AttachToProcessWithName(LLDB.Listener listener, string name, bool wait_for, LLDB.Error error)
        {
            if (ReferenceEquals(listener, null))
                throw new global::System.ArgumentNullException("listener", "Cannot be null because it is a C++ reference (&).");
            var arg0 = listener.__Instance;
            var arg1 = Marshal.StringToHGlobalAnsi(name);
            if (ReferenceEquals(error, null))
                throw new global::System.ArgumentNullException("error", "Cannot be null because it is a C++ reference (&).");
            var arg3 = error.__Instance;
            var __ret = new LLDB.Process.Internal();
            Internal.AttachToProcessWithName_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0, arg1, wait_for, arg3);
            Marshal.FreeHGlobal(arg1);
            return LLDB.Process.__CreateInstance(__ret);
        }