[Lldb-commits] [lldb] r145371 - in /lldb/trunk/source: API/SBTarget.cpp Commands/CommandObjectProcess.cpp

Greg Clayton gclayton at apple.com
Mon Nov 28 22:03:30 CST 2011


Author: gclayton
Date: Mon Nov 28 22:03:30 2011
New Revision: 145371

URL: http://llvm.org/viewvc/llvm-project?rev=145371&view=rev
Log:
<rdar://problem/10429064>

Fixed an issue where if we are debugging on a remote platform and set a
platform path for our executable, it was not being honored by the new
launch functions that used the ProcessLaunchInfo.


Modified:
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Commands/CommandObjectProcess.cpp

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=145371&r1=145370&r2=145371&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Nov 28 22:03:30 2011
@@ -235,7 +235,7 @@
             
             Module *exe_module = m_opaque_sp->GetExecutableModulePointer();
             if (exe_module)
-                launch_info.SetExecutableFile(exe_module->GetFileSpec(), true);
+                launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), true);
             if (argv)
                 launch_info.GetArguments().AppendArguments (argv);
             if (envp)

Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=145371&r1=145370&r2=145371&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Mon Nov 28 22:03:30 2011
@@ -35,87 +35,6 @@
 {
 public:
 
-//    class CommandOptions : public Options
-//    {
-//    public:
-//
-//        CommandOptions (CommandInterpreter &interpreter) :
-//            Options(interpreter)
-//        {
-//            // Keep default values of all options in one place: OptionParsingStarting ()
-//            OptionParsingStarting ();
-//        }
-//
-//        ~CommandOptions ()
-//        {
-//        }
-//
-//        Error
-//        SetOptionValue (uint32_t option_idx, const char *option_arg)
-//        {
-//            Error error;
-//            char short_option = (char) m_getopt_table[option_idx].val;
-//
-//            switch (short_option)
-//            {
-//                case 's':   stop_at_entry = true;               break;
-//                case 'e':   stderr_path.assign (option_arg);    break;
-//                case 'i':   stdin_path.assign (option_arg);     break;
-//                case 'o':   stdout_path.assign (option_arg);    break;
-//                case 'p':   plugin_name.assign (option_arg);    break;
-//                case 'n':   no_stdio = true;                    break;
-//                case 'w':   working_dir.assign (option_arg);    break;
-//                case 't':   
-//                    if (option_arg && option_arg[0])
-//                        tty_name.assign (option_arg);
-//                    in_new_tty = true; 
-//                    break;
-//                default:
-//                    error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
-//                    break;
-//
-//            }
-//            return error;
-//        }
-//
-//        void
-//        OptionParsingStarting ()
-//        {
-//            stop_at_entry = false;
-//            in_new_tty = false;
-//            tty_name.clear();
-//            stdin_path.clear();
-//            stdout_path.clear();
-//            stderr_path.clear();
-//            plugin_name.clear();
-//            working_dir.clear();
-//            no_stdio = false;
-//        }
-//
-//        const OptionDefinition*
-//        GetDefinitions ()
-//        {
-//            return g_option_table;
-//        }
-//
-//        // Options table: Required for subclasses of Options.
-//
-//        static OptionDefinition g_option_table[];
-//
-//        // Instance variables to hold the values for command options.
-//
-//        bool stop_at_entry;
-//        bool in_new_tty;
-//        bool no_stdio;
-//        std::string tty_name;
-//        std::string stderr_path;
-//        std::string stdin_path;
-//        std::string stdout_path;
-//        std::string plugin_name;
-//        std::string working_dir;
-//
-//    };
-
     CommandObjectProcessLaunch (CommandInterpreter &interpreter) :
         CommandObject (interpreter,
                        "process launch",
@@ -175,7 +94,7 @@
         exe_module->GetFileSpec().GetPath (filename, sizeof(filename));
 
         const bool add_exe_file_as_first_arg = true;
-        m_options.launch_info.SetExecutableFile(exe_module->GetFileSpec(), add_exe_file_as_first_arg);
+        m_options.launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), add_exe_file_as_first_arg);
         
         StateType state = eStateInvalid;
         Process *process = m_interpreter.GetExecutionContext().GetProcessPtr();
@@ -593,7 +512,7 @@
                 if (!m_options.attach_info.ProcessInfoSpecified ())
                 {
                     if (old_exec_module_sp)
-                        m_options.attach_info.GetExecutableFile().GetFilename() = old_exec_module_sp->GetFileSpec().GetFilename();
+                        m_options.attach_info.GetExecutableFile().GetFilename() = old_exec_module_sp->GetPlatformFileSpec().GetFilename();
 
                     if (!m_options.attach_info.ProcessInfoSpecified ())
                     {




More information about the lldb-commits mailing list