Ejemplo n.º 1
0
        /// <summary>
        /// Returns the path to lldb-mi which is installed when the extension is installed
        /// </summary>
        /// <returns>Path to lldb-mi or null if it doesn't exist</returns>
        internal static string GetLLDBMIPath()
        {
            string        exePath   = null;
            string        directory = EngineConfiguration.GetAdapterDirectory();
            DirectoryInfo dir       = new DirectoryInfo(directory);

            // Remove /bin from the path to get to the debugAdapter folder
            string debugAdapterPath = dir.Parent?.FullName;

            if (!String.IsNullOrEmpty(debugAdapterPath))
            {
                // Path for lldb-mi 10.x and if it exists use it.
                exePath = Path.Combine(debugAdapterPath, "lldb-mi", "bin", "lldb-mi");
                if (!File.Exists(exePath))
                {
                    // Fall back to using path for lldb-mi 3.8
                    exePath = Path.Combine(debugAdapterPath, "lldb", "bin", "lldb-mi");
                    if (!File.Exists(exePath))
                    {
                        // Neither exist
                        return(null);
                    }
                }
            }

            return(exePath);
        }
Ejemplo n.º 2
0
        public object GetEngineMetric(string metric)
        {
            if (string.CompareOrdinal("GlobalVisualizersDirectory", metric) == 0)
            {
                string openDebugPath = EngineConfiguration.GetAdapterDirectory();

                return(Path.Combine(openDebugPath, "Visualizers"));
            }

            return(null);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns the path to lldb-mi which is installed when the extension is installed
        /// </summary>
        /// <returns>Path to lldb-mi or null if it doesn't exist</returns>
        private static string GetLLDBMIPath()
        {
            string        directory = EngineConfiguration.GetAdapterDirectory();
            DirectoryInfo dir       = new DirectoryInfo(directory);

            // Remove /bin from the path to get to the debugAdapter folder
            string debugAdapterPath = dir.Parent?.FullName;

            if (!String.IsNullOrEmpty(debugAdapterPath))
            {
                string exePath = Path.Combine(debugAdapterPath, "lldb", "bin", "lldb-mi");
                if (File.Exists(exePath))
                {
                    return(exePath);
                }
            }
            return(null);
        }