- Timestamp:
- Jul 29, 2021 1:21:10 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146000
- Location:
- trunk/src/VBox/Debugger
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGPlugInLinuxModuleCodeTmpl.cpp.h
r82968 r90408 71 71 LNX_PTR_T uPtrDriverDir; /**< Points to struct kobject. */ 72 72 # endif 73 # if LNX_VER >= LNX_MK_VER(4,5,0) 74 LNX_PTR_T uPtrMp; 75 LNX_PTR_T uPtrCompletion; /**< Points to struct completion. */ 76 # endif 73 77 } RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX); 74 78 #endif … … 80 84 81 85 86 #if LNX_VER >= LNX_MK_VER(4,5,0) 87 /** 88 * Red black tree node. 89 */ 90 typedef struct RT_CONCAT(LNXRBNODE,LNX_SUFFIX) 91 { 92 LNX_ULONG_T uRbParentColor; 93 LNX_PTR_T uPtrRbRight; 94 LNX_PTR_T uPtrRbLeft; 95 } RT_CONCAT(LNXRBNODE,LNX_SUFFIX); 96 97 98 /** 99 * Latch tree node. 100 */ 101 typedef struct RT_CONCAT(LNXLATCHTREENODE,LNX_SUFFIX) 102 { 103 RT_CONCAT(LNXRBNODE,LNX_SUFFIX) aNode[2]; 104 } RT_CONCAT(LNXLATCHTREENODE,LNX_SUFFIX); 105 106 107 /** 108 * Module tree node. 109 */ 110 typedef struct RT_CONCAT(LNXMODTREENODE,LNX_SUFFIX) 111 { 112 LNX_PTR_T uPtrKMod; 113 RT_CONCAT(LNXLATCHTREENODE,LNX_SUFFIX) Node; 114 } RT_CONCAT(LNXMODTREENODE,LNX_SUFFIX); 115 116 117 /** 118 * Module layout. 119 */ 120 typedef struct RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX) 121 { 122 LNX_PTR_T uPtrBase; /**< Base pointer to text and data. */ 123 uint32_t cb; /**< Size of the module. */ 124 uint32_t cbText; /**< Size of the text section. */ 125 uint32_t cbRo; /**< Size of the readonly portion (text + ro data). */ 126 RT_CONCAT(LNXMODTREENODE,LNX_SUFFIX) ModTreeNd; /**< Only available when CONFIG_MODULES_TREE_LOOKUP is set (default). */ 127 } RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX); 128 129 130 /** 131 * Mutex. 132 */ 133 typedef struct RT_CONCAT(LNXMUTEX,LNX_SUFFIX) 134 { 135 LNX_ULONG_T uOwner; 136 uint32_t wait_lock; /**< Actually spinlock_t */ 137 PAD32ON64(0) 138 LNX_PTR_T uWaitLstPtrNext; 139 LNX_PTR_T uWaitLstPtrPrev; 140 } RT_CONCAT(LNXMUTEX,LNX_SUFFIX); 141 #endif 142 82 143 83 144 /** … … 86 147 typedef struct RT_CONCAT(LNXKMODULE,LNX_SUFFIX) 87 148 { 88 #if LNX_VER >= LNX_MK_VER(2,5,48) 149 #if LNX_VER >= LNX_MK_VER(4,5,0) 150 /* Completely new layout to not feed the spaghetti dragons further. */ 151 int32_t state; 152 PAD32ON64(0) 153 LNX_PTR_T uPtrNext; 154 LNX_PTR_T uPtrPrev; 155 char name[64 - sizeof(LNX_PTR_T)]; 156 157 RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX) mkobj; 158 LNX_PTR_T uPtrModInfoAttrs; /**< Points to struct module_attribute. */ 159 LNX_PTR_T uPtrVersion; /**< String pointers. */ 160 LNX_PTR_T uPtrSrcVersion; /**< String pointers. */ 161 LNX_PTR_T uPtrHolderDir; /**< Points to struct kobject. */ 162 163 /** @name Exported Symbols 164 * @{ */ 165 LNX_PTR_T uPtrSyms; /**< Array of struct kernel_symbol. */ 166 LNX_PTR_T uPtrCrcs; /**< unsigned long array */ 167 uint32_t num_syms; 168 /** @} */ 169 170 /** @name Kernel parameters 171 * @{ */ 172 RT_CONCAT(LNXMUTEX,LNX_SUFFIX) Mtx; /**< Mutex. */ 173 LNX_PTR_T uPtrKp; /**< Points to struct kernel_param */ 174 uint32_t num_kp; 175 /** @} */ 176 177 /** @name GPL Symbols 178 * @{ */ 179 uint32_t num_gpl_syms; 180 LNX_PTR_T uPtrGplSyms; /**< Array of struct kernel_symbol. */ 181 LNX_PTR_T uPtrGplCrcs; /**< unsigned long array */ 182 /** @} */ 183 184 /** @name Unused symbols 185 * @{ */ 186 LNX_PTR_T uPtrUnusedSyms; /**< Array of struct kernel_symbol. */ 187 LNX_PTR_T uPtrUnusedCrcs; /**< unsigned long array */ 188 uint32_t num_unused_syms; 189 uint32_t num_unused_gpl_syms; 190 LNX_PTR_T uPtrUnusedGplSyms; /**< Array of struct kernel_symbol. */ 191 LNX_PTR_T uPtrUnusedGplCrcs; /**< unsigned long array */ 192 /** @} */ 193 194 uint8_t sig_ok; 195 uint8_t async_probe_requested; 196 197 /** @name Future GPL Symbols 198 * @{ */ 199 LNX_PTR_T uPtrGplFutureSyms; /**< Array of struct kernel_symbol. */ 200 LNX_PTR_T uPtrGplFutureCrcs; /**< unsigned long array */ 201 uint32_t num_gpl_future_syms; 202 /** @} */ 203 204 /** @name Exception table. 205 * @{ */ 206 uint32_t num_exentries; 207 LNX_PTR_T uPtrEntries; /**< struct exception_table_entry array. */ 208 /** @} */ 209 210 LNX_PTR_T pfnInit; 211 RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX) CoreLayout; /**< Should be aligned on a cache line. */ 212 RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX) InitLayout; 213 214 #elif LNX_VER >= LNX_MK_VER(2,5,48) 89 215 /* 90 216 * This first part is mostly always the same. … … 284 410 * Create a simple module for it. 285 411 */ 286 LogRelFunc((" %#RX64: %#RX64 LB %#RX64 %s\n", pAddrModule->FlatPtr, Module.uPtrModuleCore, Module.cbCore, pszName)); 412 #if LNX_VER >= LNX_MK_VER(4,5,0) 413 LNX_PTR_T uPtrModuleCore = Module.CoreLayout.uPtrBase; 414 uint32_t cbCore = Module.CoreLayout.cb; 415 #else 416 LNX_PTR_T uPtrModuleCore = Module.uPtrModuleCore; 417 uint32_t cbCore = (uint32_t)Module.cbCore; 418 #endif 419 LogRelFunc((" %#RX64: %#RX64 LB %#RX32 %s\n", pAddrModule->FlatPtr, uPtrModuleCore, cbCore, pszName)); 287 420 288 421 RTDBGMOD hDbgMod; 289 rc = RTDbgModCreate(&hDbgMod, pszName, Module.cbCore, 0 /*fFlags*/);422 rc = RTDbgModCreate(&hDbgMod, pszName, cbCore, 0 /*fFlags*/); 290 423 if (RT_SUCCESS(rc)) 291 424 { … … 294 427 { 295 428 RTDBGAS hAs = DBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL); 296 rc = RTDbgAsModuleLink(hAs, hDbgMod, Module.uPtrModuleCore, RTDBGASLINK_FLAGS_REPLACE /*fFlags*/);429 rc = RTDbgAsModuleLink(hAs, hDbgMod, uPtrModuleCore, RTDBGASLINK_FLAGS_REPLACE /*fFlags*/); 297 430 RTDbgAsRelease(hAs); 298 431 } -
trunk/src/VBox/Debugger/DBGPlugInLinuxModuleVerTmpl.cpp.h
r82968 r90408 19 19 * Newest first so the list walker can select the right instance. 20 20 */ 21 22 #define LNX_VER LNX_MK_VER(4,5,0) 23 #define LNX_SUFFIX RT_CONCAT(_4_5_0,LNX_BIT_SUFFIX) 24 #include LNX_TEMPLATE_HEADER 21 25 22 26 #define LNX_VER LNX_MK_VER(2,6,27)
Note:
See TracChangeset
for help on using the changeset viewer.