Example #1
0
 public LLDB.Process GetProcess()
 {
     var __ret = new LLDB.Process.Internal();
     Internal.GetProcess_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment));
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #2
0
 /// <summary>
 /// <para>Attach to process with name.</para>
 /// </summary>
 /// <param name="listener">
 /// <para>An optional listener that will receive all process events.</para>
 /// <para>If</para>
 /// <para>is valid then</para>
 /// <para>will listen to all</para>
 /// <para>process events. If not valid, then this target's debugger</para>
 /// <para>(SBTarget::GetDebugger()) will listen to all process events.</para>
 /// </param>
 /// <param name="name">
 /// <para>Basename of process to attach to.</para>
 /// </param>
 /// <param name="wait_for">
 /// <para>If true wait for a new instance of 'name' to be launched.</para>
 /// </param>
 /// <param name="error">
 /// <para>An error explaining what went wrong if attach fails.</para>
 /// </param>
 /// <returns>
 /// <para>A process object for the attached process.</para>
 /// </returns>
 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);
 }
Example #3
0
 /// <summary>
 /// <para>Connect to a remote debug server with url.</para>
 /// </summary>
 /// <param name="listener">
 /// <para>An optional listener that will receive all process events.</para>
 /// <para>If</para>
 /// <para>is valid then</para>
 /// <para>will listen to all</para>
 /// <para>process events. If not valid, then this target's debugger</para>
 /// <para>(SBTarget::GetDebugger()) will listen to all process events.</para>
 /// </param>
 /// <param name="url">
 /// <para>The url to connect to, e.g., 'connect://localhost:12345'.</para>
 /// </param>
 /// <param name="plugin_name">
 /// <para>The plugin name to be used; can be nullptr.</para>
 /// </param>
 /// <param name="error">
 /// <para>An error explaining what went wrong if the connect fails.</para>
 /// </param>
 /// <returns>
 /// <para>A process object for the connected process.</para>
 /// </returns>
 public LLDB.Process ConnectRemote(LLDB.Listener listener, string url, string plugin_name, 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(url);
     var arg2 = Marshal.StringToHGlobalAnsi(plugin_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.ConnectRemote_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0, arg1, arg2, arg3);
     Marshal.FreeHGlobal(arg1);
     Marshal.FreeHGlobal(arg2);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #4
0
 public LLDB.Process Attach(LLDB.AttachInfo attach_info, LLDB.Error error)
 {
     if (ReferenceEquals(attach_info, null))
         throw new global::System.ArgumentNullException("attach_info", "Cannot be null because it is a C++ reference (&).");
     var arg0 = attach_info.__Instance;
     if (ReferenceEquals(error, null))
         throw new global::System.ArgumentNullException("error", "Cannot be null because it is a C++ reference (&).");
     var arg1 = error.__Instance;
     var __ret = new LLDB.Process.Internal();
     Internal.Attach_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0, arg1);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #5
0
 public LLDB.Process AttachToProcessWithID(LLDB.Listener listener, int pid, 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;
     if (ReferenceEquals(error, null))
         throw new global::System.ArgumentNullException("error", "Cannot be null because it is a C++ reference (&).");
     var arg2 = error.__Instance;
     var __ret = new LLDB.Process.Internal();
     Internal.AttachToProcessWithID_1(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0, pid, arg2);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #6
0
 /// <summary>
 /// <para>Launch a new process with sensible defaults.</para>
 /// </summary>
 /// <param name="argv">
 /// <para>The argument array.</para>
 /// </param>
 /// <param name="envp">
 /// <para>The environment array.</para>
 /// </param>
 /// <param name="working_directory">
 /// <para>The working directory to have the child process run in</para>
 /// <para>Default: listener</para>
 /// <para>Set to the target's debugger (SBTarget::GetDebugger())</para>
 /// <para>Default: launch_flags</para>
 /// <para>Empty launch flags</para>
 /// <para>Default: stdin_path</para>
 /// <para>Default: stdout_path</para>
 /// <para>Default: stderr_path</para>
 /// <para>A pseudo terminal will be used.</para>
 /// </param>
 /// <returns>
 /// <para>A process object for the newly created process.</para>
 /// </returns>
 public LLDB.Process LaunchSimple(sbyte** argv, sbyte** envp, string working_directory)
 {
     var arg0 = argv;
     var arg1 = envp;
     var arg2 = Marshal.StringToHGlobalAnsi(working_directory);
     var __ret = new LLDB.Process.Internal();
     Internal.LaunchSimple_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0, arg1, arg2);
     Marshal.FreeHGlobal(arg2);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #7
0
 public LLDB.Process LoadCore(string core_file)
 {
     var arg0 = Marshal.StringToHGlobalAnsi(core_file);
     var __ret = new LLDB.Process.Internal();
     Internal.LoadCore_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0);
     Marshal.FreeHGlobal(arg0);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #8
0
 /// <summary>
 /// <para>Launch a new process.</para>
 /// </summary>
 /// <remarks>
 /// <para>Launch a new process by spawning a new process using the</para>
 /// <para>target object's executable module's file as the file to launch.</para>
 /// <para>Arguments are given in </para>
 /// <para>and the environment variables</para>
 /// <para>are in </para>
 /// <para>Standard input and output files can be</para>
 /// <para>optionally re-directed to </para>
 /// <para> </para>
 /// <para>and</para>
 /// </remarks>
 /// <param name="listener">
 /// <para>An optional listener that will receive all process events.</para>
 /// <para>If</para>
 /// <para>is valid then</para>
 /// <para>will listen to all</para>
 /// <para>process events. If not valid, then this target's debugger</para>
 /// <para>(SBTarget::GetDebugger()) will listen to all process events.</para>
 /// </param>
 /// <param name="argv">
 /// <para>The argument array.</para>
 /// </param>
 /// <param name="envp">
 /// <para>The environment array.</para>
 /// </param>
 /// <param name="launch_flags">
 /// <para>Flags to modify the launch (</para>
 /// </param>
 /// <param name="stdin_path">
 /// <para>The path to use when re-directing the STDIN of the new</para>
 /// <para>process. If all stdXX_path arguments are nullptr, a pseudo</para>
 /// <para>terminal will be used.</para>
 /// </param>
 /// <param name="stdout_path">
 /// <para>The path to use when re-directing the STDOUT of the new</para>
 /// <para>process. If all stdXX_path arguments are nullptr, a pseudo</para>
 /// <para>terminal will be used.</para>
 /// </param>
 /// <param name="stderr_path">
 /// <para>The path to use when re-directing the STDERR of the new</para>
 /// <para>process. If all stdXX_path arguments are nullptr, a pseudo</para>
 /// <para>terminal will be used.</para>
 /// </param>
 /// <param name="working_directory">
 /// <para>The working directory to have the child process run in</para>
 /// </param>
 /// <param name="launch_flags">
 /// <para>Some launch options specified by logical OR'ing</para>
 /// <para>lldb::LaunchFlags enumeration values together.</para>
 /// </param>
 /// <param name="stop_at_entry">
 /// <para>If false do not stop the inferior at the entry point.</para>
 /// </param>
 /// <param name="error">
 /// <para>An error object. Contains the reason if there is some failure.</para>
 /// </param>
 /// <returns>
 /// <para>A process object for the newly created process.</para>
 /// </returns>
 public LLDB.Process Launch(LLDB.Listener listener, sbyte** argv, sbyte** envp, string stdin_path, string stdout_path, string stderr_path, string working_directory, uint launch_flags, bool stop_at_entry, out 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 = argv;
     var arg2 = envp;
     var arg3 = Marshal.StringToHGlobalAnsi(stdin_path);
     var arg4 = Marshal.StringToHGlobalAnsi(stdout_path);
     var arg5 = Marshal.StringToHGlobalAnsi(stderr_path);
     var arg6 = Marshal.StringToHGlobalAnsi(working_directory);
     error = new LLDB.Error();
     if (ReferenceEquals(error, null))
         throw new global::System.ArgumentNullException("error", "Cannot be null because it is a C++ reference (&).");
     var arg9 = error.__Instance;
     var __ret = new LLDB.Process.Internal();
     Internal.Launch_0(new IntPtr(&__ret), (__Instance + __PointerAdjustment), arg0, arg1, arg2, arg3, arg4, arg5, arg6, launch_flags, stop_at_entry, arg9);
     LLDB.Error __result0;
     if (arg9 == IntPtr.Zero) __result0 = null;
     else if (LLDB.Error.NativeToManagedMap.ContainsKey(arg9))
         __result0 = (LLDB.Error) LLDB.Error.NativeToManagedMap[arg9];
     else __result0 = LLDB.Error.__CreateInstance(arg9);
     error = __result0;
     Marshal.FreeHGlobal(arg3);
     Marshal.FreeHGlobal(arg4);
     Marshal.FreeHGlobal(arg5);
     Marshal.FreeHGlobal(arg6);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #9
0
 /// <summary>
 /// <para>Connect to a remote debug server with url.</para>
 /// </summary>
 /// <param name="listener">
 /// <para>An optional listener that will receive all process events.</para>
 /// <para>If</para>
 /// <para>is valid then</para>
 /// <para>will listen to all</para>
 /// <para>process events. If not valid, then this target's debugger</para>
 /// <para>(SBTarget::GetDebugger()) will listen to all process events.</para>
 /// </param>
 /// <param name="url">
 /// <para>The url to connect to, e.g., 'connect://localhost:12345'.</para>
 /// </param>
 /// <param name="plugin_name">
 /// <para>The plugin name to be used; can be nullptr.</para>
 /// </param>
 /// <param name="error">
 /// <para>An error explaining what went wrong if the connect fails.</para>
 /// </param>
 /// <returns>
 /// <para>A process object for the connected process.</para>
 /// </returns>
 public LLDB.Process ConnectRemote(LLDB.Listener listener, string url, string plugin_name, out 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(url);
     var arg2 = Marshal.StringToHGlobalAnsi(plugin_name);
     error = new LLDB.Error();
     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.ConnectRemote_0((__Instance + __PointerAdjustment), new IntPtr(&__ret), arg0, arg1, arg2, arg3);
     LLDB.Error __result0;
     if (arg3 == IntPtr.Zero) __result0 = null;
     else if (LLDB.Error.NativeToManagedMap.ContainsKey(arg3))
         __result0 = (LLDB.Error) LLDB.Error.NativeToManagedMap[arg3];
     else __result0 = LLDB.Error.__CreateInstance(arg3);
     error = __result0;
     Marshal.FreeHGlobal(arg1);
     Marshal.FreeHGlobal(arg2);
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #10
0
 /// <summary>
 /// <para>Attach to process with pid.</para>
 /// </summary>
 /// <param name="listener">
 /// <para>An optional listener that will receive all process events.</para>
 /// <para>If</para>
 /// <para>is valid then</para>
 /// <para>will listen to all</para>
 /// <para>process events. If not valid, then this target's debugger</para>
 /// <para>(SBTarget::GetDebugger()) will listen to all process events.</para>
 /// </param>
 /// <param name="pid">
 /// <para>The process ID to attach to.</para>
 /// </param>
 /// <param name="error">
 /// <para>An error explaining what went wrong if attach fails.</para>
 /// </param>
 /// <returns>
 /// <para>A process object for the attached process.</para>
 /// </returns>
 public LLDB.Process AttachToProcessWithID(LLDB.Listener listener, ulong pid, out 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;
     error = new LLDB.Error();
     if (ReferenceEquals(error, null))
         throw new global::System.ArgumentNullException("error", "Cannot be null because it is a C++ reference (&).");
     var arg2 = error.__Instance;
     var __ret = new LLDB.Process.Internal();
     Internal.AttachToProcessWithID_0((__Instance + __PointerAdjustment), new IntPtr(&__ret), arg0, pid, arg2);
     LLDB.Error __result0;
     if (arg2 == IntPtr.Zero) __result0 = null;
     else if (LLDB.Error.NativeToManagedMap.ContainsKey(arg2))
         __result0 = (LLDB.Error) LLDB.Error.NativeToManagedMap[arg2];
     else __result0 = LLDB.Error.__CreateInstance(arg2);
     error = __result0;
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #11
0
 public LLDB.Process Launch(LLDB.LaunchInfo launch_info, out LLDB.Error error)
 {
     if (ReferenceEquals(launch_info, null))
         throw new global::System.ArgumentNullException("launch_info", "Cannot be null because it is a C++ reference (&).");
     var arg0 = launch_info.__Instance;
     error = new LLDB.Error();
     if (ReferenceEquals(error, null))
         throw new global::System.ArgumentNullException("error", "Cannot be null because it is a C++ reference (&).");
     var arg1 = error.__Instance;
     var __ret = new LLDB.Process.Internal();
     Internal.Launch_1((__Instance + __PointerAdjustment), new IntPtr(&__ret), arg0, arg1);
     LLDB.Error __result0;
     if (arg1 == IntPtr.Zero) __result0 = null;
     else if (LLDB.Error.NativeToManagedMap.ContainsKey(arg1))
         __result0 = (LLDB.Error) LLDB.Error.NativeToManagedMap[arg1];
     else __result0 = LLDB.Error.__CreateInstance(arg1);
     error = __result0;
     return LLDB.Process.__CreateInstance(__ret);
 }
Example #12
0
 public static LLDB.Process GetProcessFromEvent(LLDB.Event @event)
 {
     if (ReferenceEquals(@event, null))
         throw new global::System.ArgumentNullException("@event", "Cannot be null because it is a C++ reference (&).");
     var arg0 = @event.__Instance;
     var __ret = new LLDB.Process.Internal();
     Internal.GetProcessFromEvent_0(new IntPtr(&__ret), arg0);
     return LLDB.Process.__CreateInstance(__ret);
 }