Changeset 20744 in vbox for trunk/include
- Timestamp:
- Jun 21, 2009 3:43:57 PM (16 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 3 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); -
trunk/include/iprt/err.h
r20740 r20744 939 939 * @{ 940 940 */ 941 /** The module contains no line number information. */ 942 #define VERR_DBG_NO_LINE_NUMBERS (-650) 943 /** The module contains no symbol information. */ 944 #define VERR_DBG_NO_SYMBOLS (-651) 941 945 /** The specified segment:offset address was invalid. Typically an attempt at 942 946 * addressing outside the segment boundrary. */ 943 #define VERR_DBG_INVALID_ADDRESS (-65 0)947 #define VERR_DBG_INVALID_ADDRESS (-652) 944 948 /** Invalid segment index. */ 945 #define VERR_DBG_INVALID_SEGMENT_INDEX (-65 1)949 #define VERR_DBG_INVALID_SEGMENT_INDEX (-653) 946 950 /** Invalid segment offset. */ 947 #define VERR_DBG_INVALID_SEGMENT_OFFSET (-65 2)951 #define VERR_DBG_INVALID_SEGMENT_OFFSET (-654) 948 952 /** Invalid image relative virtual address. */ 949 #define VERR_DBG_INVALID_RVA (-653) 950 /** The module contains no line number information. */ 951 #define VERR_DBG_NO_LINE_NUMBERS (-654) 953 #define VERR_DBG_INVALID_RVA (-655) 952 954 /** Address conflict within a module/segment. 953 955 * Attempted to add a symbol or line number that fully or partially overlaps with an existing one. */ 954 #define VERR_DBG_ADDRESS_CONFLICT (-65 5)956 #define VERR_DBG_ADDRESS_CONFLICT (-656) 955 957 /** Duplicate symbol within the module. 956 958 * Attempted to add a symbol which name already exists within the module. */ 957 #define VERR_DBG_DUPLICATE_SYMBOL (-656) 959 #define VERR_DBG_DUPLICATE_SYMBOL (-657) 960 /** The segment index specified when adding a new segment is already in use. */ 961 #define VERR_DBG_SEGMENT_INDEX_CONFLICT (-658) 962 /** No line number was found for the specified address/ordinal/whatever. */ 963 #define VERR_DBG_LINE_NOT_FOUND (-659) 958 964 /** The length of the symbol name is out of range. 959 965 * This means it is an empty string or that it's greater or equal to 960 966 * RTDBG_SYMBOL_NAME_LENGTH. */ 961 #define VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE (-6 57)967 #define VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE (-660) 962 968 /** The length of the file name is out of range. 963 969 * This means it is an empty string or that it's greater or equal to 964 970 * RTDBG_FILE_NAME_LENGTH. */ 965 #define VERR_DBG_FILE_NAME_OUT_OF_RANGE (-6 58)971 #define VERR_DBG_FILE_NAME_OUT_OF_RANGE (-661) 966 972 /** @} */ 967 973 -
trunk/include/iprt/err.mac
r20542 r20744 274 274 %define VERR_LDRELF_INVALID_RELOCATION_OFFSET (-639) 275 275 %define VERR_LDRELF_NO_SYMBOL_OR_NO_STRING_TABS (-640) 276 %define VERR_DBGMOD_INVALID_ADDRESS (-650) 276 %define VERR_DBG_NO_LINE_NUMBERS (-650) 277 %define VERR_DBG_NO_SYMBOLS (-651) 278 %define VERR_DBG_INVALID_ADDRESS (-652) 279 %define VERR_DBG_INVALID_SEGMENT_INDEX (-653) 280 %define VERR_DBG_INVALID_SEGMENT_OFFSET (-654) 281 %define VERR_DBG_INVALID_RVA (-655) 282 %define VERR_DBG_ADDRESS_CONFLICT (-656) 283 %define VERR_DBG_DUPLICATE_SYMBOL (-657) 284 %define VERR_DBG_SEGMENT_INDEX_CONFLICT (-658) 285 %define VERR_DBG_LINE_NOT_FOUND (-659) 286 %define VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE (-660) 287 %define VERR_DBG_FILE_NAME_OUT_OF_RANGE (-661) 277 288 %define VERR_RT_REQUEST_INVALID_TYPE (-700) 278 289 %define VERR_RT_REQUEST_STATE (-701)
Note:
See TracChangeset
for help on using the changeset viewer.