Changeset 20744 in vbox for trunk/include/iprt/dbg.h
- Timestamp:
- Jun 21, 2009 3:43:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dbg.h
r20741 r20744 63 63 #define RTDBGSEGIDX_SPECIAL_FIRST (RTDBGSEGIDX_LAST + 1U) 64 64 65 66 /** Max length (including '\\0') of a segment name. */ 67 #define RTDBG_SEGMENT_NAME_LENGTH (128 - 8 - 8 - 8 - 4 - 4) 68 69 /** 70 * Debug module segment. 71 */ 72 typedef struct RTDBGSEGMENT 73 { 74 /** The load address. 75 * RTUINTPTR_MAX if not applicable. */ 76 RTUINTPTR Address; 77 /** The image relative virtual address of the segment. 78 * RTUINTPTR_MAX if not applicable. */ 79 RTUINTPTR uRva; 80 /** The segment size. */ 81 RTUINTPTR cb; 82 /** The segment flags. (reserved) */ 83 uint32_t fFlags; 84 /** The segment index. */ 85 RTDBGSEGIDX iSeg; 86 /** Symbol name. */ 87 char szName[RTDBG_SEGMENT_NAME_LENGTH]; 88 } RTDBGSEGMENT; 89 /** Pointer to a debug module segment. */ 90 typedef RTDBGSEGMENT *PRTDBGSEGMENT; 91 /** Pointer to a const debug module segment. */ 92 typedef RTDBGSEGMENT const *PCRTDBGSEGMENT; 93 94 95 65 96 /** Max length (including '\\0') of a symbol name. */ 66 #define RTDBG_SYMBOL_NAME_LENGTH (512 - 8 - 4 - 4 - 4)97 #define RTDBG_SYMBOL_NAME_LENGTH (384 - 8 - 8 - 8 - 4 - 4 - 8) 67 98 68 99 /** … … 75 106 * as RTDbgMod, but the mapping address if you ask RTDbgAs. */ 76 107 RTUINTPTR Value; 108 /** Symbol size. */ 109 RTUINTPTR cb; 77 110 /** Offset into the segment specified by iSeg. */ 78 111 RTUINTPTR offSeg; 79 112 /** Segment number. */ 80 113 RTDBGSEGIDX iSeg; 81 /** Symbol size. */82 uint32_t cb;83 114 /** Symbol Flags. (reserved). */ 84 115 uint32_t fFlags; 116 /** Symbol ordinal. 117 * This is set to UINT32_MAX if the ordinals aren't supported. */ 118 uint32_t iOrdinal; 85 119 /** Symbol name. */ 86 120 char szName[RTDBG_SYMBOL_NAME_LENGTH]; … … 116 150 117 151 /** Max length (including '\\0') of a debug info file name. */ 118 #define RTDBG_FILE_NAME_LENGTH (260)152 #define RTDBG_FILE_NAME_LENGTH (260) 119 153 120 154 … … 134 168 /** Line number. */ 135 169 uint32_t uLineNo; 170 /** Symbol ordinal. 171 * This is set to UINT32_MAX if the ordinals aren't supported. */ 172 uint32_t iOrdinal; 136 173 /** Filename. */ 137 174 char szFilename[RTDBG_FILE_NAME_LENGTH]; … … 418 455 * @param cb The size of the symbol. 419 456 * @param fFlags Symbol flags. 420 */ 421 RTDECL(int) RTDbgAsSymbolAdd(RTDBGAS hDbgAs, const char *pszSymbol, RTUINTPTR Addr, RTUINTPTR cb, uint32_t fFlags); 457 * @param piOrdinal Where to return the symbol ordinal on success. If 458 * the interpreter doesn't do ordinals, this will be set to 459 * UINT32_MAX. Optional 460 */ 461 RTDECL(int) RTDbgAsSymbolAdd(RTDBGAS hDbgAs, const char *pszSymbol, RTUINTPTR Addr, RTUINTPTR cb, uint32_t fFlags, uint32_t *piOrdinal); 422 462 423 463 /** … … 491 531 */ 492 532 RTDECL(int) RTDbgAs(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE pLine); 533 534 /** 535 * Adds a line number to a module in the address space. 536 * 537 * @returns IPRT status code. See RTDbgModSymbolAdd for more specific ones. 538 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid. 539 * @retval VERR_NOT_FOUND if no module was found at the specified address. 540 * @retval VERR_NOT_SUPPORTED if the module interpret doesn't support adding 541 * custom symbols. 542 * 543 * @param hDbgAs The address space handle. 544 * @param pszFile The file name. 545 * @param uLineNo The line number. 546 * @param Addr The address of the symbol. 547 * @param piOrdinal Where to return the line number ordinal on success. 548 * If the interpreter doesn't do ordinals, this will be 549 * set to UINT32_MAX. Optional. 550 */ 551 RTDECL(int) RTDbgAsLineAdd(RTDBGAS hDbgAs, const char *pszFile, uint32_t uLineNo, RTUINTPTR Addr, uint32_t *piOrdinal); 493 552 494 553 /** … … 524 583 RTDECL(const char *) RTDbgModName(RTDBGMOD hDbgMod); 525 584 RTDECL(RTUINTPTR) RTDbgModImageSize(RTDBGMOD hDbgMod); 585 586 RTDECL(int) RTDbgModSegmentAdd(RTDBGMOD hDbgMod, RTUINTPTR uRva, RTUINTPTR cb, const char *pszName, size_t cchName, uint32_t fFlags, PRTDBGSEGIDX piSeg); 587 RTDECL(RTDBGSEGIDX) RTDbgModSegmentCount(RTDBGMOD hDbgMod); 588 RTDECL(int) RTDbgModSegmentByIndex(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, PRTDBGSEGMENT pSegInfo); 526 589 RTDECL(RTUINTPTR) RTDbgModSegmentSize(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg); 527 590 RTDECL(RTUINTPTR) RTDbgModSegmentRva(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg); 528 RTDECL(RTDBGSEGIDX) RTDbgModSegmentCount(RTDBGMOD hDbgMod); 529 530 RTDECL(int) RTDbgModSymbolAdd(RTDBGMOD hDbgMod, const char *pszSymbol, RTDBGSEGIDX iSeg, RTUINTPTR off, RTUINTPTR cb, uint32_t fFlags); 591 592 RTDECL(int) RTDbgModSymbolAdd(RTDBGMOD hDbgMod, const char *pszSymbol, RTDBGSEGIDX iSeg, RTUINTPTR off, RTUINTPTR cb, uint32_t fFlags, uint32_t *piOrdinal); 531 593 RTDECL(uint32_t) RTDbgModSymbolCount(RTDBGMOD hDbgMod); 532 594 RTDECL(int) RTDbgModSymbolByIndex(RTDBGMOD hDbgMod, uint32_t iSymbol, PRTDBGSYMBOL pSymbol); … … 536 598 RTDECL(int) RTDbgModSymbolByNameA(RTDBGMOD hDbgMod, const char *pszSymbol, PRTDBGSYMBOL *ppSymbol); 537 599 538 RTDECL(int) RTDbgModLineAdd(RTDBGMOD hDbgMod, const char *pszFile, uint32_t uLineNo, RTDBGSEGIDX iSeg, RTUINTPTR off );600 RTDECL(int) RTDbgModLineAdd(RTDBGMOD hDbgMod, const char *pszFile, uint32_t uLineNo, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t *piOrdinal); 539 601 RTDECL(int) RTDbgModLineByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE pLine); 540 602 RTDECL(int) RTDbgModLineByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE *ppLine);
Note:
See TracChangeset
for help on using the changeset viewer.