Exemple #1
0
        public int GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS fields,
                                 MODULE_SYMBOL_SEARCH_INFO[] searchInfo)
        {
            var info = new MODULE_SYMBOL_SEARCH_INFO();

            if ((enum_SYMBOL_SEARCH_INFO_FIELDS.SSIF_VERBOSE_SEARCH_INFO & fields) != 0)
            {
                string log = _moduleSearchLogHolder.GetSearchLog(_lldbModule);
                if (string.IsNullOrEmpty(log))
                {
                    if (_moduleUtil.HasSymbolsLoaded(_lldbModule))
                    {
                        log = "Symbols for this module were automatically located by LLDB.";
                    }
                    else if (!_symbolSettingsProvider.IsSymbolServerEnabled)
                    {
                        log = "Symbols are not loaded automatically because symbol server " +
                              "support is disabled." + Environment.NewLine +
                              "Please enable symbol server support in Stadia SDK settings " +
                              "to load symbols automatically when the debug session is started." +
                              Environment.NewLine +
                              "Note that this may slow down your debug session startup.";
                    }
                }

                info.bstrVerboseSearchInfo = log;
                info.dwValidFields        |=
                    (uint)enum_SYMBOL_SEARCH_INFO_FIELDS.SSIF_VERBOSE_SEARCH_INFO;
            }

            searchInfo[0] = info;
            return(VSConstants.S_OK);
        }
Exemple #2
0
        // Returns a list of paths searched for symbols and the results of searching each path.
        int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
            // does so only for the primary exe of the debuggee.
            // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO
            {
                dwValidFields = 1,                 // SSIF_VERBOSE_SEARCH_INFO;

                bstrVerboseSearchInfo = Strings.DebugModuleNoSymbolsRequired
            };

            /*
             * if (this.DebuggedModule.SymbolsLoaded)
             * {
             * string symbolPath = "Symbols Loaded - " + this.DebuggedModule.SymbolPath;
             * pinfo[0].bstrVerboseSearchInfo = symbolPath;
             * }
             * else
             * {
             * string symbolsNotLoaded = "Symbols not loaded";
             * pinfo[0].bstrVerboseSearchInfo = symbolsNotLoaded;
             * }*/
            return(VSConstants.S_OK);
        }
Exemple #3
0
 // Returns a list of paths searched for symbols and the results of searching each path.
 int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
 {
     // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
     // does so only for the primary exe of the debuggee.
     // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
     pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO { dwValidFields = 1, bstrVerboseSearchInfo = "Symbols not loaded" };
     return Constants.S_OK;
 }
Exemple #4
0
        /// <summary>
        /// Returns a list of paths searched for symbols and the results of searching each path.
        /// [http://msdn.microsoft.com/en-ca/library/bb161971(v=vs.100).aspx]
        /// </summary>
        /// <param name="dwFields"> A combination of flags from the SYMBOL_SEARCH_INFO_FIELDS enumeration specifying which fields
        /// of pInfo are to be filled in. </param>
        /// <param name="pinfo"> A MODULE_SYMBOL_SEARCH_INFO structure whose members are to be filled in with the specified information.
        /// If this is a null value, this method returns E_INVALIDARG. </param>
        /// <returns> VSConstants.S_OK. </returns>
        int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            string symbolsNotLoaded = "Symbols not loaded";

            pinfo[0].bstrVerboseSearchInfo = symbolsNotLoaded;
            return(VSConstants.S_OK);
        }
        public int GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
            // does so only for the primary exe of the debuggee.
            // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            string symbolPath = "Symbols Loaded - " + FileName;

            pinfo[0].bstrVerboseSearchInfo = symbolPath;

            return(VSConstants.S_OK);
        }
        public void GetSymbolInfo()
        {
            string testSearchLog = @"C:\path\test.debug... File found.";

            _mockModuleSearchLogHolder.GetSearchLog(_mockModule).Returns(testSearchLog);
            var flags            = enum_SYMBOL_SEARCH_INFO_FIELDS.SSIF_VERBOSE_SEARCH_INFO;
            var symbolSearchInfo = new MODULE_SYMBOL_SEARCH_INFO[1];

            Assert.Multiple(() =>
            {
                Assert.That(_debugModule.GetSymbolInfo(flags, symbolSearchInfo),
                            Is.EqualTo(VSConstants.S_OK));
                Assert.That((enum_SYMBOL_SEARCH_INFO_FIELDS)symbolSearchInfo[0].dwValidFields,
                            Is.EqualTo(flags));
                Assert.That(symbolSearchInfo[0].bstrVerboseSearchInfo, Is.EqualTo(testSearchLog));
            });
        }
Exemple #7
0
        // Returns a list of paths searched for symbols and the results of searching each path.
        int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
            // does so only for the primary exe of the debuggee.
            // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            if (this.DebuggedModule.SymbolsLoaded)
            {
                pinfo[0].bstrVerboseSearchInfo = string.Format(CultureInfo.CurrentUICulture, ResourceStrings.SymbolsLoadedInfo, this.DebuggedModule.SymbolPath);
            }
            else
            {
                pinfo[0].bstrVerboseSearchInfo = ResourceStrings.SymbolsNotLoadedInfo;
            }
            return(Constants.S_OK);
        }
        public void GetSymbolInfoNotifiesIfSymbolServerSupportIsDisabled()
        {
            _mockSymbolSettingsProvider.IsSymbolServerEnabled.Returns(false);
            _mockModuleUtil.HasSymbolsLoaded(_mockModule).Returns(false);

            var flags            = enum_SYMBOL_SEARCH_INFO_FIELDS.SSIF_VERBOSE_SEARCH_INFO;
            var symbolSearchInfo = new MODULE_SYMBOL_SEARCH_INFO[1];

            int result = _debugModule.GetSymbolInfo(flags, symbolSearchInfo);

            Assert.Multiple(() =>
            {
                Assert.That(result, Is.EqualTo(VSConstants.S_OK));
                Assert.That(symbolSearchInfo[0].bstrVerboseSearchInfo.ToLower(),
                            Does.Contain("symbol server support"));
                Assert.That(symbolSearchInfo[0].bstrVerboseSearchInfo.ToLower(),
                            Does.Contain("disabled"));
            });
        }
Exemple #9
0
        // Returns a list of paths searched for symbols and the results of searching each path.
        int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo) {
            // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
            // does so only for the primary exe of the debuggee.
            // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            pinfo[0].bstrVerboseSearchInfo = "No symbols required";
            /*
            if (this.DebuggedModule.SymbolsLoaded)
            {
                string symbolPath = "Symbols Loaded - " + this.DebuggedModule.SymbolPath;
                pinfo[0].bstrVerboseSearchInfo = symbolPath;
            }
            else
            {
                string symbolsNotLoaded = "Symbols not loaded";
                pinfo[0].bstrVerboseSearchInfo = symbolsNotLoaded;
            }*/
            return VSConstants.S_OK;
        }
Exemple #10
0
 int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo) {
     throw new NotImplementedException();
 }
        public int GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
            // does so only for the primary exe of the debuggee.
            // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            string symbolPath = "Symbols Loaded - " + FileName;
            pinfo[0].bstrVerboseSearchInfo = symbolPath;

            return VSConstants.S_OK;
        }
Exemple #12
0
        /// <summary>
        /// Returns a list of paths searched for symbols and the results of searching each path. 
        /// [http://msdn.microsoft.com/en-ca/library/bb161971(v=vs.100).aspx]
        /// </summary>
        /// <param name="dwFields"> A combination of flags from the SYMBOL_SEARCH_INFO_FIELDS enumeration specifying which fields 
        /// of pInfo are to be filled in. </param>
        /// <param name="pinfo"> A MODULE_SYMBOL_SEARCH_INFO structure whose members are to be filled in with the specified information. 
        /// If this is a null value, this method returns E_INVALIDARG. </param>
        /// <returns> VSConstants.S_OK. </returns>
        int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            string symbolsNotLoaded = "Symbols not loaded";
            pinfo[0].bstrVerboseSearchInfo = symbolsNotLoaded;
            return VSConstants.S_OK;
        }
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    #endregion

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    #region IDebugModule3 Members

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public override int GetSymbolInfo (enum_SYMBOL_SEARCH_INFO_FIELDS requestedFields, MODULE_SYMBOL_SEARCH_INFO [] infoArray)
    {
      // 
      // Returns a list of paths searched for symbols, and the results of searching path.
      // This is not currently supported.
      // 

      LoggingUtils.PrintFunction ();

      try
      {
        LoggingUtils.RequireOk (base.GetSymbolInfo (requestedFields, infoArray));

        return Constants.S_OK;
      }
      catch (Exception e)
      {
        LoggingUtils.HandleException (e);

        return Constants.E_FAIL;
      }
    }
 /// <summary>
 /// Retrieves a list of paths that are searched for symbols as well as the results of searching each path.
 /// </summary>
 /// <param name="dwFields">A combination of flags from the SYMBOL_SEARCH_INFO_FIELDS enumeration specifying which fields of pInfo are to be filled in.</param>
 /// <param name="pinfo">A MODULE_SYMBOL_SEARCH_INFO structure whose members are to be filled in with the specified information. If this is a null value, this method returns E_INVALIDARG.</param>
 /// <returns>
 /// If the method succeeds, it returns S_OK; otherwise, it returns an error code.
 /// Note: The returned string (in the MODULE_SYMBOL_SEARCH_INFO structure) could be empty even if S_OK is returned. In this case, there was no search information to return.
 /// </returns>
 /// <remarks>
 /// If the bstrVerboseSearchInfo field of the MODULE_SYMBOL_SEARCH_INFO structure is not empty, then it contains a list of paths searched and the results of that search. The list is formatted with a path, followed by ellipses ("..."), followed by the result. If there is more than one path result pair, then each pair is separated by a "\r\n" (carriage-return/linefeed) pair. The pattern looks like this:
 /// <code>
 ///     {path}...{result}\r\n{path}...{result}\r\n{path}...{result}
 /// </code>
 /// Note that the last entry does not have a \r\n sequence.
 /// </remarks>
 public virtual int GetSymbolInfo( enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo )
 {
     Logger.Debug( string.Empty );
     return VSConstants.E_NOTIMPL;
 }
Exemple #15
0
        // Returns a list of paths searched for symbols and the results of searching each path.
        int IDebugModule3.GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
        {
            // This engine only supports loading symbols at the location specified in the binary's symbol path location in the PE file and
            // does so only for the primary exe of the debuggee.
            // Therefore, it only displays if the symbols were loaded or not. If symbols were loaded, that path is added.
            pinfo[0] = new MODULE_SYMBOL_SEARCH_INFO();
            pinfo[0].dwValidFields = 1; // SSIF_VERBOSE_SEARCH_INFO;

            if (this.DebuggedModule.SymbolsLoaded)
            {
                pinfo[0].bstrVerboseSearchInfo = string.Format(CultureInfo.CurrentUICulture, ResourceStrings.SymbolsLoadedInfo, this.DebuggedModule.SymbolPath);
            }
            else
            {
                pinfo[0].bstrVerboseSearchInfo = ResourceStrings.SymbolsNotLoadedInfo;
            }
            return Constants.S_OK;
        }
Exemple #16
0
 public int GetSymbolInfo(enum_SYMBOL_SEARCH_INFO_FIELDS dwFields, MODULE_SYMBOL_SEARCH_INFO[] pinfo)
 {
     DLog.Debug(DContext.VSDebuggerComCall, "DebugModule.GetSymbolInfo");
     throw new NotImplementedException();
 }