[Lldb-commits] [PATCH] Remove wait_for_launch parameter from DoAttachToProcessWithName(). This parameter is redundant as this information is already provided by the ProcessAttachInfo parameter.
Greg Clayton
gclayton at apple.com
Mon Dec 23 12:49:59 PST 2013
Looks good.
On Dec 23, 2013, at 11:16 AM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:
> http://llvm-reviews.chandlerc.com/D2463
>
> Files:
> include/lldb/Target/Process.h
> source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
> source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
> source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
> source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
> source/Target/Process.cpp
>
> Index: include/lldb/Target/Process.h
> ===================================================================
> --- include/lldb/Target/Process.h
> +++ include/lldb/Target/Process.h
> @@ -2113,21 +2113,15 @@
> /// @param[in] process_name
> /// The name of the process to attach to.
> ///
> - /// @param[in] wait_for_launch
> - /// If \b true, wait for the process to be launched and attach
> - /// as soon as possible after it does launch. If \b false, then
> - /// search for a matching process the currently exists.
> - ///
> /// @param[in] attach_info
> /// Information on how to do the attach. For example, GetUserID()
> /// will return the uid to attach as.
> ///
> /// @return
> - /// Returns \a pid if attaching was successful, or
> - /// LLDB_INVALID_PROCESS_ID if attaching fails.
> + /// Returns an error object.
> //------------------------------------------------------------------
> virtual Error
> - DoAttachToProcessWithName (const char *process_name, bool wait_for_launch, const ProcessAttachInfo &attach_info)
> + DoAttachToProcessWithName (const char *process_name, const ProcessAttachInfo &attach_info)
> {
> Error error;
> error.SetErrorString("attach by name is not supported");
> Index: source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
> ===================================================================
> --- source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
> +++ source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
> @@ -385,7 +385,7 @@
> }
>
> Error
> -ProcessKDP::DoAttachToProcessWithName (const char *process_name, bool wait_for_launch, const ProcessAttachInfo &attach_info)
> +ProcessKDP::DoAttachToProcessWithName (const char *process_name, const ProcessAttachInfo &attach_info)
> {
> Error error;
> error.SetErrorString ("attach to process by name is not suppported in kdp remote debugging");
> Index: source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
> ===================================================================
> --- source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
> +++ source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
> @@ -103,7 +103,7 @@
> DoAttachToProcessWithID (lldb::pid_t pid, const lldb_private::ProcessAttachInfo &attach_info);
>
> virtual lldb_private::Error
> - DoAttachToProcessWithName (const char *process_name, bool wait_for_launch, const lldb_private::ProcessAttachInfo &attach_info);
> + DoAttachToProcessWithName (const char *process_name, const lldb_private::ProcessAttachInfo &attach_info);
>
> virtual void
> DidAttach ();
> Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
> ===================================================================
> --- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
> +++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
> @@ -1063,7 +1063,7 @@
> }
>
> Error
> -ProcessGDBRemote::DoAttachToProcessWithName (const char *process_name, bool wait_for_launch, const ProcessAttachInfo &attach_info)
> +ProcessGDBRemote::DoAttachToProcessWithName (const char *process_name, const ProcessAttachInfo &attach_info)
> {
> Error error;
> // Clear out and clean up from any current state
> @@ -1090,7 +1090,7 @@
> {
> StreamString packet;
>
> - if (wait_for_launch)
> + if (attach_info.GetWaitForLaunch())
> {
> if (!m_gdb_comm.GetVAttachOrWaitSupported())
> {
> Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
> ===================================================================
> --- source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
> +++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
> @@ -111,7 +111,6 @@
>
> virtual lldb_private::Error
> DoAttachToProcessWithName (const char *process_name,
> - bool wait_for_launch,
> const lldb_private::ProcessAttachInfo &attach_info);
>
> virtual void
> Index: source/Target/Process.cpp
> ===================================================================
> --- source/Target/Process.cpp
> +++ source/Target/Process.cpp
> @@ -3212,7 +3212,7 @@
> const bool restarted = false;
> SetPublicState (eStateAttaching, restarted);
> // Now attach using these arguments.
> - error = DoAttachToProcessWithName (process_name, wait_for_launch, attach_info);
> + error = DoAttachToProcessWithName (process_name, attach_info);
> }
> else
> {
> <D2463.1.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list