從 DBH 指令行中,您可以使用各種指令來分析符號和符號檔。
下表列出控制 DBH 選項及執行其他基本工作的命令。
| Command | Effect |
|---|---|
verbose [on|off] |
開啟或關閉詳細模式。 如果沒有參數,則顯示目前的詳細模式設定。 |
sympath [Path] |
設定符號搜尋路徑。 如果沒有參數,則顯示目前的符號搜尋路徑。 |
symoptOptions symopt +Options symopt -Options symopt |
設定符號選項。 With no + or -, the value of Options replaces the current symbol options. If + or - is used, Options specifies the options to be added or removed; there must be a space before the + or - but no space after it. 如果沒有參數,則會顯示目前的符號選項。 啟動 DBH 時,所有符號選項的預設值為 0x10C13。 如需可用選項的清單,請參閱 設定符號選項。 |
help |
顯示 DBH 指令的說明文字。 |
quit |
退出胸腔計劃。 |
下表列出載入、卸載及重新設定目標模組基底的命令。 如果 DBH 是透過在指令行上指定處理程序 ID 來啟動,則無法使用這些指令。
| Command | Effect |
|---|---|
loadFile |
載入指定的模組。 File should specify the path, file name, and file name extension of either the executable file or the symbol file. |
unload |
卸載目前模組。 |
baseAddress |
將預設基底位址設定為指定的值。 所有符號地址都將相對於該基地址確定。 |
下表列出搜尋檔案和顯示目錄資訊的命令。
| Command | Effect |
|---|---|
findexeFile Path |
Locates the specified executable file in the specified path, using the FindExecutableImage routine. |
finddbgFile Path |
在指定的路徑中尋找指定的 .dbg 檔案。 包含 .dbg 副檔名是選擇性的。 |
dirFile Path |
Locates the specified file in the specified path or in any subdirectory under this path, using the EnumDirTree routine. |
srchtreePath File |
Locates the specified file in the specified path or in any subdirectory under this path, using the SearchTreeForFile routine. This command is the same as dir, except that the parameters are reversed. |
ffpathFile |
在目前符號路徑中尋找指定的檔案。 |
下表列出剖析模組清單並控制預設模組的命令。 預設模組及其基底位址會顯示在 DBH 提示字元上。
| Command | Effect |
|---|---|
modAddress |
將預設模組變更為具有指定基底位址的模組。 |
refresh |
重新整理模組清單。 |
omap |
顯示模組 OMAP 結構。 |
epmodPID |
列舉針對指定進程載入的所有模組。 PID specifies the process ID of the desired process. |
info |
顯示目前載入模組的相關資訊。 |
objMask |
列出與預設模組相關聯且符合指定型樣的所有物件檔。 Mask may contain a variety of wildcard characters and specifiers; see String Wildcard Syntax for details. |
srcMask |
列出與預設模組相關聯且符合指定型樣的所有原始檔。 Mask may contain a variety of wildcard characters and specifiers; see String Wildcard Syntax for details. |
enummod |
列舉所有載入的模組。 一律至少有一個模組,除非 DBH 在沒有目標的情況下執行,在此情況下沒有。 |
下表列出顯示和搜尋符號的命令。
| Command | Effect |
|---|---|
enumModule!Symbol |
列舉符合指定模組和符號的所有符號。 Module specifies the module to search (without the file name extension). Symbol specifies a pattern that the symbol must contain. Both Module and Symbol may contain a variety of wildcard characters and specifiers; see String Wildcard Syntax for details. |
enumaddrAddress |
列舉與指定位址相關聯的所有符號。 |
addrAddress |
顯示與指定地址相關聯之符號的詳細資訊。 |
name [Module!]Symbol |
顯示有關指定符號的詳細資訊。 An optional Module specifier may be included. Wildcards should not be used, because if multiple symbols match the pattern, name only displays the first of them. |
next [Module!]Symbol nextAddress |
顯示指定符號或位址之後下一個符號的詳細資訊。 If a symbol is specified by name, an optional Module specifier may be included, but wildcards should not be used. |
prev [Module!]Symbol prevAddress |
顯示指定符號或位址之前第一個符號的詳細資訊。 If a symbol is specified by name, an optional Module specifier may be included, but wildcards should not be used. |
lineFile#LineNum |
顯示與指定來源行相關聯之二進位指令的十六進位位址,以及與此行相關聯的任何符號。 也將目前行號設定為等於指定的行號。 File specifies the name of the source file, and LineNum specifies the line number within that file; these should be separated with a number sign ( # ). |
srclinesFile LineNum |
顯示與指定來源行相關聯的物件檔,以及與此行相關聯之二進位指令的十六進位位址。 不會變更目前的行號。 File specifies the name of the source file, and LineNum specifies the line number within that file; these should be separated with a space. |
laddrAddress |
顯示與位於指定位址的符號相對應的來源檔案和行號。 |
linenext |
遞增目前行號,並顯示新行號的相關資訊。 |
lineprev |
遞減目前行號,並顯示新行號的相關資訊。 |
localsFunction [Mask] |
顯示指定函數中包含的所有局部變數。 If Mask is included, only those locals matching the specified pattern are displayed; see String Wildcard Syntax for details. |
typeTypeName |
顯示指定資料類型的詳細資訊。 TypeName specifies the name of the data type (for example, WSTRING). 如果沒有類型名稱符合此值,則會顯示任何相符的符號。 Unlike most DBH command parameters, TypeName is case-sensitive. |
elines [Source [Obj]] |
列舉符合指定來源遮罩和物件遮罩的所有來源行。 Source specifies the name of the source file, including the absolute path and file name extension. Obj specifies the name of the object file, including the relative path and file name extension. Both Source and Obj may contain a variety of wildcard characters and specifiers; see String Wildcard Syntax for details. 如果省略參數,這相當於使用星號 () 萬用字元。 如果您不想指定路徑資訊,請在檔案名稱前面加上 </strong> 以指出萬用字元路徑。 |
indexValue |
顯示具有指定索引值的符號的詳細資訊。 |
scopeAddress scope [Module!]Symbol |
顯示有關指定符號父項的詳細資訊。 符號可以由地址或名稱指定。 |
srch [mask=Symbol] [index=Index] [tag=Tag] [addr=Address] [globals] |
搜尋符合指定遮罩的所有符號。 Symbol specifies the symbol name. 它不應包含模組名稱,但可能包含萬用字元和說明符;如需詳細資訊,請參閱 字串萬用字元語法 。 Index specifies the hexadecimal address of a symbol to be used as the parent for the search. Tag specifies the hexadecimal symbol type classifier (SymTagXxx) value that must match the symbol. Address specifies the address of the symbol. If globals is included, only global symbols will be displayed. |
uwAddress |
顯示指定位址的函式展開資訊。 |
dtag |
Displays all the symbol type classifier (SymTagXxx) values. |
etypes |
列舉所有資料類型。 |
dump |
顯示目標檔案中所有符號資訊的完整清單。 |
下表列出與符號伺服器和符號存放區相關的命令。
| Command | Effect |
|---|---|
home [Path] |
設定 SymSrv 和 SrcSrv 用於預設下游存放區的主目錄。 If the symbol path contains a reference to a symbol server that uses a default downstream store, then the sym subdirectory of the home directory will be used for the downstream store. With no parameter, home displays the current home directory. |
srvpathPath |
測試指定的路徑是否為符號存放區的路徑。 |
srvindFile |
尋找對應至指定檔案的符號伺服器索引。 符號伺服器索引是以檔案內容為基礎的唯一值,不論它是否實際已新增至任何符號存放區。 File should specify the file name and absolute path of the desired file. |
fiiFile |
顯示指定二進位檔及其相關聯檔案的符號伺服器索引。 |
getfileFile Index |
顯示具有指定名稱和符號伺服器索引的檔案。 File specifies the name of the desired file; this should not include its path. Index specifies the symbol server index of the desired file. DBH uses the SymFindFileInPath routine to search the tree under the current symbol path for a file with this name and this index. |
supPath File1 File2 |
根據參數的值,將檔案儲存在符號存放區中。 Path specifies the directory path of the symbol store. File1 and File2 are used to create a delta value, which is in turn used to determine the file being stored. |
storeaddFile Store |
將指定的檔案新增至指定的符號存放區。 Store should be the root path of the symbol store. |
下表列出適用於實數和虛數符號的 DBH 命令。
| Command | Effect |
|---|---|
undecName |
顯示附加到指定符號名稱的裝飾的含義。 Name can be any string; it need not correspond to a currently loaded symbol. If Name contains C++ decorations, the meaning of these decorations is displayed. |
addName Address Size |
將指定的虛數符號新增至 DBH 中載入的符號清單。 Name specifies the name of the symbol to be added, Address specifies its hexadecimal address, and Size its hexadecimal size in bytes. This is treated like any other symbol in later DBH commands, until the DBH session is ended with quit or unload, or until the imaginary symbol is deleted with del. The actual target symbol file is not altered. |
delName delAddress |
Deletes an imaginary symbol previously added with the add command. 符號可以依名稱或位址指定。 這不能用來刪除實數符號。 |