Changeset 48694 in vbox for trunk/src/VBox
- Timestamp:
- Sep 26, 2013 12:19:41 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
r47825 r48694 940 940 * @param pszModName The module name. If NULL, then then the file name 941 941 * base is used (no extension or nothing). 942 * @param enmArch The desired architecture, use RTLDRARCH_WHATEVER if 943 * it's not relevant or known. 942 944 * @param pModAddress The load address of the module. 943 945 * @param iModSeg The segment to load, pass NIL_RTDBGSEGIDX to load … … 945 947 * @param fFlags Flags reserved for future extensions, must be 0. 946 948 */ 947 VMMR3DECL(int) DBGFR3AsLoadImage(PUVM pUVM, RTDBGAS hDbgAs, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags) 949 VMMR3DECL(int) DBGFR3AsLoadImage(PUVM pUVM, RTDBGAS hDbgAs, const char *pszFilename, const char *pszModName, RTLDRARCH enmArch, 950 PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags) 948 951 { 949 952 /* … … 960 963 961 964 RTDBGMOD hDbgMod; 962 int rc = RTDbgModCreateFromImage(&hDbgMod, pszFilename, pszModName, RTLDRARCH_WHATEVER, pUVM->dbgf.s.hDbgCfg);965 int rc = RTDbgModCreateFromImage(&hDbgMod, pszFilename, pszModName, enmArch, pUVM->dbgf.s.hDbgCfg); 963 966 if (RT_SUCCESS(rc)) 964 967 { … … 1061 1064 1062 1065 /** 1066 * Wrapper around RTDbgAsModuleByName and RTDbgAsModuleUnlink. 1067 * 1068 * Unlinks all mappings matching the given module name. 1069 * 1070 * @returns VBox status code. 1071 * @param pUVM The user mode VM handle. 1072 * @param hDbgAs The address space handle. 1073 * @param pszModName The name of the module to unlink. 1074 */ 1075 VMMR3DECL(int) DBGFR3AsUnlinkModuleByName(PUVM pUVM, RTDBGAS hDbgAs, const char *pszModName) 1076 { 1077 /* 1078 * Input validation. 1079 */ 1080 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 1081 RTDBGAS hRealAS = DBGFR3AsResolveAndRetain(pUVM, hDbgAs); 1082 if (hRealAS == NIL_RTDBGAS) 1083 return VERR_INVALID_HANDLE; 1084 1085 /* 1086 * Do the job. 1087 */ 1088 RTDBGMOD hMod; 1089 int rc = RTDbgAsModuleByName(hRealAS, pszModName, 0, &hMod); 1090 if (RT_SUCCESS(rc)) 1091 { 1092 for (;;) 1093 { 1094 rc = RTDbgAsModuleUnlink(hRealAS, hMod); 1095 RTDbgModRelease(hMod); 1096 if (RT_FAILURE(rc)) 1097 break; 1098 rc = RTDbgAsModuleByName(hRealAS, pszModName, 0, &hMod); 1099 if (RT_FAILURE_NP(rc)) 1100 { 1101 if (rc == VERR_NOT_FOUND) 1102 rc = VINF_SUCCESS; 1103 break; 1104 } 1105 } 1106 } 1107 1108 RTDbgAsRelease(hRealAS); 1109 return rc; 1110 } 1111 1112 1113 /** 1063 1114 * Adds the module name to the symbol name. 1064 1115 *
Note:
See TracChangeset
for help on using the changeset viewer.